Skip to content

sergachev/flot-downsample

 
 

Repository files navigation

flot-downsample: Downsample plugin for Flot

This plugin for Flot charts downsamples data before rendering the chart. The purpose is to try retain the visual characteristics of the original line using considerably fewer data points. The algorithm (called Largest-Triangle-Three-Buckets) used in this plugin is described in a Master's thesis (see hdl.handle.net/1946/15343) in Computer Science by Sveinn Steinarsson at the University of Iceland. The topic of the thesis is how to downsample time series for visual representation and was initially suggested by DataMarket. JavaScript optimization was done with the help of Borgar Þorsteinsson.

Demo

Demo can viewed at flot.base.is.

Additional demo concerning chart resizing is also available at flot.base.is/demo-resize

Usage

series: {
  downsample: {
    threshold: 1000 // 0 disables downsampling for this series.
  }
}

License

flot-downsample is released under the terms of the MIT License.

About

Downsample plugin for Flot charts.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 79.5%
  • CSS 20.5%