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

How To Create Chart in RadChartView With one Vertical arc

3 Answers 117 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Bahman
Top achievements
Rank 1
Bahman asked on 15 May 2018, 01:36 PM
Also, I started drawing a chart using ScatterLineSeries. Unfortunately, the problem with this is that the peaks and descents in this chart model are not what I want, and sometimes the chart is somewhat unusual. For a better explanation, I will add the charts I have prepared and the charts I intend to add. Please advise you on how to make a perfect match like the sample image.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 May 2018, 06:30 AM
Hello Bahman,

Are you using the same data for both charts? Could you give us an example data for such line and how many data points are used in your desired chart? 

In general, you can try setting the Spline property of the series:
ScatterLineSeries scatterSeries = new ScatterLineSeries();
scatterSeries.DataPoints.Add(new ScatterDataPoint(-400, 0.1));
scatterSeries.DataPoints.Add(new ScatterDataPoint(-200, 0.2));
scatterSeries.DataPoints.Add(new ScatterDataPoint(0, 1.5));
scatterSeries.DataPoints.Add(new ScatterDataPoint(200, 0.2));
scatterSeries.DataPoints.Add(new ScatterDataPoint(400, 0.1));
scatterSeries.Spline = true;
scatterSeries.SplineTension = 0.3f;
this.radChartView1.Series.Add(scatterSeries);

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bahman
Top achievements
Rank 1
answered on 16 May 2018, 07:17 AM

In fact, in this chart I need a point. One x and one y
But the negative and positive sequence on this chart should be in a curve with a gentle slope similar to that in the attached image.
Initially, I did this using a point, but only one point was drawn. And then I added the positive and negative points that were always fixed (300 and -400). Unfortunately, the shape I was given was the reverse and the slope was composed of a wave. And finally, in order to draw this shape manually similar to what I needed, I had to add points between the original data and the endpoints.
I will put the code I use here, but I think that this code may not be optimal due to the previous post that changes the style of the chart grid.

0
Dimitar
Telerik team
answered on 16 May 2018, 01:30 PM
Hello Bahman,

We do not have any functions that can create such chart, we only provide the UI. In this case, I would suggest using a function to generate sufficient amount of points that can be painted on the chart. A good example I believe is available here: c# - Random Gaussian Variables - Stack Overflow. Another one can be found here:  Bell Curve, Gaussian Function, or Normal Distribution - CodeProject.

I hope this will be useful. 

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ChartView
Asked by
Bahman
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Bahman
Top achievements
Rank 1
Share this question
or