functionPlot({
target: '#shape-rect-function',
xAxis: {
label: 'x - axis',
scale: 'linear',
domain: {
initial: [-10, 10],
type: 'discrete'
}
},
data: [{
shape: {
w : 6.0,
h : 3.0,
x : 0,
y : 0,
color :"red",
rotation : 0.125
},
graphType: 'shape',
shapeType: 'rect'
}]
})shapeType = circleshapes.r (number) circle radioshapes.x (number) x positionshapes.y (number) y positionshapes.color (string) possible values: rgb | hexa | name colorshapes.rotation (string) deg valuesfunctionPlot({
target: '#shape-circle-function',
xAxis: {
label: 'x - axis',
scale: 'linear',
domain: {
initial: [-10, 10],
type: 'discrete'
}
},
data: [{
shape: {
r : 2.0,
x : -2.0,
y : 0,
color :"blue",
rotation : 0.0
},
graphType: 'shape',
shapeType: 'circle'
}]
})shapeType = textshapes.text (string) text to drawshapes.size (string) font sizeshapes.x (number) x positionshapes.y (number) y positionshapes.color (string) possible values: rgb | hexa | name colorshapes.rotation (string) deg valuesfunctionPlot({
target: '#shape-text-function',
xAxis: {
label: 'x - axis',
scale: 'linear',
domain: {
initial: [-10, 10],
type: 'discrete'
}
},
data: [{
shape: {
text:"Here goes the text",
size: 24,
x : -3.5,
y : 0,
color :"green",
rotation : 0.25
},
graphType: 'shape',
shapeType: 'text'
}]
})New parameters for polyline point graphics:
polylineType (string) possible values: line | polygonrotation (string) deg valuesfunctionPlot({
target: '#shape-polyline-function',
xAxis: {
label: 'x - axis',
scale: 'linear',
domain: {
initial: [-10, 10],
type: 'discrete'
}
},
data: [{
points: [
[-10,-2],
[0,-4],
[2,6],
[15,-10]
],
color :"orange",
rotation : 0.25,
fnType: 'points',
polylineType : "line",
graphType: 'polyline',
},{
points: [
[-8,3],
[-6,1],
[-4,2],
[-6,6]
],
color :"green",
rotation : 0.125,
boundingBox: true,
fnType: 'points',
polylineType : "polygon",
graphType: 'polyline',
}]
})The function $y = sin(x)$ is evaluated with integer values inside the range.
The required parameters are:
graphType: 'scatter'xAxis an object which contain info about the domainxAxis.type (string) possible values: discrete | realAlso, we add new "color" property for tip element.
tip.color (string) possible values: rgb | hexa | name colorfunctionPlot({
target: '#discrete-function',
tip: {
color: 'green'
},
xAxis: {
label: 'x - axis',
scale: 'linear',
domain: {
initial: [-4, 4],
type: 'discrete'
}
},
data: [{
graphType: 'scatter',
fn: function (scope) {
// scope.x = Number
var x = scope.x
return Math.sin(x)
}
}]
})
Shape Type
The required parameters are:
graphType: 'shape'shapeType: 'rect'(string) possible values: rect | circle | text |shapesshape data object to drawshapeType = rectshapes.w(number) widthshapes.h(number) heightshapes.x(number) x positionshapes.y(number) y positionshapes.color(string) possible values: rgb | hexa | name colorshapes.rotation(string) deg values