Trackball on selected series

4 posts, 0 answers
  1. Josef
    Josef avatar
    9 posts
    Member since:
    Jan 2013

    Posted 23 May Link to this post

    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. 
  2. Dimitar
    Admin
    Dimitar avatar
    2728 posts

    Posted 23 May Link to this post

    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.
  3. Josef
    Josef avatar
    9 posts
    Member since:
    Jan 2013

    Posted 27 May in reply to Dimitar Link to this post

     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

  4. Dimitar
    Admin
    Dimitar avatar
    2728 posts

    Posted 27 May Link to this post

    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.
Back to Top