Hi,
I've been experiencing slowness when using the radial tree diagram and overview components with larger datasets and rebinding different datasets to it dynamically. I'm using your
example as a baseline, and changed the data and node models to work with the data I'm using. When rebinding data dynamically, I'm doing something like this.
this.dataSource = {
id: 'id', parentId: 'parentId',
dataSource: new DataManager(this.diagramUtility.GetRadialTreeChartData(data)),
doBinding: (nodeModel: NodeModel, data: DataInfo, diagram: Diagram) => {
this.diagramUtility.BindDataToRadialTreeNode(nodeModel, data, diagram);
}
};
if (this.diagram) {
this.diagram.reset();
this.diagram.fitToPage();
this.diagram.dataBind();
}
I'm currently using datasets with around 400 nodes, but will need to potentially use larger ones. It's currently taking around 40 seconds to rebind a totally different dataset with a different origin node. My question is what is the most optimal way to rebind a new dataset to the radial tree diagram? I've also tried these to no success.
// Doesn't pick up the new dataset and displays the previous one
this.dataSource.dataSource = new DataManager(this.diagramUtility.GetRadialTreeChartData(data));
this.diagram.dataBind();
// Correctly gets the new dataset and refreshes quicker, but diagram calls such as reset() are off center, and the Overview control shows nothing
this.diagram.clear();
this.dataSource.dataSource.dataSource.json = this.diagramUtility.GetRadialTreeChartData(data);
this.diagram.refresh();
Thanks in advance!