Here all the methods of the widgets based on the Highchart library are available. Most of them are widgets based on the representation of temporal data.
The list of widgets that use these same methods is:
Methods
# setAccumulated(bool)
Set data accumulation, sum a value with the previous value.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Enable the data accumulation. |
# setDateTimeLabelFormats(obj)
Set the format of the x axis labels.
Avaiable formats are: https://api.highcharts.com/highcharts/xAxis.dateTimeLabelFormats
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object
|
Check the Highcharts documentation. |
# setDefaultFormater(func)
Set the default tooltip format.
The asigned function receives an object with x and y values.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
Function to set default tooltip format. |
# setDefaultFormaterLegend(func)
Set the defautl widget legend format.
The asigned function receives an object with color and name values.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
Function to set default legend format. |
# setDiscardMethod(str)
Discard values using a determined method.
The following values are supported:
- none: Do not apply.
- stdDev: Discard values using standard deviation.
Parameters:
Name | Type | Description |
---|---|---|
str |
String
|
Method to use. |
# setDiscardMode(str)
Discard values using a determined mode.
The following values are supported:
- plotBand
- extremes
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Mode to use. |
# setFixedData(bool)
Fix the data, if it is true data can not be temporarily grouped
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Fix the data. |
# setForceFirstElement(bool)
Set the widget start to first element.
Parameters:
Name | Type | Description |
---|---|---|
bool |
Boolean
|
Enable to start with the first element. |
# setForceLastElement(bool)
Set the widget end to last element.
Parameters:
Name | Type | Description |
---|---|---|
bool |
Boolean
|
Enable to start with the first element. |
# setFormat(str)
Set decimal and thuousands separator.
For example: "##,###,###.00"
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Format string. |
# setGrouped(grouping)
Set the data grouping.
It accepts the moment's get values:
- date
- year
- month
- day
- hour
- minute'
- second
- millisecond
Parameters:
Name | Type | Description |
---|---|---|
grouping |
string
|
Data grouping. |
# setGrouping(string)
Set the aggrupation for the data to add zeros.
Parameters:
Name | Type | Description |
---|---|---|
string |
string
|
function
|
Text with a unit of time of moment.js library or a function that recive a object with from and to key date. |
# setHighlightMaxMin(bool)
Highlights max and min values.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Enbale the highlights. |
# setKeys(key)
Set the keys to show.
Parameters:
Name | Type | Description |
---|---|---|
key |
Array.<string>
|
Keys name. |
# setLegend(bool)
Set the legend visible.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Enable the legend. |
# setOthers(boolopt)
Set the rest of series to a new grouped series called other.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
false | Show grouped series. |
# setProperty(path, val)
Set any settings to the widget. For highchart properties use 'widgetTemplate' as the base of the path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Path to the settings. |
val |
*
|
Value to set. |
# setRegressionLine(str)
Allows add regression series in the chart. This function sets fixData to false as a requirement to display a regression line.
The following values are supported:
- none
- linear
- exponential
- polynomial
- logarithmic
- loess
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Regression type. |
# setSeriesFilter(func)
Filter the series by a custom function or using a number to limit the number of series to display.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
number
|
Callback function or number to filter. the series. |
# setSeriesNames(series)
Set series names to display.
Parameters:
Name | Type | Description |
---|---|---|
series |
Array.<string>
|
Series names. |
# setSeriesOrder(val)
Set the order type for the series.
The following values are supported:
- alphabetic
- total
- Or a function
Parameters:
Name | Type | Description |
---|---|---|
val |
string
|
function
|
Text with the order type or a function to order the series. |
# setSeriesProperties(props)
Set a custom property available in Highchart for the chart.
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<Object>
|
Array the properties. |
# setShowAvgLine(bool)
Show an average line.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Enable the average line. |
# setTimestampKey(tsKey)
Set the column with timespamp key.
Parameters:
Name | Type | Description |
---|---|---|
tsKey |
string
|
Timestamp column name. |
# setTop(numopt)
Set the number of series to be displayed.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
num |
number
|
<optional> |
10 | Number of series. |
# setValue(val)
Set the value to show.
Parameters:
Name | Type | Description |
---|---|---|
val |
string
|
Column name with the value. |
# setValuesParseFunction(func)
Set the parser function for the values.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
The parser function. |
# setXAxisFormatter(func)
Set the label formatter for the X axis.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
Callback JavaScript function to format the label. |
# setXAxisTitle(title)
Set the X axis title.
Parameters:
Name | Type | Description |
---|---|---|
title |
string
|
Title text. |
# setXAxisUnits(arr)
An array determining what time intervals the ticks are allowed to fall on. https://api.highcharts.com/highcharts/xAxis.units
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array
|
Check the Highcharts documentation. |
# setYAxisLabelsFormatter(func)
Set the label formatter for the Y axis.
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
Callback JavaScript function to format the label. |
# setYAxisTitle(title)
Set the Y axis title.
Parameters:
Name | Type | Description |
---|---|---|
title |
string
|
Title text. |
# setYscaleType(str)
Set the Y axis scale.
The following values are supported:
- none
- logarithmic
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Scale type. |