I have two charts on one form. When I display labels, a lot of them overlap. So I created a Popup menu for both charts that lets the users hide the labels if the chart is overlapping them too much. The amounts and labels still show in the legend.
But is there a way that I could set up, let's say a pie slice, so if the user is not displaying labels, they could Right-Click the slice and have the label shown to them at the position of the mouse pointer? Though, keeping in mind I normally would have a popup menu show when the chart is right-clicked.
Or, is there a way when the labels are hidden, to show a 'hint' per slice or bar on a chart when they hover their mouse over the chart?
Thanks.
Show labels by Right-Clicking a Slice or Bar in a chart
Re: Show labels by Right-Clicking a Slice or Bar in a chart
Hello,
You can use the series Clicked(X, Y) function to get the ValueIndex of the point for the given X/Y pixel position. You can call this at OnMouseDown or at OnMouseMove events to show a menu if you like.
Note Clicked function returns -1 if there's no point at the given X/Y pixel position.
Also note there's an OnClickSeries for the chart that directly gives you the Series and the ValueIndex.
You can use the series Clicked(X, Y) function to get the ValueIndex of the point for the given X/Y pixel position. You can call this at OnMouseDown or at OnMouseMove events to show a menu if you like.
Note Clicked function returns -1 if there's no point at the given X/Y pixel position.
Also note there's an OnClickSeries for the chart that directly gives you the Series and the ValueIndex.
There's the TMarksTipTool to do precisely that (Chart Tools only available with the Pro version).realsol wrote:Or, is there a way when the labels are hidden, to show a 'hint' per slice or bar on a chart when they hover their mouse over the chart?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |