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
-
arcdiagram(configopt) → {Promise}
-
Create an arc-diagram chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
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 -
dependencywheel(configopt) → {Promise}
-
Create a dependency wheel chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
dumbbell(configopt) → {Promise}
-
Create a dumbbell chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
heatmap(configopt) → {Promise}
-
Create a heatmap chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
histogram(configopt) → {Promise}
-
Create a histogram chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
item(configopt) → {Promise}
-
Create an item chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
line(configopt) → {Highcharts.Chart}
-
Create a line chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
map(configopt) → {Promise}
-
Create a map chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
networkgraph(configopt) → {NetworkGraph}
-
Create a network graph
Parameters:
Name Type Attributes Description config
NetworkGraph~Config <optional>
Returns:
NetworkGraph -
pie(configopt) → {Highcharts.Chart}
-
Create a pie chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
polar(configopt) → {Highcharts.Chart}
-
Create a polar chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
sankey(configopt) → {Promise}
-
Create a sankey chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
scatter(configopt) → {Highcharts.Chart}
-
Create a scatter plot
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Highcharts.Chart -
streamgraph(configopt) → {Promise}
-
Create a streamgraph chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
sunburst(configopt) → {Promise}
-
Create a sunburst chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
treegraph(config) → {Promise}
-
Create a treegraph chart
Parameters:
Name Type Description config
Spyral.Chart~HighchartsConfig Returns:
Promise -
treemap(configopt) → {Promise}
-
Create a treemap chart
Parameters:
Name Type Attributes Description config
Spyral.Chart~HighchartsConfig <optional>
Returns:
Promise -
async, static arcdiagram(targetopt, config) → {Promise}
-
Create an arc-diagram 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:
Promise -
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 -
async, static dependencywheel(targetopt, config) → {Promise}
-
Create a dependency wheel 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:
Promise -
async, static dumbbell(targetopt, config) → {Promise}
-
Create a dumbbell 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:
Promise -
async, static heatmap(targetopt, config) → {Promise}
-
Create a heatmap 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:
Promise -
async, static histogram(targetopt, config) → {Promise}
-
Create a histogram 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:
Promise -
async, static item(targetopt, config) → {Promise}
-
Create an item 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:
Promise -
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 -
async, static map(targetopt, config) → {Promise}
-
Create a map 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:
Promise -
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 pie(targetopt, config) → {Highcharts.Chart}
-
Create a pie 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 polar(targetopt, config) → {Highcharts.Chart}
-
Create a polar 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 -
async, static sankey(targetopt, config) → {Promise}
-
Create a sankey 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:
Promise -
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 -
async, static streamgraph(targetopt, config) → {Promise}
-
Create a streamgraph 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:
Promise -
async, static sunburst(targetopt, config) → {Promise}
-
Create a sunburst 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:
Promise -
async, static treegraph(targetopt, config) → {Promise}
-
Create a treegraph 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:
Promise -
async, static treemap(targetopt, config) → {Promise}
-
Create a treemap 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:
Promise
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>