leonardoeloy / flot-valuelabels

Improvement of Flot Value Labels plugin
http://wiki.github.com/leonardoeloy/flot-valuelabels/
26 stars 40 forks source link

some numbers do not show #11

Open perryn opened 11 years ago

perryn commented 11 years ago

I had an issue where some of my numbers did not show

It turned out to be the line

if (val!=last_val || i==series.data.length-1) {

which appears to skip number that have the same number as the previous processed value. However the numbers are not presented in graph order, so I'm not sure what it is trying to achieve.

anyway I replaced this line with

   if(true) {

and it worked for my use case..

thejae commented 11 years ago

Am having the same problem but i can't find the line you referenced to in the latest version.

---- Edit Found it. Fixed it by doing the following.

--------[ FIND ]-------------

          if (val != last_val || i == series.data.length - 1) {

---[ REPLACE WITH ]----

          if (val || i == series.data.length - 1) {
pete01 commented 10 years ago

There is an option in the latest version of the valueLabels plugin for this now called 'hideSame'. Setting it to false will show repeating values.

{
    hideSame: false
}