Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Paste code macro
languagegroovy
titleFlexChart scatter plot
def data = []

for (int i = 0; i < 1001; i++) {
  double x = i, y = i
  data << [ 'x': x, 'y': y ]
  // option 1.
  // data << [ x, y ]
}


def chartDefinition = [
  chart: [ 'type': 'scatter' ],
  xAxis: [[ title: ['text' : xAxisTitle] ]],
  yAxis: [[ title : ['text' : yAxisTitle] ]],
  // option 2. (default is 1000, disabled is 0)
  //plotOptions: [ series: [turboThreshold: 2000] ],
  series: [[ 'name' : 'series1', 'data': data ]]
]
api.buildFlexChart("test", chartDefinition)

...