To customise a tooltip I have the ItemToolTipOpening event I can hook into. However this is a single event set at the chart area level (despite the fact I set the fact I want tooltips at the DataSeries level)
Most of the data, other than the data value itself is set to 0 or null even though I get a DataPoint and DataSeries back in ItemToolTipEventArgs Basically I have no way of knowing which DataSeries triggered the event and so it is impossible to customise different tooltips with text appropriate for different data series.
To give a specific example, I want to customise a different tooltip for each different series in a stacked bar chart.
So if I have three bars stacked A=20, B=10 and C=30 and I want a tooltip that displays "A has a value of 20" or "B has a value of 10" I can use the DataPoint.YValue(ie 10, 20 or 30) to determine which of A, B or C the event has fired for and customise the tooltip accordingly. But this is a kludge that doesn't work if eg both A and B have the same value. It would be preferable to get something back that gives me the DataSeries index value (eg 0, 1 or 2) for which the event has been fired so I know specifically which data series has triggered the event. It seems pointless to allow turning on tooltips at the dataseries level but then not provide the information at the customisation event point to advise which dataseries wants the customised tooltip.
Is there any way in the event to work around this or ascertain which specific dataseries has fired the event?
Thanks,
Ian
Most of the data, other than the data value itself is set to 0 or null even though I get a DataPoint and DataSeries back in ItemToolTipEventArgs Basically I have no way of knowing which DataSeries triggered the event and so it is impossible to customise different tooltips with text appropriate for different data series.
To give a specific example, I want to customise a different tooltip for each different series in a stacked bar chart.
So if I have three bars stacked A=20, B=10 and C=30 and I want a tooltip that displays "A has a value of 20" or "B has a value of 10" I can use the DataPoint.YValue(ie 10, 20 or 30) to determine which of A, B or C the event has fired for and customise the tooltip accordingly. But this is a kludge that doesn't work if eg both A and B have the same value. It would be preferable to get something back that gives me the DataSeries index value (eg 0, 1 or 2) for which the event has been fired so I know specifically which data series has triggered the event. It seems pointless to allow turning on tooltips at the dataseries level but then not provide the information at the customisation event point to advise which dataseries wants the customised tooltip.
Is there any way in the event to work around this or ascertain which specific dataseries has fired the event?
Thanks,
Ian