new Chart(targetopt, data)
Construct a new Chart class
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target |
String | Element |
<optional> |
An element or ID to use as the chart's target. If not specified, one will be created. |
data |
Array | An array of data to visualize. |
Methods
-
bar(configopt) → {Highcharts.Chart}
-
Create a bar chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
column(configopt) → {Highcharts.Chart}
-
Create a column chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
create(targetopt, config) → {Highcharts.Chart}
-
Create a new chart. See Highcharts API for full set of config options.
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
line(configopt) → {Highcharts.Chart}
-
Create a line chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
networkgraph(configopt) → {NetworkGraph}
-
Create a network graph
Parameters:
Name Type Attributes Description config
NetworkGraph~Config <optional>
Returns:
NetworkGraph -
scatter(configopt) → {Highcharts.Chart}
-
Create a scatter plot
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
static bar(targetopt, config) → {Highcharts.Chart}
-
Create a bar chart
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
static column(targetopt, config) → {Highcharts.Chart}
-
Create a column chart
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
static create(targetopt, config) → {Highcharts.Chart}
-
Create a new chart. See Highcharts API for full set of config options.
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
static line(targetopt, config) → {Highcharts.Chart}
-
Create a line chart
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
static networkgraph(targetopt, config) → {NetworkGraph}
-
Create a network graph
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
NetworkGraph~Config Returns:
NetworkGraph -
static scatter(targetopt, config) → {Highcharts.Chart}
-
Create a scatter plot
Parameters:
Name Type Attributes Description target
String | Element <optional>
An element or ID to use as the chart's target. If not specified, one will be created.
config
Spyral.Chart~HighchartsConfig Returns:
Highcharts.Chart -
static setSeriesData(config, data)
-
Add the provided data to the config as a series
Parameters:
Name Type Description config
Spyral.Chart~HighchartsConfig data
Array
Type Definitions
-
HighchartsConfig
-
The Highcharts config object
Properties:
Name Type Description title
string | object subtitle
string | object credits
Object xAxis
Object yAxis
Object chart
Object series
Array.<Spyral.Chart~HighchartsSeriesConfig> plotOptions
Object -
HighchartsSeriesConfig
-
The series config object
Properties:
Name Type Attributes Description data
Array name
string <optional>