Hi,
I would like to have the mark tips showing data that is not part of the series. For example, I've a dataset:
date, sales, demand, description
'1-Jan-2007',400,300,'Apple'
'2-Jan-2007',300,300,'Orange'
I've 2 series on the chart, sales & demand plotted against date, which uses data from the above dataset. If I were to use the XY function for Mark Tips, I would get the date and either sales or demand data depending on which series the mouseover is.
However, if I also want to show the description (and XY data) for the sales series only but having the demand series to just have XY data, how could I achieve this?
I've read on other threads that Get Text function can plot other data apart from XY data, but I'm not sure if it can be used for this case.
Please advise. Thank you.
Mark Tips for data not part of the series
Hi Dave
You can use a markstips tool, associate to one serie, as below code:
Also you can show and hide the marks of the series:
Yes, you can use the "GetText" event.
You can use a markstips tool, associate to one serie, as below code:
Code: Select all
MarksTip marksTip1 = new MarksTip(tChart1.Chart);
marksTip1.Series = line1; //Associate the MarksTip tool to line1.
marksTip1.Active = true;
marksTip1.MouseDelay = 1;
marksTip1.MouseAction = MarksTipMouseAction.Move;
marksTip1.Style = MarksStyles.XY;
Code: Select all
line1.Marks.Visible = !line1.Marks.Visible;
Hi Edu,
I think you misunderstood my question. When I mouseover a series, I want it to show additional data that is not contained in that series.
Referring back to my dataset example, if I were to plot a series data for sales, it'll have the date and sales data.
However, if I want to use Mark Tips to also show the description when I mouseover the sales series, how could I do that?
Currently, using your suggestion, when I mouseover, I'll get something like 1/01/2007 400 for one of the data points on the sales series. However, I would like the mouseover to show 1/01/2007 400 Apple. Is that possible?
Thanks.
I think you misunderstood my question. When I mouseover a series, I want it to show additional data that is not contained in that series.
Referring back to my dataset example, if I were to plot a series data for sales, it'll have the date and sales data.
However, if I want to use Mark Tips to also show the description when I mouseover the sales series, how could I do that?
Currently, using your suggestion, when I mouseover, I'll get something like 1/01/2007 400 for one of the data points on the sales series. However, I would like the mouseover to show 1/01/2007 400 Apple. Is that possible?
Thanks.
Hi Dave
You should to use a label style in the marktips tool, and when you'll add the values, you should also put in the label the date and the value, as below code:
You should to use a label style in the marktips tool, and when you'll add the values, you should also put in the label the date and the value, as below code:
Code: Select all
line1.Add(DateTime.Parse("1-Jan-2007"), 400, "1-Jan-2007 400 Apple");
line1.Add(DateTime.Parse("2-Jan-2007"), 300, "2-Jan-2007 300 Orange");
tChart1.Legend.TextStyle = Steema.TeeChart.LegendTextStyles.Value; //Legend shows the value
tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value; //Axis shows the date