Label.fromJson constructor

Label.fromJson(
  1. Object? raw
)

Implementation

factory Label.fromJson(Object? raw) {
  final json = JsonValue.map(raw) ?? const <String, dynamic>{};
  return Label(
    show: JsonValue.boolOrNull(json['show']),
    position: JsonValue.string(json['position']),
    textStyle: json['textStyle'] != null
        ? ChartTextStyle.fromJson(json['textStyle'])
        : null,
  );
}