Highcharts甜甜圈图表没有内在派? [英] Highcharts donut chart without inner pie?

查看:125
本文介绍了Highcharts甜甜圈图表没有内在派?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找解决方案,用Highcharts库生成最简单的圆环图。然而,所有Highcharts的例子都显示了内部派和外部甜甜圈的图表风格(参见: http ://www.highcharts.com/demo/pie-donut

我怎样才能摆脱内在的馅饼,并保持外面的甜甜圈,就像其他图书馆一样? (类似于RGraph: http://www.rgraph.net/examples/donut.html



谢谢。 您只需要提供数据为两个元素(键/值)数组的数组。指定一个 innerSize 来获得甜甜圈样式。



所以你的参数将包含如下内容:



$ p $ ...
data:[[Firefox,6],[MSIE,4],[Chrome ,7]],
innerSize:'20%',
...

这是完整示例的jsFiddle


I've been searching for the solution to generate the simplest donut chart with Highcharts library. However, all examples of Highcharts show the style of chart with both inner pie and outer donut (refer to: http://www.highcharts.com/demo/pie-donut)

How can I get rid of the inner pie and just keep the outer donut, just like other libraries do? (something like RGraph: http://www.rgraph.net/examples/donut.html)

Thank you.

解决方案

You just need to provide the data as an array of two element (key / value) arrays. Specify an innerSize to get the donut style.

So your parameters will contain something like this:

...
data: [["Firefox",6],["MSIE",4],["Chrome",7]],
innerSize: '20%',
...

Here's a jsFiddle of a complete example.

这篇关于Highcharts甜甜圈图表没有内在派?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆