Incorrect Legend totals
Posted: Mon Apr 03, 2017 3:31 pm
I have a two series bar chart that displays Income and Expenses. I was given some code (i think on another ticket) that calculated my two series for the legend. But now, it only works when Income or Income and Expenses are displayed, but not when income is displayed by itself.
Here is the code I am using in the Charts GetLegendText event:
It hits the code. Otherwise, there wouldn't be a dollar sign. So a few questions regarding this chart:
1. How can I fix the about code to calculate the legend correctly?
2. I would like to click on the X Labels if possible. Is there a way I can use an event when a user clicks on the dates below the chart?
Here is the code I am using in the Charts GetLegendText event:
Code: Select all
if Index < DBChart2.SeriesCount then
LegendText:= ' $' + FormatFloat('#,##0.00', DBChart2[Index].YValues.Total) + ' ' + LegendText;
1. How can I fix the about code to calculate the legend correctly?
2. I would like to click on the X Labels if possible. Is there a way I can use an event when a user clicks on the dates below the chart?