Reputation: 1879
I am trying to create a pie chart in which the absolute values are displayed rather than the percentages. I do this using:
"textinfo": "value"
In that case, however, how do I control the number of decimals?
For example, when my values are 0.111111, 0.22222 and 0.0333, I want to show in my graph the numbers 0.1, 0.2 and 0.0.
One thing I tried was to actually format the number before providing them to the graph. However, in that case, the graph is only showing two sections (one for 0.1 and one for 0.2) and it is not showing the part that has a value of 0.0 (which makes sense, but is not desired).
So this is what I would like
But this is what I get
Upvotes: 1
Views: 1565
Reputation: 3905
In AnyChart you can use string tokens to format values. Here is the sample. You can learn more about string tokens in the documentation article.
Upvotes: 1