I have a teechart which has multiple series and I want use the markstip to show out both label value and the series name when mouse over. How could I do that?
Chart.Tooltip1 = new Steema.TeeChart.Tools.MarksTip(Chart);
Chart.Tooltip1.Style = MarksStyles.Labelvalue;
Chart.Tooltip1.GetText += new Steema.TeeChart.(tooltip1_GetText);
Asked
Active
Viewed 1,330 times
1

user3430882
- 35
- 1
- 8
1 Answers
2
You can use series' GetSeriesMark event for that, for example:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Series.Add(new Steema.TeeChart.Styles.Bar()).FillSampleValues();
tChart1[0].GetSeriesMark += Form1_GetSeriesMark;
tChart1[0].Marks.Visible = false;
tChart1.Tools.Add(new Steema.TeeChart.Tools.MarksTip());
}
void Form1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
e.MarkText = "X: " + series.XValues[e.ValueIndex].ToString() + ", Y: " + series.YValues[e.ValueIndex].ToString() + " - " + series.ToString();
}
}

Narcís Calvet
- 7,304
- 5
- 27
- 47
-
Thank you, if i just want the marks show as tooltips when my mouse go over a point instead of whole series, how should I do that – user3430882 Jan 20 '15 at 18:52
-
@user3430882 you should add a MarksTip tool (Steema.TeeChart.Tools.MarksTip) to your chart. You'll find an example at All Features\Welcome !\Tools\Mark tips in the features demo available at TeeChart's program group. I've also modified my reply demoing that. – Narcís Calvet Jan 21 '15 at 08:15