I would like to display a tooltip when one touches a point in my graph. I've tried SeriesHotspot, Annotations and Marks with no success.
Is there a way to achieve this on TeeChart Mobile?
Thanks for your help.
the MarksTip Tool still not available for the available version, but we're going to consider to add it in one of the next releases or maintenance releases. In meantime the only way I can think of would be to make use of the Click_Series event, and to the work there. As you have all the necessary information, you should be able to display the info into the screen once the user tap over the Series point. Code should look like :
Adding event for the series :
_controller.chart.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(series_clicked);
And here the method to call :
private void series_clicked(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, UIGestureRecognizer e)
{
//Console.WriteLine("Series clicked");
_controller.chart.Tools.Clear();
_controller.chart.Tools.Add(new Steema.TeeChart.Tools.Annotation());
int i = _controller.chart.Tools.Count-1;
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Text = _controller.chart.Series[0].YValues[valueIndex].ToString();
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Top = 50;
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Left = 50;
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Shape.Font.Size = 20;
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Shape.Font.Color = UIColor.Red.CGColor;
(_controller.chart.Tools[i] as Steema.TeeChart.Tools.Annotation).Shape.Transparent = true;
}
Hope that it helps.
regards ! Pep