How To Create Chart in RadChartView With one Vertical arc

4 posts, 0 answers
  1. Bahman
    Bahman avatar
    4 posts
    Member since:
    May 2018

    Posted 15 May 2018 Link to this post

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

    Posted 16 May 2018 Link to this post

    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.
  3. Bahman
    Bahman avatar
    4 posts
    Member since:
    May 2018

    Posted 16 May 2018 Link to this post

    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.

  4. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 16 May 2018 Link to this post

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