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 (dataLabels != null) {
    buffer.writeAll(['"dataLabels":', jsonEncode(dataLabels), ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (geometry != null) {
    buffer.writeAll(['"geometry":', geometry?.toJSON(), ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (labelrank != null) {
    buffer.writeAll(['"labelrank":', labelrank, ','], '');
  }
  if (lineWidth != null) {
    buffer.writeAll(['"lineWidth":', lineWidth, ','], '');
  }
  if (middleX != null) {
    buffer.writeAll(['"middleX":', middleX, ','], '');
  }
  if (middleY != null) {
    buffer.writeAll(['"middleY":', middleY, ','], '');
  }
  if (name != null) {
    buffer.writeAll(['"name":', jsonEncode(name), ','], '');
  }
  if (path != null) {
    buffer.writeAll(['"path":', jsonEncode(path), ','], '');
  }
  if (value != null) {
    buffer.writeAll(['"value":', value, ','], '');
  }
}