Forum Discussion
mikihiir
Helper III
7 years agoDid something change with SelectionId, the key looks different now
Hi, this.host.createSelectionIdBuilder() service is not working properly anymore for me, did something change with they key, it looks different now. Now there is somekind of identityIndex in...
- 7 years ago
It looks good to me.
What API version are you using? API 2.3.0?
If so, I suggest downgrading API version to API 2.2.0 just to make sure it is not related to API.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Anonymous
7 years agoNot applicable
I use for create SelectionIds
private getSelectionIds(dataView: DataView, host: IVisualHost): ISelectionId[] {
return dataView.table.identity.map((identity, idx) => {
const categoryColumn: DataViewCategoryColumn = {
source: dataView.table.columns[0],
values: null,
identity: [identity]
};
return host.createSelectionIdBuilder()
.withCategory(categoryColumn, idx)
.createSelectionId();
});
}For click:
Microsoft.Maps.Events.addHandler(node, 'click', function (e: Microsoft.Maps.IMouseEventArgs) {
console.log('marker identity is ', sensorData.selectionId);
debugger;
this.selectionManager.select(sensorData.selectionId, false).then((ids: ISelectionId[]) =>{
console.log(ids);
}).catch(e => console.error(e));
});I see that in selectionManager add/remove selectedIds.
But data from the dashboard are not filtered. Nothing happens.
I use API 2.2.0.
what I do wrong?
v-evelk
Microsoft Employee
7 years agoHi,
Please check this and this pages.
Also you can look at the Sample Bar Chart code.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]