toOptionsJSON method

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

Implementation

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

  if (allowOverlap != null) {
    buffer.writeAll(['"allowOverlap":', allowOverlap, ','], '');
  }
  if (animation != null) {
    buffer.writeAll(['"animation":', jsonEncode(animation), ','], '');
  }
  if (dataLabels != null) {
    buffer.writeAll(['"dataLabels":', dataLabels?.toJSON(), ','], '');
  }
  if (drillToCluster != null) {
    buffer.writeAll(['"drillToCluster":', drillToCluster, ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (layoutAlgorithm != null) {
    buffer
        .writeAll(['"layoutAlgorithm":', layoutAlgorithm?.toJSON(), ','], '');
  }
  if (marker != null) {
    buffer.writeAll(['"marker":', marker?.toJSON(), ','], '');
  }
  if (minimumClusterSize != null) {
    buffer.writeAll(['"minimumClusterSize":', minimumClusterSize, ','], '');
  }
  if (states != null) {
    buffer.writeAll(['"states":', states?.toJSON(), ','], '');
  }
  if (zones != null) {
    buffer.write('"zones":[');
    for (var item in zones!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
}