I have a chart attached to layout cell
var barChart = dhxLayout.cells(“a”).attachChart({
…
})
how can i move the chart to another cell??
here a sample with grids
dhtmlx.com/docs/products/dht … _grid.html
thank you
I have a chart attached to layout cell
var barChart = dhxLayout.cells(“a”).attachChart({
…
})
how can i move the chart to another cell??
here a sample with grids
dhtmlx.com/docs/products/dht … _grid.html
thank you
There is not a public method to move a chart from one cell to another. However, you may try the following workaround:
dhxLayout.cells(“b”).getView().grid = dhxLayout.cells(“a”).getView().grid;
var obj = dhxLayout.cells(“a”).detachObject();
dhxLayout.cells(“b”).attachObject(obj[1]);
In this sample Chart from “a” cell is moved into “b”
The other solution is to remove Chart in “a” and create the new one in “b”:
var config = {…};
var barChart = dhxLayout.cells(“a”).attachChart(config);
…
var obj = dhxLayout.cells(“a”).detachObject(true);
barChart = dhxLayout.cells(“b”).attachChart(config);