public class DataGrouping extends BaseOption
Data grouping is the concept of sampling the data values into larger blocks in order to ease readability and increase performance of the JavaScript charts. Highcharts Stock by default applies data grouping when the points become closer than a certain pixel value, determined by the groupPixelWidth
option.
If data grouping is applied, the grouping information of grouped points can be read from the Point.dataGroup. If point options other than the data itself are set, for example name
or color
or custom properties, the grouping logic doesn't know how to group it. In this case the options of the first point instance are copied over to the group point. This can be altered through a custom approximation
callback function.
Modifier and Type | Field and Description |
---|---|
static DataGrouping |
NULL |
Constructor and Description |
---|
DataGrouping() |
Modifier and Type | Method and Description |
---|---|
List<Unit> |
getUnits()
An array determining what time intervals the data is allowed to be grouped to.
|
DataGrouping |
setUnits(List<Unit> units)
An array determining what time intervals the data is allowed to be grouped to.
|
set_hcNulledOption
public static final DataGrouping NULL
public List<Unit> getUnits()
An array determining what time intervals the data is allowed to be grouped to. Each array item is an array where the first value is the time unit and the second value another array of allowed multiples.
Defaults to:
units: [[ 'millisecond', // unit name [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples ], [ 'second', [1, 2, 5, 10, 15, 30] ], [ 'minute', [1, 2, 5, 10, 15, 30] ], [ 'hour', [1, 2, 3, 4, 6, 8, 12] ], [ 'day', [1] ], [ 'week', [1] ], [ 'month', [1, 3, 6] ], [ 'year', null ]]
public DataGrouping setUnits(List<Unit> units)
An array determining what time intervals the data is allowed to be grouped to. Each array item is an array where the first value is the time unit and the second value another array of allowed multiples.
Defaults to:
units: [[ 'millisecond', // unit name [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples ], [ 'second', [1, 2, 5, 10, 15, 30] ], [ 'minute', [1, 2, 5, 10, 15, 30] ], [ 'hour', [1, 2, 3, 4, 6, 8, 12] ], [ 'day', [1] ], [ 'week', [1] ], [ 'month', [1, 3, 6] ], [ 'year', null ]]
units
- the value for the units optionCopyright © 2022. All rights reserved.