Hi
I have 3 series in a stacked bar chart and i have assigned them titles. Also i have this piece of code-
Dim MarksTip1 As Steema.TeeChart.Tools.MarksTip
MarksTip1 = New Steema.TeeChart.Tools.MarksTip
MarksTip1.Style = Steema.TeeChart.Styles.MarksStyles.SeriesTitle
Now because of above when i hover mouse over the bars i can see the titles of the series. This is fine for series1 and series2 but i dont want to show it for series3. I want when user hover the mouse over series3 nothing should be displayed. But for this i dont want to remove the title of the seies3 as i want to show the same in legend. Is there any way to accomplish the same. Many thanks in advance.
Dont want to show Series title
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Dont want to show Series title
Hi shikha,
Yes, you can use MarksTip's GetText event to set to an empty string the hints you don't want to display, for example:
Yes, you can use MarksTip's GetText event to set to an empty string the hints you don't want to display, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
for (int i = 0; i < 3; i++)
{
tChart1.Series.Add(new Steema.TeeChart.Styles.Bar());
tChart1[i].Title = "Bar " + (i + 1).ToString();
tChart1[i].FillSampleValues();
}
Steema.TeeChart.Tools.MarksTip marksTip1 = new Steema.TeeChart.Tools.MarksTip(tChart1.Chart);
marksTip1.Style = Steema.TeeChart.Styles.MarksStyles.SeriesTitle;
marksTip1.GetText += new Steema.TeeChart.Tools.MarksTipGetTextEventHandler(marksTip1_GetText);
}
void marksTip1_GetText(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
{
if (e.Text == tChart1[tChart1.Series.Count - 1].Title)
{
e.Text = "";
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Dont want to show Series title
Great.. it worked perfectly.. Thanks so much...