Histogram
Displays a simple bar histogram based upon an array of data objects passed in the data config.
Configs
87
Configs
87Common
Other
An array of data objects used to drive the histogram. The property/properties used are defined in the series option.
A Function which returns a CSS class name to add to a rectangle element representing a "bar"-type series value. The following parameters are passed:
| Parameter | Type | Description |
|---|---|---|
series | HistogramSeries | The series being rendered |
domConfig | DomConfig | The rectangle element configuration object |
datum | Object | The datum being rendered |
index | Number | The index of the datum being rendered |
CSS class name of the rectangle element
A Function which if provided should return a DOM configuration object for a bar
(a RECT element representing a single "bar"-type value).
The function accepts a default prepared DOM configuration
in an argument which then can be processed and returned.
The following parameters are passed to the function:
| Parameter | Type | Description |
|---|---|---|
series | HistogramSeries | The series being rendered |
domConfig | DomConfig | The rectangle DOM configuration object |
datum | Object | The datum being rendered |
index | Number | The index of the datum being rendered |
Resulting DOM configuration object. If no value returned the bar is not displayed.
A Function which returns the text to render inside a bar. The following parameters are passed:
| Parameter | Type | Description |
|---|---|---|
datum | Object | The datum being rendered |
index | Number | The index of the datum being rendered |
series | HistogramSeries | The series (provided if singleTextForAllBars
is |
Text to render in the bar.
A Function which if provided returns DOM configuration for a bar text
(a TEXT element accompanying a single "bar"-type value).
The function accepts a default prepared DOM configuration
in the first argument which then can be processed and returned.
The following parameters are passed to the function:
| Parameter | Type | Description |
|---|---|---|
domConfig | DomConfig | The text element DOM configuration object |
datum | Object | The datum being rendered |
index | Number | The index of the datum being rendered |
series | HistogramSeries | The series (provided if singleTextForAllBars
is |
Resulting DOM configuration object. If no value returned the text is not displayed.
A Function which returns the tooltip text to display when hovering a bar. The following parameters are passed:
| Parameter | Type | Description |
|---|---|---|
series | HistogramSeries | The series being rendered |
domConfig | DomConfig | The rectangle configuration object |
datum | Object | The datum being rendered |
index | Number | The index of the datum being rendered |
Tip for the bar.
A Function which returns a CSS class name to add to a path element
built for an outline type series.
The following parameters are passed:
| Parameter | Type | Description |
|---|---|---|
series | HistogramSeries | The series being rendered |
data | Object[] | The series data |
CSS class name of the path element
A Function which if provided should return a DOM configuration object for
a path element built for an outline type series.
The function accepts a default prepared DOM configuration
in an argument which then can be processed and returned.
The following parameters are passed to the function:
| Parameter | Type | Description |
|---|---|---|
series | HistogramSeries | The series being rendered |
domConfig | DomConfig | The |
data | Object[] | The series data |
Resulting DOM configuration object. If no value returned the path is not displayed.
By default, all bars are rendered, even those with zero height. Configure this as true
to omit zero height bars.
Object enumerating data series for the histogram. The object keys are treated as series identifiers and values are objects that can contain the following properties:
typeA String, either'bar'or'outline'fieldA String, the name of the property to use from the data objects in the data option. If the value is omitted the series identifier is used as the property name.
By default, the histogram calls getBarText once per each datum.
So the function is supposed to output all the series values the way it needs.
Configure this as false to call the function for each series value
if you need to display the values separately or having different styling.
By default, the bars are scaled based upon the detected max value across all the series. A specific top value to represent the 100% height may be configured.
The values to represent in bar form.
DOM
Float & align
Layout
Misc
Scrolling
Properties
65
Properties
65Class hierarchy
CSS
DOM
Layout
Misc
Functions
58
Functions
58Configuration
Events
Misc
Other
Widget hierarchy
Events
14
Events
14Event handlers
14
Event handlers
14Typedefs
7
Typedefs
7An object representing a series settings.
| Parameter | Type | Description |
|---|---|---|
type | bar | outline | The series type specifying how it is rendered, as solid bars or outlines. |
field | String | The name of the property to read value from. By default, this matches the series identifier. |
stretch | Boolean | Provide |
id | String | The series identifier. When configuring the series this value is automatically taken from
the key name the series is provided. In the example code below, the series |