Data class

Annotations
  • @anonymous
  • @JS()

Constructors

Data()
factory

Properties

axes ↔ dynamic
Set y axis the data related to. y and y2 can be used.
read / write
classes ↔ dynamic
Set custom data class. If this option is specified, the element g for the data has an additional class that has the prefix c3-target- (e.g. c3-target-additional-data1-class).
read / write
colors ↔ dynamic
Set color for each data.
read / write
columns ↔ List<List>
Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
read / write
empty ↔ dynamic
Set text displayed when empty data.
read / write
groups ↔ List<List<String>>
Set groups for the data for stacking.
read / write
hide ↔ dynamic
Hide each data when the chart appears. If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.
read / write
json ↔ dynamic
Parse a JSON object for data.
read / write
keys ↔ dynamic
Choose which JSON object keys correspond to desired data.
read / write
labels ↔ dynamic
Show labels on each data points or set formatter function for data labels. The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are: [...]
read / write
mimeType ↔ String
Used if loading JSON via data.url
read / write
names ↔ dynamic
xLocaltime?: any; xSort?: any; Set custom data name.
read / write
order ↔ dynamic
Define the order of the data. This option changes the order of stacking the data and pieces of pie/donut. If null specified, it will be the order the data loaded. If function specified, it will be used to sort the data and it will recieve the data as argument. Available Values: desc, asc, function (data1, data2) { ... }, null
read / write
regions ↔ dynamic
Define regions for each data. The values must be an array for each data and it should include an object that has start, end, style. If start is not set, the start will be the first data point. If end is not set, the end will be the last data point. Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
read / write
rows ↔ List<List>
Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
read / write
selection ↔ dynamic
read / write
type ↔ String
Set chart type at once. If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types. Available Values: line, spline, step, area, area-spline, area-step, bar, scatter, pie, donut, gauge
read / write
types ↔ dynamic
Set chart type for each data. This setting overwrites data.type setting.
read / write
unload ↔ dynamic
read / write
url ↔ String
Load a CSV or JSON file from a URL. Note that this will not work if loading via the "file://" protocol as most browsers with block XMLHTTPRequests.
read / write
x ↔ String
Specify the key of x values in the data. We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.
read / write
xFormat ↔ String
Set a format to parse string specifed as x. Default is %Y-%m-%d
read / write
xs ↔ dynamic
Specify the keys of the x values for each data. This option can be used if we want to show the data that has different x values.
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

color(String color, dynamic d) → dynamic
Set color converter function. This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
onclick(dynamic d, dynamic element) → void
Set a callback for click event on each data point. This callback will be called when each data point clicked and will receive d and element as the arguments. [...]
onmouseout(dynamic d, [ dynamic element ]) → void
Set a callback for mouseout event on each data point. This callback will be called when mouse cursor moves out each data point and will receive d as the argument. [...]
onmouseover(dynamic d, [ dynamic element ]) → void
Set a callback for mouseover event on each data point. This callback will be called when mouse cursor moves onto each data point and will receive d as the argument. [...]
onselected(dynamic d, [ dynamic element ]) → void
onunselected(dynamic d, [ dynamic element ]) → void
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