1

I am trying to built doughnut chart but, it's not working with this data:

    {  y: 12749, legendText:"PS 3", indexLabel: "PlayStation 3" },
    {  y: 103, legendText:"Wii", indexLabel: "Wii" },
    {  y: 1, legendText:"360",exploded: true, indexLabel: "Xbox 360" }, 
    {  y: 30, legendText:"DS" , indexLabel: "Nintendo DS"},

However, it is working fine with this:

    {  y: 129, legendText:"PS 3", indexLabel: "PlayStation 3" },
    {  y: 103, legendText:"Wii", indexLabel: "Wii" },
    {  y: 100, legendText:"360",exploded: true, indexLabel: "Xbox 360" }, 
    {  y: 30, legendText:"DS" , indexLabel: "Nintendo DS"},

Any suggestions for this problem, I know in google charts we can use logscale but I am not sure about this one.

7
  • How do you mean, not working? No chart? Console errors? Nov 17, 2015 at 16:12
  • when i put the small and large data, no chart appear but when i put normal data i got the chart Nov 17, 2015 at 16:15
  • no, i think it is just the data problem Nov 17, 2015 at 16:27
  • 1
    Seems like a bug in their implementation? If you play with the demo on their own page: canvasjs.com/docs/charts/chart-types/html5-doughnut-chart and change the top value to 100, then it breaks just as you describe Nov 17, 2015 at 16:33
  • So, anything can be done to solve this issue?? Nov 17, 2015 at 16:40

1 Answer 1

0

I was able to track down what I think is the issue in canvasjs.min.js and fix it. Looks like an argument was missing from one of their functions. This can be fixed with a simple find and replace within canvasja.min.js. Search function g(a,b) and replace it with function g(a,b,recursionCount). I was able to get your data working with this change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.