frappe / charts

Simple, responsive, modern SVG Charts with zero dependencies
https://frappe.io/charts
MIT License
14.9k stars 716 forks source link

Donut chart doesn't work properly when values have big difference #349

Open kaguya3222 opened 3 years ago

kaguya3222 commented 3 years ago

Expected Behaviour

In my example, the donut chart should render the first value, that is 26, as ~0.1% and the second value, that is 40660058, as ~99.99%

Actual Behaviour

In my example, the donut chart renders the first value, that is 26, as 0% and the second value, that is 40660058, as 100%. Thus, the area of the second value superimposed on the area of the first value.

Steps to Reproduce: Create the chart with type 'donut' and set the datasets like `[{ values: [26, 40660058]}]

Screenshot: https://imgur.com/a/94s0mH6

Frappé Charts version: 1.5.2 Codepen / Codesandbox: https://codesandbox.io/s/distracted-carson-11gzw?file=/src/index.js