RadchartView trackball - horizontal line

1 Answer 21 Views
ChartView
coderz
Top achievements
Rank 1
coderz asked on 22 Aug 2022, 12:01 PM

Hi Telerik,

Trying to find trackball behavior, but I actually need to display a horizontal line, that crosses the given ScatterLineSeries  and starts at the corresponding vertical axis. (Attached an example image.)

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Aug 2022, 01:04 PM

Hi,

I believe that the CartesianGridLineAnnotation may fit your scenario:

https://docs.telerik.com/devtools/winforms/controls/chartview/features/annotations/grid-line 

Grid line annotations are lines or circles that cross the chart grid at location on the axis, specified by their Value property.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


coderz
Top achievements
Rank 1
commented on 23 Aug 2022, 08:02 AM

Exactly what i need, The trackball feature works as a horizontal line in the same way. not an annotation line.


If we do not have a chance to do this, there is two solution that solve this problem a little.

First it may be that the tooltip feature works in a sticky way. Because it is very difficult to place the mouse on the points in a graph with about approx 500 points.

Second one is trackball feature displaying the information of the graphic closest to the mouse location in multiple graphs.

Dess | Tech Support Engineer, Principal
Telerik team
commented on 25 Aug 2022, 07:16 AM

Note that you can increase the series' PointSize and thus the tooltips will be more easily shown. 

As to the trackball, note that it respects the orientation of the view area:

Vertical Orientation:

You can switch to Horizontal Orientation as it is demonstrated below:

            LineSeries lineSeries = new LineSeries();
            lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
            this.radChartView1.Series.Add(lineSeries);
            LineSeries lineSeries2 = new LineSeries();
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct"));
            this.radChartView1.Series.Add(lineSeries2);

            this.radChartView1.GetArea<CartesianArea>().Orientation = Orientation.Horizontal;
            radChartView1.Controllers.Add(new ChartTrackballController());

 

coderz
Top achievements
Rank 1
commented on 26 Aug 2022, 10:32 AM | edited

when we increase the series PointSize, all dots overlap each other and tooltip is not useful,  but the tooltips will be more easily shown when zoomed in. shown at example screenshot.

is there any tooltip option like SnapToClosestPoint for nearst point for cursor location.
Dess | Tech Support Engineer, Principal
Telerik team
commented on 29 Aug 2022, 12:00 PM

If you have many data points that they overlap with each other, it wouldn't be easy to distinguish for which data point exactly to show the tooltip as several points are located in the specific location. It depends on which point is rendered top most which is controlled by the order of adding the series to the chart:

Indeed, vertical zooming may be appropriate for your case: https://docs.telerik.com/devtools/winforms/controls/chartview/features/scroll-and-zoom 

Tags
ChartView
Asked by
coderz
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or