youcef92 / flotr

Automatically exported from code.google.com/p/flotr
0 stars 0 forks source link

can't see small values in pie chart #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use pie chart with values of 200, 2, 1, 1, 2
2. see the graph generated

What is the expected output? What do you see instead?
The pourcentage values are printed in the pie (actually, outside) but when 
there are 2 or more small values, they are printed in the same place which is 
unreadable. may be not displaying small values is a solution.

What version of the product are you using? On what operating system?
Trunk checked out 3-4 weeks ago

Please provide any additional information below.
ask me if you want more informations, I could try to produce something but I 
would like your advices first.

Original issue reported on code.google.com by mattb...@gmail.com on 24 Jun 2010 at 12:03

GoogleCodeExporter commented 8 years ago
You can achieve this by adding a labelFormatter function to the pie options :

pie: {
  show: true,
  labelFormatter: function(e){
    return (e.fraction > 0.01 ? (e.fraction * 100) + "%" : "");
  }
}

Original comment by fabien.menager on 16 Jul 2010 at 6:04