Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Change title/subtitle chart in DrillDown and DrillUp
Hi. I expect someone could help me.
I have created a multilevel drilldown chart following this topic:
https://github.com/vaadin/charts/blob/master/examples/src/main/java/com/vaadin/addon/charts/examples/columnandbar/ColumnWithNativeLazyDrilldownByIndex.java
I've modified this code to add a superlevel of "Browser brands" serie. The new structure of drilldown chart is next:
- Year 2015
- MSIE
- MSIE 4.0
- MSIE 5.0
- Firefox
- Firefox 1.0
- Firefox 1.5
- Year 2016
- MSIE
- MSIE 6.0
- MSIE 7.0
- MSIE 8.0
- MSIE 9.0
- Firefox
- Firefox 2.0
- Firefox 3.0
It works fine, but what I want is to change the title or subtitle of the chart in order to follow the path of charts (like breadcrumbs in web pages). For example, if I'm watching a chart where all 2016-MSIE are shown (MSIE 6.0, 7.0, 8.0), I would like to see in subtitle chart this text:
"You are in: Year 2016 > MSIE" but if I return to Year 2016 chart, the text should change to: "You are in: Year 2016".
With this code:
List<String> breadcrumb = new ArrayList<String>();
chart.setDrilldownCallback(new DrilldownCallback() {
@Override
public Series handleDrilldown(DrilldownEvent event) {
Series ss = getPointDrilldown(event.getItemIndex());
conf.setSubTitle(ss.getName());
breadcrumb.add(ss.getName());
chart.drawChart();
return ss ;
}
});
chart.addChartDrillupListener(new ChartDrillupListener() {
@Override
public void onDrillup(ChartDrillupEvent event) {
String subtitle = breadcrumb.get(breadcrumb.size() - 2);
breadcrumb.remove(breadcrumb.size() - 1);
conf.setSubTitle(subtitle);
chart.drawChart();
}
});
I get subtitle changes when drilldown, but in leaf level, when I click DrillupButton, the navigation changes to the first chart directly, where years 2015-2016 appears. If I remove all chart.drawChart() methods, the navigations works fine but subtitle doesn't change.
What I would like to know is if there is a method like refresh() or similar way to get change subtitle with a correct navigation of charts. I have proved with chart.MarkasDirty(), but it doesn't work.
Thanks for all. Best regards.
AlfaGavi