Hi Matthieu,
Good day to you.
We have checked your reported query about state maintenance. You are able to maintain the state of dashboard layout panels using serialize() method. In that method, you can get the dashboard layout panels element values such as position properties (row, column) and dimension properties (sizeX, sizeY). But the content of the dashboard layout panels needs to persist and update manually, because content value is not handled by component side.
Refer the below code snippet to add the panel content manually to the dashboard layout.
// Save the current panels
onSave: function(args) {
// Create instances for dashboardlayout element
this.$refs.restoreModel = this.$refs.DashbordInstance.$el.ej2_instances[0].serialize();
this.$refs.restoreModel[0].content = this.pie;
this.$refs.restoreModel[1].content = this.pieChart;
this.$refs.restoreModel[2].content = this.spline;
} |
For your reference we have prepared a simple sample. In that sample, we have rendered chart as a panel content and maintain the state of the panels using serialize() method.
Refer the sample link below.
Please let us know, if you have any concerns.
Regards,
Ashokkumar B.