toOptionsJSON method

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

Implementation

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

  if (accessibility != null) {
    buffer.writeAll(['"accessibility":', accessibility?.toJSON(), ','], '');
  }
  if (adaptToUpdatedData != null) {
    buffer.writeAll(['"adaptToUpdatedData":', adaptToUpdatedData, ','], '');
  }
  if (baseSeries != null) {
    buffer.writeAll(['"baseSeries":', jsonEncode(baseSeries), ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (handles != null) {
    buffer.writeAll(['"handles":', handles?.toJSON(), ','], '');
  }
  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (margin != null) {
    buffer.writeAll(['"margin":', margin, ','], '');
  }
  if (maskFill != null) {
    buffer.write('"maskFill":{');
    for (var item in maskFill!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (maskInside != null) {
    buffer.writeAll(['"maskInside":', maskInside, ','], '');
  }
  if (opposite != null) {
    buffer.writeAll(['"opposite":', opposite, ','], '');
  }
  if (outlineColor != null) {
    buffer.writeAll(['"outlineColor":', jsonEncode(outlineColor), ','], '');
  }
  if (outlineWidth != null) {
    buffer.writeAll(['"outlineWidth":', outlineWidth, ','], '');
  }
  if (series != null) {
    buffer.write('"series":[');
    for (var item in series!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (stickToMax != null) {
    buffer.writeAll(['"stickToMax":', stickToMax, ','], '');
  }
  if (xAxis != null) {
    buffer.writeAll(['"xAxis":', xAxis?.toJSON(), ','], '');
  }
  if (yAxis != null) {
    buffer.writeAll(['"yAxis":', yAxis?.toJSON(), ','], '');
  }
}