Highcharts默认为所有的图表(饼状图,线形图等)提供一了组默认的颜色,看下图官方参考手册里的描述:
colors
An array containing the default colors for the chart ' s series. When all colors are used, new colors are pulled from the start again. Defaults to:
colors: [
' #4572A7 ' ,
' #AA4643 ' ,
' #89A54E ' ,
' #80699B ' ,
' #3D96AE ' ,
' #DB843D ' ,
' #92A8CD ' ,
' #A47D7C ' ,
' #B5CA92 '
]
An array containing the default colors for the chart ' s series. When all colors are used, new colors are pulled from the start again. Defaults to:
colors: [
' #4572A7 ' ,
' #AA4643 ' ,
' #89A54E ' ,
' #80699B ' ,
' #3D96AE ' ,
' #DB843D ' ,
' #92A8CD ' ,
' #A47D7C ' ,
' #B5CA92 '
]
我们现在需要做的就是把这组颜色值修改为我们自己需要的颜色,至于颜色值这个不必让我来提供吧,哈哈;
另外说明下:这组颜色值对于的是series属性中的数据列, 修改这组颜色值时建议从上往下改。
另附广告:女朋友的淘宝网店,为她做宣传,希望大家别介意,http://iyseek.taobao.com 欢迎大家逛逛,嘿嘿!