Commit a5ed5208 authored by Diego Rey's avatar Diego Rey
Browse files

Fixed update and clear functionalities for graph 2D

parent 975e919d
......@@ -4139,7 +4139,7 @@
"dev": true
},
"function-plot": {
"version": "git://github.com/diego-rey/function-plot.git#1543ff3b723285e0119c53a9bd3d37ab7e671ca9",
"version": "git://github.com/diego-rey/function-plot.git#d60f8903c392702a32ad42097e7b6575af05cb6a",
"from": "git://github.com/diego-rey/function-plot.git#feature/integration-domain-shape",
"requires": {
"array-range": "^1.0.1",
......
......@@ -99,7 +99,7 @@ export class Graph2DComponent {
break;
}
case 'canvas': {
var shapesData = JSON.parse(toJSON(canvas.resultado));
var shapesData = JSON.parse(canvas.resultado);
var shapesDataNormalized = this.normalizeShapesData(shapesData);
this.instance = null;
this.instance = functionPlot({
......@@ -157,10 +157,7 @@ export class Graph2DComponent {
type: 'discrete'
}
},
data: [],
plugins: [
functionPlot.plugins.zoomBox()
]
data: []
})
}
}
......@@ -253,6 +250,7 @@ export class Graph2DComponent {
* @desc remove all the graph from the instance.
*/
public cleanPlot = function () {
this.instance.removeAllGraphs();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment