easychart.new#

easychart.new(type=None, *, datetime=False, zoom='x', tooltip=None, title=None, subtitle=None, xAxis=None, yAxis=None, cAxis=None, xtitle=None, ytitle=None, xformat=None, yformat=None, ymin=None, ymax=None, xmin=None, xmax=None, cmin=None, cmax=None, legend=None, categories=None, stacked=None, width=None, height=None, exporting=None, xtype=None, ytype=None, ctype=None, xreversed=None, yreversed=None, creversed=None, ycategories=None, xcategories=None, xopposite=None, yopposite=None, labels=None, twinx=None, twiny=None, colormap=None)#

Creates a new chart with some preset defaults

Parameters:
  • type (str) – The default series type (e.g. “line”, “scatter”, “column”, “arearange”, etc…)

  • datetime (bool) – Sets the type of the xAxis to ‘datetime’

  • zoom (str) – Sets the interactive zoom options; Value must be one of None (no zoom), “x” (horizontal), “y” (vertical) or “xy” (both)

  • tooltip (str) – Sets the tooltip options; A dict of options, “shared”, True or None

  • title (str) – The chart title options Value can be a dict of options or a string (the title text)

  • subtitle (str) – The chart subtitle options Value can be a dict of options or a string (the subtitle text)

  • xAxis (dict) – The xAxis options

  • yAxis (dict) – The yAxis options

  • cAxis (str, dict) – The colorAxis options Can be a dict of options or a colormap name

  • xtitle (str) – The xAxis title

  • ytitle (str) – The yAxis title

  • xformat (str) – The format of the xAxis labels

  • yformat (str) – The format of the yAxis labels

  • ymin (float) – The minimum of the yAxis

  • ymax (float) – The maximum of the yAxis

  • stacked (bool) – True to stack the series, False otherwise

  • width (int) – The chart width, in pixels or in percentages If given a percentage value (e.g. “50%”), then value is computed as a fraction of ‘600px’. See chart dimensions for more details.

  • height (int or str) – The chart height, in pixels, or in percentages. If given a percentage value (e.g. “60%”), then value is computed as a fraction of the chart width.

  • exporting (bool) – True to enable exporting menu on chart, False to disable

  • xtype (str) – The axis type for the xAxis (e.g. “log”, “datetime”)

  • ytype (str) – The axis type for the yAxis (e.g. “log”, “datetime”)

  • ctype (str) – The axis type for the color axis (e.g. “log”)

  • xreversed (bool) – Whether to reverse the xAxis (from high to low)

  • yreversed (bool) – Whether to reverse the yAxis (from high to low)

  • creversed (bool) – Whether to reversed the colorAxis (from high to low)

  • ycategories (list) – the yAxis category labels

  • xcategories (list) – the xAxis category labels

  • xopposite (bool) – Whether to draw the xAxis on the opposite side (generally right of chart)

  • yopposite (bool) – Whether to draw the yAxis on the opposite side (generally top of chart)

  • labels (bool, list, dict) – Series labels

  • twinx (bool) – True to twin the xAxis on the opposite side

  • twiny (bool) – True to twin the yAxis on the opposite side

  • colormap (str) – A colormap name to create the colorAxis

Return type:

easychart.Chart