ChartAPI class

Annotations
  • @anonymous
  • @JS()

Constructors

ChartAPI()

Properties

axis ↔ dynamic
read / write
data ↔ dynamic
read / write
legend ↔ dynamic
read / write
regions ↔ dynamic
read / write
xgrids GridOperations
read / write
ygrids GridOperations
read / write
zoom ↔ dynamic
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

categories([List<String> categories ]) → List<String>
Get and set the categories
category(num index, [ String category ]) → String
Gets and sets the value a category
color(String targetId) → String
Get the color for the specified targetId
defocus([dynamic targetIds ]) → void
This API fades out specified targets and reverts the others. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.
destroy() → void
Reset the chart object and remove element and events completely.
flow(dynamic args) → void
Flow data to the chart. By this API, you can append new data points to the chart. If json, rows and columns given, the data will be loaded. If data that has the same target id is given, the chart will be appended. Otherwise, new target will be added. One of these is required when calling. If json specified, keys is required as well as data.json If to is given, the lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points. If length is given, the lower x edge will move by the number of this argument. If duration is given, the duration of the transition will be specified value. If not given, transition.duration will be used as default. If done is given, the specified function will be called when flow ends.
flush() → void
Force to redraw.
focus([dynamic targetIds ]) → void
This API highlights specified targets and fade out the others. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.
groups(List<List<String>> groups) → void
Update groups for the targets.
hide([dynamic targetIds dynamic options ]) → void
This API hides specified targets. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be hidden. If withLegend is set true, legend will be hidden together with the specified data.
load(dynamic args) → void
Load data to the chart. If url, json, rows and columns given, the data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added. If classes given, the classes specifed by data.classes will be updated. classes must be Object that has target id as keys. If categories given, the categories specifed by axis.x.categories or data.x will be updated. categories must be Array. If axes given, the axes specifed by data.axes will be updated. axes must be Object that has target id as keys. If colors given, the colors specifed by data.colors will be updated. colors must be Object that has target id as keys. If type or types given, the type of targets will be updated. type must be String and types must be Object. If unload given, data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If done given, the specified function will be called after data loded. NOTE: unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation. NOTE: done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
resize([dynamic size ]) → void
Resize the chart. If no size is specified it will resize to fit.
revert([dynamic targetIds ]) → void
This API reverts specified targets. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.
select([List<String> ids, List<num> indices, bool resetOthers ]) → void
Change data point state to selected. By this API, you can select data points. To use this API, data.selection.enabled needs to be set true.
selected([String targetId ]) Data
Get selected data points. By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.
show([dynamic targetIds dynamic options ]) → void
This API shows specified targets. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be shown. If withLegend is set true, legend will be shown together with the specified data.
toggle([dynamic targetIds dynamic options ]) → void
This API toggles (shows or hides) specified targets. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. If withLegend is set true, legend will be toggled together with the specified data.
transform(String type, [ dynamic targetIds ]) → void
Change the type of the chart.
unload([TargetIds targetIds, dynamic done() ]) → dynamic
Unload data to the chart. You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded. If done given, the specified function will be called after data loded. NOTE: If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation. NOTE: done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
unselect([List<String> ids, List<num> indices ]) → void
Change data point state to unselected. By this API, you can unselect data points. To use this API, data.selection.enabled needs to be set true.
unzoom() → void
Unzoom to the original domain.
x([List x ]) → List
Get and set x values for the chart.
xs([dynamic xs ]) → dynamic
Get and set x values for the chart.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited