Attributes
Own
none
Inherited
Members
Own
elements
- Description
Contains pointers to the various subelements of the chart.
- Source
- base/chart.js, line 78
Inherited
Methods
Own
drawBar(board, x, y, attributes) → {Array}
Create bar chart defined by two data arrays. Attributes to change the layout of the bar chart are:
- width (optional)
- dir: 'horizontal' or 'vertical'
- colors: array of colors
- labels: array of labels
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
x |
Array | Array of x-coordinates |
y |
Array | Array of y-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
Array of JXG polygons defining the bars
- Type
- Array
Details
- Source
- base/chart.js, line 227
drawFit(board, x, y, attributes) → {JXG.Curve}
Create line chart where the curve is given by a regression polynomial defined by two data arrays. The degree of the polynomial is supplied through the attribute "degree" in attributes.
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
x |
Array | Array of x-coordinates |
y |
Array | Array of y-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
JSXGraph function graph object
- Type
- JXG.Curve
Details
- Source
- base/chart.js, line 196
drawLine(board, x, y, attributes) → {JXG.Curve}
Create line chart defined by two data arrays.
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
x |
Array | Array of x-coordinates |
y |
Array | Array of y-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
JSXGraph curve
- Type
- JXG.Curve
Details
- Source
- base/chart.js, line 159
drawPie(board, y, attributes) → {Object}
Create pie chart. Attributes to change the layout of the pie chart are:
- labels: array of labels
- colors: (Array)
- highlightColors (Array)
- radius
- center (coordinate array)
- highlightOnSector (Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
y |
Array | Array of x-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
with keys: "{sectors, points, midpoint}"
- Type
- Object
Details
- Source
- base/chart.js, line 377
drawPoints(board, x, y, attributes) → {Array}
Create chart consisting of JSXGraph points. Attributes to change the layout of the point chart are:
- fixed (Boolean)
- infoboxArray (Array): Texts for the infobox
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
x |
Array | Array of x-coordinates |
y |
Array | Array of y-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
Array of JSXGraph points
- Type
- Array
Details
- Source
- base/chart.js, line 343
drawRadar(board, parents, attributes) → {Object}
Create radar chart. Attributes to change the layout of the pie chart are:
- paramArray: labels for axes, [ paramx, paramy, paramz ]
- startShiftRatio: 0 <= offset from chart center <=1
- endShiftRatio: 0 <= offset from chart radius <=1
- startShiftArray: Adjust offsets per each axis
- endShiftArray: Adjust offsets per each axis
- startArray: Values for inner circle. Default values: minimums
- start: one value to overwrite all startArray values
- endArray: Values for outer circle, maximums by default
- end: one value to overwrite all endArray values
- labelArray
- polyStrokeWidth
- colors
- highlightcolors
- labelArray: [ row1, row2, row3 ]
- radius
- legendPosition
- showCircles
- circleLabelArray
- circleStrokeWidth
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
parents |
Array | Array of coordinates, e.g. [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3]] |
attributes |
Object | Javascript object containing attributes like colors |
Returns
with keys "{circles, lines, points, midpoint, polygons}"
- Type
- Object
Details
- Source
- base/chart.js, line 547
drawSpline(board, x, y, attributes) → {JXG.Curve}
Create line chart that consists of a natural spline curve defined by two data arrays.
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the chart is drawn on |
x |
Array | Array of x-coordinates |
y |
Array | Array of y-coordinates |
attributes |
Object | Javascript object containing attributes like colors |
Returns
JSXGraph (natural) spline curve
- Type
- JXG.Curve
Details
- Source
- base/chart.js, line 177
updateDataArray() → {JXG.Chart}
Template for dynamic charts update. This method is used to compute new entries for the arrays this.dataX and this.dataY. It is used in update. Default is an empty method, can be overwritten by the user.
Returns
Reference to this chart object.
- Type
- JXG.Chart
Details
- Source
- base/chart.js, line 945
(private) updateRenderer()
Uses the boards renderer to update the chart.
Details
- Overrides
- JXG.GeometryElement#updateRenderer
- Source
- base/chart.js, line 922
Inherited
Events
Own
none
Inherited
Parameters
| Name | Type | Description |
|---|---|---|
board |
String | JXG.Board | The board the new chart is drawn on. |
parent |
Array | data arrays for the chart |
attributes |
Object | Javascript object containing attributes like name, id and colors. |
Details
- Source
- base/chart.js, line 66