This is a migrated thread and some comments may be shown as answers.

Trackball on selected series

3 Answers 97 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Josef
Top achievements
Rank 1
Josef asked on 23 May 2019, 09:36 AM
I have a chartview with three line series representing measurement values and two more displaying the upper an lower limit of the values.Is it possible to show the trackball only on the three measurement series. 

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 May 2019, 01:16 PM
Hi Josef,

You can use the TextNeeded event to change the default text. Here is an example that show how you can skip some series:
public RadForm1()
{
    InitializeComponent();
    var controler = new ChartTrackballController();
    controler.TextNeeded += Controler_TextNeeded;
    radChartView1.Controllers.Add(controler);
}
 
private void Controler_TextNeeded(object sender, TextNeededEventArgs e)
{
    StringBuilder sb = new StringBuilder();
 
    foreach (DataPointInfo point in e.Points)
    {
        if (point.Series == radChartView1.Series[0]  || point.Series == radChartView1.Series[1])
        {
            continue;
 
        }
        var dataPoint = point.DataPoint as CategoricalDataPoint;
        sb.AppendLine(point.Series.Name + " " + dataPoint.Value);
 
    }
    e.Text = sb.ToString();
}

If you are using straight lines for the limit series you can replace them with annotations: Grid line | UI for WinForms Documentation.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Josef
Top achievements
Rank 1
answered on 27 May 2019, 05:01 AM

 Hello Dimitar,

thanks for you immediate response. I think this meets my needs. Checking the grid line annotation I stumbled on the marked zone annotation. I think about using this to display different limit ranges. 

 

Regards,

Josef

0
Dimitar
Telerik team
answered on 27 May 2019, 11:29 AM
Hi Josef,

Ok, let me know if you need further assistance.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Josef
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Josef
Top achievements
Rank 1
Share this question
or