Gantt Chart graph item click listener

It seems the following Listener code that I copied from your sample project is no longer available/working to use in Platform version 6.10, has this been deprecated or it’s a bug?

    ganttChart.addGraphItemClickListener(event -> {
        Segment segment = (Segment) event.getItem();
        TaskSpan taskSpan = segment.getTaskSpan();

        showNotification(String.format("'%s' from '%s'", segment.getTask(), taskSpan.getCategory()),
                NotificationType.HUMANIZED);
    });

It was not working ealier in V 6.4 Chart - GraphItemClickListener - #4 от пользователя gorelov - CUBA.Platform

Hi @mortozakhan!

Unfortunately, I can’t reproduce the problem, could you provide a small sample project where it reproduced?

Hi @Pinyazhin
Please find attached the sample app
gantt-events.zip (78.8 KB)

regards
Mortoza

The problem in the type of chart you inject, Chart doesn’t have addGraphItemClickListener().
Try to inject as GanttChart:

@Inject
private GanttChart ganttChart;

Thank you @Pinyazhin. it works. I used the sample app from the forum, it was like it but realised that it was not correct.