SeriesPoint.fromMap constructor

SeriesPoint.fromMap(
  1. Map<String, dynamic> map, {
  2. String mapXKey = 'x',
  3. String mapYKey = 'y',
  4. String? mapLabelKey,
})

Implementation

factory SeriesPoint.fromMap(
  Map<String, dynamic> map, {
  String mapXKey = 'x',
  String mapYKey = 'y',
  String? mapLabelKey,
}) {
  return SeriesPoint(
    x: (map[mapXKey] as num).toDouble(),
    y: (map[mapYKey] as num).toDouble(),
    label: mapLabelKey != null ? map[mapLabelKey]?.toString() : null,
  );
}