getMarkersMenu(): PP.Exp.Ui.ChartMarkerMenu;
The getMarkersMenu method returns the menu that opens on clicking the Markers button on the Chart tool ribbon tab.
The method returns an object of the PP.Exp.Ui.ChartMarkerMenu class.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Get menu of markers that opens in the Markers tool ribbon menu item:
// Get view of the Chart tab chartCategory = expressBox.getRibbonView().getChartCategory(); // Get menu of markers markerMenu = chartCategory.getMarkersMenu(); // Get index of the selected element selected = markerMenu.getSelectedIndex(); // Get selected marker icon console.debug("Marker is selected: " + markerMenu.getMarker() + " with index " + selected); //--> Marker is selected: diamond with index 3 // Set marker change event markerMenu.MarkerChanged.add(function(){alert('Marker type is changed)}); // Get a list of all available markers list = markerMenu.getChartMarkerListBox(); console.debug(list.getItems()); // Reset the selected marker type markerMenu.clearSelection();
After executing the example the icon name and selected marker index are displayed, the marker change event is set, the list of available marker icons is obtained, the current button menu selection is cancelled.
See also: