饼图与不同的填充百分比

时间:2022-12-03 17:33:19

I want to ask something about jquery pie plots or pie charts. I want to make piechart/wheel where the fill percentage on each slice is not 100% like this one:

我想问一些关于jquery饼图或饼图的事情。我想制作饼图/滚轮,其中每个切片上的填充百分比不是100%像这样:

http://i1191.photobucket.com/albums/z462/rikides/a.png

http://i1191.photobucket.com/albums/z462/rikides/a.png

I already made the basic pie chart using GD pie chart but I dont really have any idea on how to do it or where to start configuring. Can someone help me please? Im stuck on this problem for 1 week now and I have tried googling about this but I can not find any similar tutorials.

我已经使用GD饼图制作了基本的饼图,但我真的不知道如何做或者从哪里开始配置。有人能帮助我吗?我现在坚持这个问题1周了,我已经尝试了谷歌搜索但我找不到任何类似的教程。

EDIT: I also tried using JP Graph but what I have made so far is only the basic pie chart, please let me know if its possible using JP Graph. Thank you.

编辑:我也试过使用JP Graph,但到目前为止我所做的只是基本的饼图,如果有可能使用JP Graph,请告诉我。谢谢。

4 个解决方案

#1


1  

Unfortunately, Highcharts, Google Chart Tools, wijmo and RGraph do not support individual diameters for each slice. Let me know if somebody knows about an API with that capability.

不幸的是,Highcharts,Google Chart Tools,wijmo和RGraph不支持每个切片的单个直径。如果有人知道具有该功能的API,请告诉我。

EDIT: But if you are already familiar with GD and have created a basic pie, you probably just have to change the $width parameter for each slice in method imagefilledarc.

编辑:但是如果你已经熟悉GD并创建了一个基本派,你可能只需要在方法imagefilledarc中为每个切片更改$ width参数。

#2


0  

Like you I search something like that.

像你一样,我搜索类似的东西。

I am using http://www.highcharts.com/demo/pie-donut and I divide the outside parts in 2, the "filled value" and the "non filled value".

我正在使用http://www.highcharts.com/demo/pie-donut,我将外部部分分为2,“填充值”和“非填充值”。

#3


0  

There is option in google charts for this. You have option to explode slices separately like this:

谷歌图表中有选项可供选择。您可以选择单独分解切片,如下所示:

slices: {  
     1: {offset: 0.2},
     3: {offset: 0.3}                  
  }

and if you put offset to negative values it will look like this: pie chart

如果你将偏移量设置为负值,它将如下所示:饼图

code for this looks something like:

代码看起来像这样:

slices: {  
 1: {offset: -0.3}                  

}

}

#4


-1  

If you have exp in jquery, then i suggest you to go for Highcharts a jquery based charts.

如果你有jquery中的exp,那么我建议你去Highcharts一个基于jquery的图表。

#1


1  

Unfortunately, Highcharts, Google Chart Tools, wijmo and RGraph do not support individual diameters for each slice. Let me know if somebody knows about an API with that capability.

不幸的是,Highcharts,Google Chart Tools,wijmo和RGraph不支持每个切片的单个直径。如果有人知道具有该功能的API,请告诉我。

EDIT: But if you are already familiar with GD and have created a basic pie, you probably just have to change the $width parameter for each slice in method imagefilledarc.

编辑:但是如果你已经熟悉GD并创建了一个基本派,你可能只需要在方法imagefilledarc中为每个切片更改$ width参数。

#2


0  

Like you I search something like that.

像你一样,我搜索类似的东西。

I am using http://www.highcharts.com/demo/pie-donut and I divide the outside parts in 2, the "filled value" and the "non filled value".

我正在使用http://www.highcharts.com/demo/pie-donut,我将外部部分分为2,“填充值”和“非填充值”。

#3


0  

There is option in google charts for this. You have option to explode slices separately like this:

谷歌图表中有选项可供选择。您可以选择单独分解切片,如下所示:

slices: {  
     1: {offset: 0.2},
     3: {offset: 0.3}                  
  }

and if you put offset to negative values it will look like this: pie chart

如果你将偏移量设置为负值,它将如下所示:饼图

code for this looks something like:

代码看起来像这样:

slices: {  
 1: {offset: -0.3}                  

}

}

#4


-1  

If you have exp in jquery, then i suggest you to go for Highcharts a jquery based charts.

如果你有jquery中的exp,那么我建议你去Highcharts一个基于jquery的图表。