toOptionsJSON method

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

Implementation

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

  if (color != null) {
    buffer.writeAll(['"color":', jsonEncode(color), ','], '');
  }
  if (colorIndex != null) {
    buffer.writeAll(['"colorIndex":', colorIndex, ','], '');
  }
  if (column != null) {
    buffer.writeAll(['"column":', column, ','], '');
  }
  if (dataLabels != null) {
    buffer.writeAll(['"dataLabels":', dataLabels?.toJSON(), ','], '');
  }
  if (description != null) {
    buffer.writeAll(['"description":', jsonEncode(description), ','], '');
  }
  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (image != null) {
    buffer.writeAll(['"image":', jsonEncode(image), ','], '');
  }
  if (layout != null) {
    buffer.writeAll(['"layout":', jsonEncode(layout), ','], '');
  }
  if (level != null) {
    buffer.writeAll(['"level":', level, ','], '');
  }
  if (name != null) {
    buffer.writeAll(['"name":', jsonEncode(name), ','], '');
  }
  if (offset != null) {
    buffer.writeAll(['"offset":', jsonEncode(offset), ','], '');
  }
  if (offsetHorizontal != null) {
    buffer.writeAll(
        ['"offsetHorizontal":', jsonEncode(offsetHorizontal), ','], '');
  }
  if (offsetVertical != null) {
    buffer
        .writeAll(['"offsetVertical":', jsonEncode(offsetVertical), ','], '');
  }
  if (title != null) {
    buffer.writeAll(['"title":', jsonEncode(title), ','], '');
  }
}