Hey!
I have a custom visual with a process graph, in this graph I can select edges and filter the graph to only show processes with this specific edge.
I'm using a Table DataViewMapping and I am creating my selection IDs with this Code:
function getSelectionIds(dataView: DataView, host: IVisualHost): ISelectionId[] { return dataView.table.identity.map((identity: DataViewScopeIdentity) => { const categoryColumn: DataViewCategoryColumn = { source: dataView.table.columns[1], values: null, identity: [identity] }; return host.createSelectionIdBuilder() .withCategory(categoryColumn, 0) .createSelectionId(); }); }
If I have a selection in my graph I am getting all selected rows selectionIds and pass them to the selection manager as an array.
// Select all cases with the specific edge in their path for (i = 0; i < viewModel.eventlogData.length; i++) { if (viewModel.eventlogData[i].path.search(id_from + "::" + id_to) >= 0) { selectionIdArray.push(viewModel.eventlogData[i].selectionID); } } selectionManager.select(selectionIdArray, true); selectionManager.applySelectionFilter();
The creation of this selectionIdArray is not the problem, it only takes a few ms, but I looks PowerBI will get slower (up to 2 min for 1500 rows/elements in the array) the more selectionIds I pass.
Is there a better/faster way to multiselect multiple rows?
All help is kindly appreciated!
Regards
lschroth