0

when I try to display only one dataset in a doughnut (like below), my computer displays this chart properly, but (not only) my smartphone doesn't display this chart properly (it displays nothing, but when I click the area, where the chart should be, a tooltip is displayed). For correct view it needs at least two datasets. Do you know what's wrong?

var myData = [
    {
      value: 300,
      color:"#F7464A",
      highlight: "#FF5A5E",
      label: "Red"
    }
]
KRiSTiN
  • 429
  • 1
  • 4
  • 11
  • Can you just include a second dataset with a value of zero? – c01gat3 Jun 28 '15 at 22:58
  • There's a problem with including zero values, but I managed to add very small numbers (eg. 1/1,000,000) and it works. – KRiSTiN Jun 29 '15 at 11:45
  • @KRiSTiN - which version of Chart.js are you using? And which smartphone? It works ok on mine. – potatopeelings Jun 29 '15 at 11:45
  • Also, try this `setTimeout(function () { myDoughnutChart.render(); }, 100)` as an alternative workaround – potatopeelings Jun 29 '15 at 11:47
  • Hey, potatopeelings again. :) I managed to do it. But I think you could help me with that (comments) - http://stackoverflow.com/questions/31092489/chart-js-draw-horizontal-line/31092938 - couldn't you, please? – KRiSTiN Jun 29 '15 at 14:16

0 Answers0