nteract / semiotic

A data visualization framework combining React & D3
https://semioticv1.nteract.io/
Other
2.43k stars 133 forks source link

donut and rose display wrong percentage #534

Closed BigFatDog closed 3 years ago

BigFatDog commented 3 years ago

General

donut and rose display wrong percentage while pie is correct, with the same data.

Re-produce: I directly use sample code from donut, pie and rose, and try with the following data:

[{x: 0, y: 150}, {x:1, y: 115698}]

the corresponding config is: oAccessor={"x"} rAccessor={"y"}

Version 1.20.5 and 2.0.0-rc5

Please see attached images

BigFatDog commented 3 years ago

pie: correct

截屏2020-09-26 上午11 23 43

donut: incorrect

截屏2020-09-26 上午11 25 43

rose: incorrect

截屏2020-09-26 上午11 33 30
emeeks commented 3 years ago

Well that's not good. Will take a look at it.

emeeks commented 3 years ago

This is fixed in 2.0.0-rc.12. The problem was that it wasn't handling ordinal values created with numbers (in your case the x values).

BigFatDog commented 3 years ago

Thank you.