mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
* improve clarity of docs by showing party qualified names in table and place of the namespace above * add missing line * remove partial qualified names, made some tables unusable and made it overall bit unclear. Added the namespace above each table * fix sidebars tabs to spaces * implement kurkles feedback
1.4 KiB
1.4 KiB
| title |
|---|
| Data Decimation |
The decimation plugin can be used with line charts to automatically decimate data at the start of the chart lifecycle. Before enabling this plugin, review the requirements to ensure that it will work with the chart you want to create.
Configuration Options
Namespace: options.plugins.decimation, the global options for the plugin are defined in Chart.defaults.plugins.decimation.
| Name | Type | Default | Description |
|---|---|---|---|
enabled |
boolean |
true |
Is decimation enabled? |
algorithm |
string |
'min-max' |
Decimation algorithm to use. See the more... |
Decimation Algorithms
Decimation algorithm to use for data. Options are:
'min-max'
Min/Max Decimation
Min/max decimation will preserve peaks in your data but could require up to 4 points for each pixel. This type of decimation would work well for a very noisy signal where you need to see data peaks.
Requirements
To use the decimation plugin, the following requirements must be met:
- The dataset must have an
indexAxisof'x' - The dataset must be a line
- The X axis for the dataset must be either a
'linear'or'time'type axis - The dataset object must be mutable. The plugin stores the original data as
dataset._dataand then defines a newdataproperty on the dataset.