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 (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (level != null) {
    buffer.writeAll(['"level":', level, ','], '');
  }
  if (name != null) {
    buffer.writeAll(['"name":', jsonEncode(name), ','], '');
  }
  if (offsetHorizontal != null) {
    buffer.writeAll(
        ['"offsetHorizontal":', jsonEncode(offsetHorizontal), ','], '');
  }
  if (offsetVertical != null) {
    buffer
        .writeAll(['"offsetVertical":', jsonEncode(offsetVertical), ','], '');
  }
}