码迷,mamicode.com
首页 > 其他好文 > 详细

highchart的封装格式

时间:2015-10-26 12:19:58      阅读:269      评论:0      收藏:0      [点我收藏+]

标签:


3D饼图
{"chart":{"type":"pie","options3d":{"enabled":true,"alpha":50,"beta":0}},
"title":{"text":" "},
"tooltip":{"pointFormat":"<b>{point.percentage:.1f}%</b>"},
"plotOptions":{"pie":{"depth":45,"allowPointSelect":true,"cursor":"pointer",
"dataLabels":{"distance":1,"format":"{point.name}<br>{point.percentage:.1f}%"},"showInLegend":true}},
"credits":{"enabled":false},"legend":{"layout":"vertical","align":"right","verticalAlign":"middle"},
"colors":[‘#99FFFF ‘,‘#66CCCC‘,‘#99FFCC‘,‘#99CC99 ‘,‘#CCFFCC  ‘,‘#66CC33 ‘,‘#339900 ‘,‘#999900 ‘,‘#CCCC00‘],
"series":[{data:[[‘asset‘,1],[‘Viruses‘,4],[‘Vulnerability‘,42],[‘Configuration‘,7]]}]};
折线图
{"chart":{"type":‘spline‘},"title":{"text":‘ ‘},"subtitle":{"text":‘‘},
"xAxis":{"categories":[‘10-20‘,‘10-21‘,‘10-22‘,‘10-23‘,‘10-24‘,‘10-25‘,‘10-26‘],
"title":{"text":‘‘}},"yAxis":{"title":{"text":‘‘}},
"tooltip":{"enabled":false,"formatter":function()
{ return ‘<b>‘+ this.series.name +‘</b><br>‘+this.x +‘: ‘+ this.y; }},
"plotOptions":{"line":{"dataLabels":{"enabled":true},"enableMouseTracking":false}},
"series":[{name:‘Case Create Trends‘,data:[1,1,1,0,0,0,1]}]};
 3D柱状图
{"chart":{"type":"column","options3d":{"enabled":true,"alpha":1,"beta":1,"depth":500,"viewDistance":2300}},
"title":{"text":" "},
"plotOptions":{"column":{"depth":500,"animation":true,"groupPadding":"0.1",
"dataLabels":{"enabled":true,"inside":true}}},
"credits":{"enabled":false},"xAxis":{"title":{"text":""},
"categories":[‘admin‘,‘unknownUser‘,‘cc‘,‘aa‘,‘sdada‘],
"gridLineWidth":0,"labels":{"rotation":0,"align":"right"}},
"colors":[‘#FF9933‘],"yAxis":{"title":{"text":""}},
"series":[{name:‘users‘,data:[29,13,5,4,2]}]};

 3D横向柱状图
{"chart":{"type":"column","inverted":true,
"options3d":{"enabled":true,"alpha":1,"beta":1,"depth":300,"viewDistance":2300}},
"title":{"text":" "},
"plotOptions":{"column":{"depth":300,"animation":true,"groupPadding":"0.1",
"dataLabels":{"enabled":true,"inside":true}}},"credits":{"enabled":false},
"xAxis":{"title":{"text":""},
"categories":[‘阿达‘,‘TTss‘,‘Test unload Url‘,‘什么叫没有修改过什么叫没有修改过‘,‘Test Title‘,‘周天‘,‘could not execute,te‘,‘做一个程序猿‘,‘什么叫没有修改过‘,‘神马情况神马情况神马情况神马情况神马情况‘],
"gridLineWidth":0,"labels":{"rotation":0,"align":"right"}},
"colors":[‘#99FFFF‘,‘#66CCCC‘,‘#99FFCC‘,‘#99CC99‘,‘#CCFFCC‘,‘#66CC33‘,‘#339900‘,‘#999900‘,‘#CCCC00‘],
"yAxis":{"title":{"text":""}},"series":[{name:‘view count‘,data:[15,13,12,8,6,4,4,3,3,2]}]};

highchart的封装格式

标签:

原文地址:http://my.oschina.net/u/2433838/blog/522044

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!