toOptionsJSON method

  1. @override
void toOptionsJSON(
  1. StringBuffer buffer
)
override

Implementation

@override
void toOptionsJSON(StringBuffer buffer) {
  super.toOptionsJSON(buffer);

  if (description != null) {
    buffer.writeAll(['"description":', jsonEncode(description), ','], '');
  }
  if (nullPointValue != null) {
    buffer
        .writeAll(['"nullPointValue":', jsonEncode(nullPointValue), ','], '');
  }
  if (pointAnnotationsDescription != null) {
    buffer.writeAll([
      '"pointAnnotationsDescription":',
      jsonEncode(pointAnnotationsDescription),
      ','
    ], '');
  }
  if (summary != null) {
    buffer.writeAll(['"summary":', summary?.toJSON(), ','], '');
  }
  if (xAxisDescription != null) {
    buffer.writeAll(
        ['"xAxisDescription":', jsonEncode(xAxisDescription), ','], '');
  }
  if (yAxisDescription != null) {
    buffer.writeAll(
        ['"yAxisDescription":', jsonEncode(yAxisDescription), ','], '');
  }
}