sveinn-steinarsson / flot-downsample

Downsample plugin for Flot charts.
286 stars 39 forks source link

do not modify data if in a pie chart #2

Closed NotSqrt closed 10 years ago

NotSqrt commented 10 years ago

There's no need to call largestTriangleThreeBuckets if we are in a pie chart, but the plugin might be loaded for other graphs on the same page...

sveinn-steinarsson commented 10 years ago

You bring up an excellent point. Of course people could be using many different plot types on the same page and the downsample plugin might fail (since it requires x and y components). I think it is more sensible to simply have the downsample plugin check if the data is on a valid data format for downsampling. Until then, it is easy to disable downsampling for certain plots. See: http://jsfiddle.net/sveinn_st/s5x58/

NotSqrt commented 10 years ago

Didn't think of that ! thanks.