Hi,
I have a dashboard I need to filter.
I want to filter all charts when I click on a bar.
When I click on the bar, I can get the Label, this can help me filter on the date for exemple.
But I can not manage to get the actual ‘dataSet’ label. For exemple ‘Profit’ or ‘Loss’.
I tryed with this kind of function :
const index = event?.['points']?.[0]?.['index']
const datasetIndex = event?.['points']?.[0]?.['datasetIndex']
const label = event?.['points']?.[0]?.['label']
const value = event?.['points']?.[0]?.['value']
const datax = event?.['dataX']
const datay = event?.['dataY']
const points = event?.['points']
const shipment_ids = collections['xxx-xxx-xxx-xxx']?.['data']?.[index].shipment_ids
const profit_or_loss = collections['xxx-xxx-xxx-xxx']?.['data']?.[index].profit_or_loss
return "Label : " + label + " / " +
"Value : " + value + " / " +
"Index : " + index + " / " +
"datasetIndex : " + datasetIndex + " / "
It is sometimes gifing me the good data sometimes not. When I click on a ‘Profit’ point, the profit_or_loss gives me eithr ‘profit’ or ‘loss’