Chart
A chart is a graphical representation for data visualization. A chart can represent tabular numeric data, functions, as well as many other data points.
Props:
Name | Type | Description | Required | Default |
---|---|---|---|---|
|
| Title of the chart. Appears above the chart. | ||
|
| Sets the height-to-width ratio of the chart. The width of the chart is automatically set to 100% of the width of the Whisper card and popup window so the height is defined as a ratio of the width (rather than as an absolute value). |
| |
|
| Set the total number of horizontal lines showing on the grid. |
| |
|
| Show horizontal lines on the grid. |
| |
|
| Set the margins around the chart. This is especially useful for widening the left or bottom margins to accommodate larger tick mark labels. The units are expressed in pixels. |
| |
|
| An array of the series that will appear in the chart. Up to 10 series may be provided. | ||
|
| If true, the chart will only appear in the popup window and not in the Whisper itself. |
| |
|
| If true, show a tooltip when hovering over the chart, which displays the nearest x value and the corresponding y values for all series. |
| |
|
| Show vertical lines on the grid. |
| |
|
| Set the total number of vertical lines showing on the grid. |
| |
|
| Show the x-axis. |
| |
|
| Set the x-axis label. | ||
|
| Sets the right and left (inside the x-axis) padding as a percentage of the chart width. Half of the provided value is applied to each side. |
| |
|
| Scales determine how the data should be interpreted. The three scales available are linear, ordinal, and time. Linear: a continuous scale that works with numbers. Ordinal: a discrete, ordered set that works with numbers or strings. For example, the x values could contain the months of the year in string form. Time: used for time series. x values will be interpreted as unix time. |
| |
|
| Total number of tick marks on the x-axis. |
| |
|
| Set the angle of the tick mark labels on the x-axis in terms of degrees (positive or negative). |
| |
|
| Show the y-axis |
| |
|
| Set the y-axis label | ||
|
| Sets the right and left (inside the y-axis) padding as a percentage of the chart width. Half of the provided value is applied to each side. |
| |
|
| Scales determine how the data should be interpreted. The three scales available are linear, ordinal, and time. Linear: a continuous scale that works with numbers. Ordinal: a discrete, ordered set that works with numbers or strings. For example, the y values could contain the months of the year in string form. Time: used for time series. Y values will be interpreted as unix time. |
| |
|
| Set the angle of the tick mark labels on the y-axis in terms of degrees (positive or negative). |
| |
|
| Total number of tick marks on the y-axis. |
| |
Please note: Types marked with + are Olive LDK enums
Examples:
Area Graph:
Bar Graph:
Line Graph:
Mark Graph:
Four Series Graph:
Please note: The Chart Component is a beta feature.
Last updated