Hi there,
I created both serial and pie charts with Value Datasource successfully. Then when I try to add Chart.GraphItemClickEvent or SlicePullOutEvent listener respectively, the event.getItem() ALWAYS returns null.
Here is a test code of SlicePullOutEvent listener based on your demo project:
public class ValueDsDemo extends AbstractWindow {
@Inject
private CollectionDatasource<KeyValueEntity, Object> salesDs;
@Inject
private Chart orderByCustomerChartId;
@Override
public void init(Map<String, Object> params) {
super.init(params);
orderByCustomerChartId.addSlicePullOutListener(event ->{
Entity entity = event.getItem();
if(entity != null){
showNotification("entity is NOT null: " + entity.getId().toString(), NotificationType.HUMANIZED);
}
else
{
showNotification("entity is null! ", NotificationType.HUMANIZED);
}
});
}
“entity is null!” is printed out.
My project also needs to be able to add ChartItemClickListener for SerialChart (type: COLUMN).
Ideally if you could update the demo project (demo-64-value-ds) by adding event handler, and make the entity be available in the handler, that would be great.
Thanks for your help,
-Mike