I am using SmartGWT version v11.1p_2018-02-21/PowerEdition Deployment. I am trying to install my own menu in a FacetChart instance such that it replaces the default menu. As an example, I copied the sample code shown on the FacetChart javadoc page and added the code shown below to it. My additions are in bold. However, the original menu is still being shown when I right click on the chart.
// Creating chart
FacetChart chart = new FacetChart();
chart.setFacets(new Facet("season", "Season"));
chart.setValueProperty("temp");
chart.setData(new Record[]{sprRec, sumRec, autRec, winRec});
chart.setTitle("Average temperature in Las Vegas");
// Set Context Menu
Menu contextMenu = new Menu();
MenuItem mi = new MenuItem("test");
contextMenu.addItem(mi);
chart.setContextMenu(contextMenu);
// Creating chart
FacetChart chart = new FacetChart();
chart.setFacets(new Facet("season", "Season"));
chart.setValueProperty("temp");
chart.setData(new Record[]{sprRec, sumRec, autRec, winRec});
chart.setTitle("Average temperature in Las Vegas");
// Set Context Menu
Menu contextMenu = new Menu();
MenuItem mi = new MenuItem("test");
contextMenu.addItem(mi);
chart.setContextMenu(contextMenu);