Methods
(function) data()
- Source:
(method) copyToClipboard()
Copies the chart as an image to clipboard.
- Source:
(method) download()
Downloads the chart as an image.
- Source:
(method) showChart(chartType, data, stat, labelField, valueField, seriesField, title, unit, xScale, xyChart, trendLine, secondDerivative, numerical, feature, annotationAxis, help, titleToShow, persistent, pointRadius)
Displays a chart based on the provided parameters (as objects in "this").
Parameters:
Name | Type | Description |
---|---|---|
chartType |
string | The type of the chart. Valid values are 'line', 'bar', 'radar', 'doughnut', 'polarArea', 'bubble' and 'scatter'. Default is 'bar'. |
data |
object | The data source for the chart. Can be an array of objects or an object with x and y arrays. |
stat |
object | The statistics for the chart. Includes min, max, mean, median and stdev. If not provided, it will be calculated. |
labelField |
string | The field representing the label in the data source. |
valueField |
string | The field representing the value in the data source. Can be an array of fields, in which case the chart will display multiple series. |
seriesField |
string | The field representing the series in the data source. |
title |
string | The title of the chart. |
unit |
string | The unit of measurement for the chart. |
xScale |
string | The scale type of the x-axis. Valid values are 'linear','time' and 'category'. Default is 'linear'. |
xyChart |
boolean | Whether the chart is an XY chart (expects that data object contains x and y arrays). Default is false. |
trendLine |
boolean | Whether to display a trend line. Default is false. |
secondDerivative |
boolean | Whether to display the second derivative. Default is false. |
numerical |
boolean | Whether the values are numerical. Default is true. |
feature |
boolean | The feature to display on the chart. Default is null. |
annotationAxis |
string | The axis to display annotations on. Default is 'y'. |
help |
string | The help text to display. |
titleToShow |
string | The title to show on the help button. |
persistent |
boolean | Whether the dialog is persistent. |
pointRadius |
number | Point radius for the chart. Default is 1. |
(function) filter()
(method) xLabel(x) → {string}
Returns the x-axis label for the chart. If the chart is a time chart, it parses the time value using the parseTime method. Otherwise, it returns the original x value.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The x value for the chart. |
- Source:
Returns:
The x-axis label for the chart.
- Type
- string
(function) mounted()
- Source: