Chart

A charting service powered by gnuplot.

RPCS

Chart.defaultOptions()

Get the default options for the Chart.draw() RPC.

Returns: Object info - the default draw options

Chart.draw(lines: List, options: Object?)

Create charts and histograms from data.

Arguments:

  • lines: List info - a single line or list of lines. Each line should be [[x1,y1], [x2,y2], ...].

  • options: Object? info - Configuration for graph title, axes, and more

    • title: String? info - title to show on the graph
    • width: Number? info - width of the returned image
    • height: Number? info - height of the returned image
    • labels: List<String>? info - labels for each line
    • types: List<LineType>? info - types for each line
    • xRange: List<Number>? info - range of X values to graph
    • yRange: List<Number>? info - range of Y values to graph
    • xLabel: String? info - label on the X axis
    • yLabel: String? info - label on the Y axis
    • xTicks: Number? info - tick interval for the X axis
    • isCategorical: Boolean? info - true to enable categorical mode
    • smooth: Boolean? info - true to enable smoothing
    • grid: Enum<line, dot>? info - grid type to use
    • isTimeSeries: Boolean? info - true to enable time series mode
    • timeInputFormat: TimeFormat? - input time format for time series data
    • timeDisplayFormat: TimeFormat? - output time format for time series data
    • logscale: List? info - logscale settings to use

Returns: Image - the generated chart