A charting service powered by gnuplot.



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

Returns: Object (Object) - the default draw options

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

Create charts and histograms from data.


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

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

    • title: String? (String) - title to show on the graph

    • width: Number? (Number) - width of the returned image

    • height: Number? (Number) - height of the returned image

    • labels: List<String>? (List | String) - labels for each line

    • types: List<LineType>? (List | LineType) - types for each line

    • xRange: List<Number>? (List | Number) - range of X values to graph

    • yRange: List<Number>? (List | Number) - range of Y values to graph

    • xLabel: String? (String) - label on the X axis

    • yLabel: String? (String) - label on the Y axis

    • xTicks: Number? (Number) - tick interval for the X axis

    • isCategorical: Boolean? (Boolean) - true to enable categorical mode

    • smooth: Boolean? (Boolean) - true to enable smoothing

    • grid: Enum<line, dot>? (Enum) - grid type to use

    • isTimeSeries: Boolean? (Boolean) - true to enable time series mode

    • timeInputFormat: TimeFormat? (TimeFormat) - input time format for time series data

    • timeDisplayFormat: TimeFormat? (TimeFormat) - output time format for time series data

    • logscale: List? (List) - logscale settings to use

    • fontSize: BoundedInteger<1, 256>? (BoundedInteger) - font size to use for the title and axis labels (default 10).

    • legendLocation: LegendLocation? (LegendLocation) - the location of the legend

    • lineWidth: BoundedInteger<1, 32>? (BoundedInteger) - the width of the lines to draw

Returns: Image (Image) - the generated chart