g2

g2 ⇒ object

g2.chart (c) 2015-18 Stefan Goessner

Kind: global typedef
Returns: object - chart
Requires: module:g2.core.js, module:g2.ext.js
Author: Stefan Goessner
License: MIT License

Param Type Description
args object Chart arguments object or

Properties

Name Type Default Description
x float   x-position of lower left corner of chart rectangle.
y float   y-position of lower left corner of chart rectangle.
[b] float 150 width of chart rectangle.
[h] float 100 height of chart rectangle.
[ls] string   border color.
[fs] string   fill color.
[title] string | object   chart title.
[title.text] string   chart title text string.
[title.offset] float 0 chart title vertical offset.
[title.style] object   chart title style.
[title.style.font] string "14px serif" chart title font.
[title.style.thal] string "center" chart title horizontal align.
[title.style.tval] string "bottom" chart title vertical align.
[funcs] array [] array of dataset data and/or function fn objects.
[funcs[item]] object   dataset or function object.
[funcs[item].data] array   data points as flat array [x,y,..], array of point arrays [[x,y],..] or array of point objects [{x,y},..].
[funcs[item].fn] function   function y = f(x) recieving x-value returning y-value.
[funcs[item].dx] float   x increment to apply to function fn. Ignored with data points.
[funcs[item].fill] boolean   fill region between function graph and x-origin line.
[funcs[item].dots] boolean   place circular dots at data points (Avoid with fns).
[xaxis] boolean | object false x-axis.
[xaxis.grid] boolean | object false x-axis grid lines.
[xaxis.grid.ls] string   x-axis grid line style (color).
[xaxis.grid.lw] string   x-axis grid line width.
[xaxis.grid.ld] string   x-axis grid line dash style.
[xaxis.line] boolean true display x-axis base line.
[xaxis.origin] boolean false display x-axis origin line.
[yaxis] boolean | object false y-axis.
[yaxis.grid] boolean | object false y-axis grid lines.
[yaxis.grid.ls] string   y-axis grid line style color.
[yaxis.grid.lw] string   y-axis grid line width.
[yaxis.grid.ld] string   y-axis grid line dash style.
[yaxis.line] boolean true display y-axis base line.
[yaxis.origin] boolean false display y-axis origin line.
[xmin] float   minimal x-axis value. If not given it is calculated from chart data values.
[xmax] float   maximal x-axis value. If not given it is calculated from chart data values.
[ymin] float   minimal y-axis value. If not given it is calculated from chart data values.
[ymax] float   maximal y-axis value. If not given it is calculated from chart data values.