1.1.3 • Published 5 years ago

chartjs-plugin-responsive-downsample v1.1.3

Weekly downloads
82
License
MIT
Repository
github
Last release
5 years ago

chartjs-plugin-responsive-downsample

Build Status

A chart.js plugin to dynamically downsample line chart data depending on the chart resolution. The plugin creates a mipmap-like data structure from line chart data and dynamically choses a downsampled version of the data depending on the chart resolution and x axis scale.

Inspired by: AlbinoDrought/chartjs-plugin-downsample

Installation

$ npm install chartjs-plugin-responsive-downsample

Configuration

{
    options: {
        responsiveDownsample: {
            enabled: true,
            /**
             * Choose aggregation algorithm 'AVG'(Average values) or
             * 'LTTB' (Largest-Triangle-Three-Buckets). Default: 'LTTB'
             */
            aggregationAlgorithm: 'LTTB',
            /**
             * The desired minimal distance between data points in pixels.
             * The plugin downsamples the data and tries to match this threshold.
             * Default: 1 pixel
             */
            desiredDataPointDistance: 1,
            /**
             * The minimal number of data points. The chart data is not downsampled further than
             * this threshold. Default: 100
             */
            minNumPoints: 100,
             /**
              * Cull data to displayed range of x scale. Default: true
              */
            cullData: boolean;
        }
    }
}
1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago