GDataSource
Properties
Section titled “Properties”dataList
Section titled “dataList”type: List<GData>
required: true
The list of data to be displayed in the chart. this can be updated after the chart is created.
seriesProperties
Section titled “seriesProperties”type: List<GDataSeriesProperty>
required: true
The list of series properties for the data source. this is used to define the properties of each series in the chart.
pointValueFormater
Section titled “pointValueFormater”type: String Function(int point, int pointValue)
required: false
default: defaultPointValueFormater
The default formater for the point value labels on X axis and tooltips.
seriesValueFormater
Section titled “seriesValueFormater”type: String Function(double seriesValue, int precision)
required: false
default: defaultSeriesValueFormater
The default formater for the series value labels on Y axes and tooltips.
Methods
Section titled “Methods”pointValue
Section titled “pointValue”type: int
required: true
The value of the point on X axis. usually it is milliseconds since epoch.
seriesValues
Section titled “seriesValues”type: List<double>
required: true
The list of values for each series in the data source.
Thel length should match the length of seriesProperties in the data source.
GDataSeriesProperty
Section titled “GDataSeriesProperty”type: String
required: true
The key of the data series property. data in dataList can be accessed by this key.
type: String
required: true
The label of the data series property. this is mainly used to display the label on tooltips.
precision
Section titled “precision”type: int
required: false
default: 2
The decimal precision of the series value.
valueFormater
Section titled “valueFormater”type: String Function(double seriesValue)?
required: false
default: null
The formater for the series value. if not provided, the default formater will be used.