toOptionsJSON method

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

Implementation

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

  if (animation != null) {
    buffer.writeAll(['"animation":', animation, ','], '');
  }
  if (colorByPoint != null) {
    buffer.writeAll(['"colorByPoint":', colorByPoint, ','], '');
  }
  if (colorKey != null) {
    buffer.writeAll(['"colorKey":', jsonEncode(colorKey), ','], '');
  }
  if (colors != null) {
    buffer.write('"colors":[');
    for (var item in colors!) {
      buffer.writeAll([jsonEncode(item), ','], '');
    }
    buffer.write('],');
  }
  if (curveFactor != null) {
    buffer.writeAll(['"curveFactor":', curveFactor, ','], '');
  }
  if (fillColor != null) {
    buffer.writeAll(['"fillColor":', jsonEncode(fillColor), ','], '');
  }
  if (fillOpacity != null) {
    buffer.writeAll(['"fillOpacity":', fillOpacity, ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (index != null) {
    buffer.writeAll(['"index":', index, ','], '');
  }
  if (legendIndex != null) {
    buffer.writeAll(['"legendIndex":', legendIndex, ','], '');
  }
  if (legendSymbol != null) {
    buffer.writeAll(['"legendSymbol":', jsonEncode(legendSymbol), ','], '');
  }
  if (lineWidth != null) {
    buffer.writeAll(['"lineWidth":', lineWidth, ','], '');
  }
  if (linecap != null) {
    buffer.writeAll(['"linecap":', jsonEncode(linecap), ','], '');
  }
  if (linkedTo != null) {
    buffer.writeAll(['"linkedTo":', jsonEncode(linkedTo), ','], '');
  }
  if (markerEnd != null) {
    buffer.writeAll(['"markerEnd":', markerEnd?.toJSON(), ','], '');
  }
  if (maxWidth != null) {
    buffer.writeAll(['"maxWidth":', maxWidth, ','], '');
  }
  if (minWidth != null) {
    buffer.writeAll(['"minWidth":', minWidth, ','], '');
  }
  if (nullColor != null) {
    buffer.writeAll(['"nullColor":', jsonEncode(nullColor), ','], '');
  }
  if (nullInteraction != null) {
    buffer.writeAll(['"nullInteraction":', nullInteraction, ','], '');
  }
  if (opacity != null) {
    buffer.writeAll(['"opacity":', jsonEncode(opacity), ','], '');
  }
  if (states != null) {
    buffer.writeAll(['"states":', states?.toJSON(), ','], '');
  }
  if (tooltip != null) {
    buffer.writeAll(['"tooltip":', tooltip?.toJSON(), ','], '');
  }
  if (weight != null) {
    buffer.writeAll(['"weight":', weight, ','], '');
  }
  if (width != null) {
    buffer.writeAll(['"width":', width, ','], '');
  }
  if (zoomEnabled != null) {
    buffer.writeAll(['"zoomEnabled":', zoomEnabled, ','], '');
  }
}