Skip to content

Plot Renderer

Tobias Paczian edited this page Mar 29, 2018 · 1 revision

image

Renders a plot.

options

  • title (STRING) - Title string written at the top of the plot
  • title_color (CSS Color Value) - Color of the title text. Default is ``black`.
  • default_line_color (CSS Color Value) - Determines the color of lines if not specified for an individual line. Default is black.
  • default_line_width (INT) - Number of pixels lines should be wide if not specified for an individual line. Default is 1.
  • width (INT) - The width of the graph in pixel (including legend).
  • height (INT) - The height of the graph in pixel (including legend).
  • show_dots (BOOLEAN) - display circles at the data points (for connected mode only)
  • connected (BOOLEAN) - connect the dots. This will disable the shape attribute of the series.
  • data (OBJECT)
    • series (OBJECT)
      • name (STRING) - name of the series
      • color (CSS Color value) - color of the series
      • shape (STRING) - shape of the points (connected==false only), can be one of [ 'cicrle', 'triangle', 'square' ]
      • points (ARRAY of OBJECT) - Each element in the list is an object of x and y coordinates of the point { 'x': x, 'y': y }
  • show_legend (BOOLEAN) - Turns the display of the legend on / off. Default is true.
  • legend_position (STRING) - Can be one of [ left, right, top, bottom ]
  • chartArea (ARRAY of FLOAT) - The values passed correspond to the left, top, width and height of the chart area respectively. The position is relative to the top left corner of the containing div. Values less than 1 are interpreted as fractions. Values greater than 1 are interpreted as absolute pixel values. Note that the labels are drawn to the left and bottom of these margins.
  • legendArea (ARRAY of FLOAT) - If this parameter is set, the legend_position parameter will not be used. Instead pass an array of floats. The values correspond to the left, top, width and height of the legend area respectively. The position is relative to the top left corner of the containing div. Values less than 1 are interpreted as fractions. Values greater than 1 are interpreted as absolute pixel values.
  • x_min (FLOAT) - minimum x value
  • y_min (FLOAT) - minimum y value
  • x_max (FLOAT) - maximim x value
  • y_max (FLOAT) - maximum y value
  • x_title (STRING) - title of the x axis
  • y_title (STRING) - title of the y axis
  • x_scale (STRING) - can be either linear or log, default is linear.
  • y_scale (STRING) - can be either linear or log, default is linear.
  • x_titleOffset (INT) - pixels offset of the x axis title, default is 35.
  • y_titleOffset (INT) - pixels offset of the y axis title, default is 45.
  • titleOffset (INT) - pixels offset of the plot title
  • drag_select (FUNCTION) - function to be called for drag select. This function will get passed an array of the selected points.

Clone this wiki locally