.on('click', (dataPoint) => {
console.log("CLICK DATA: ", dataPoint);
console.log("CLICK DATA TARGET: ", dataPoint.target);
console.log("CLICK DATA TARGET DATA: ", dataPoint.target.data);
console.log("CLICK DATA TARGET DATA SELECTION ID: ", dataPoint.target.data.SelectionId.getKey());
//const selected = !this.selectionManager.hasSelection();
console.log("UPDATE SELECTION ID: ", dataPoint.selectionId);
console.log("UPDATE SELECTION ID GETKEY: ", dataPoint.selectionId.getKey());
if (!dataPoint.selectionId) {
console.error("SelectionId is undefined for data point:", dataPoint);
return;
}
this.selectionManager
.select(dataPoint.selectionId, false)
.then((ids: ISelectionId[]) => {
this.syncSelectionState(barSelectionMerged, ids);
barSelectionMerged.style("fill", (d: BarChartDataPoint) => {
return ids.length > 0 && dataPoint.selectionId.equals(dataPoint.selectionId) ? "#7ACA00" : "#AAAAAA";
});
});
});