We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ErrorBar Chart for Standard Deviation

Thread ID:





129417 Mar 16,2017 11:40 AM UTC Mar 17,2017 01:07 PM UTC ASP.NET Web Forms 1
Tags: Chart
Asked On March 16, 2017 11:40 AM UTC


I'm trying to draw ErrorBars for a standard deviation function I was given on a Chart of type Line which displays averages.

I have the following model bound to the chart control

public class ChartDataModel 
    public string GroupValuesName {get;set;}
    public List<double> Values {get;set;}
    public double Average {get;set;}
    public double StandardDeviation {get;set;}   

I'm calculating the standard deviation which is a double in the following manner: 

var model = new ChartDataModel();
model.GroupValuesName = "GroupName";
model.Values = GetValues();
model.Average = model.Values.Average();

var count = model.Values.Count();
var sum = model.Values.Sum(value => (value - model.Average) * (value - model.Average));

model.StandardDeviation = Math.Sqrt(sum/count);

I want to show the standard deviation double value as the VerticalNegativeErrorValue and VerticalPositiveErrorValue of the ErrorBar in my chart line series.

I'm passing the data to the chart on the c# server side.

All the examples in the documentation show how to bind the server side model to the Chart control and set the series XName and YName values, where the YName in my situation would be the Average property of my data model.

What type should my series be and how would I draw my double model.StandardDeviation properties as the Positive and Negative Error value of the ErrorBar?

Anandaraj T [Syncfusion]
Replied On March 17, 2017 01:07 PM UTC

Hi Pantelis, 

Thanks for using Syncfusion products. 

We found that you have created a support incident under your account for the same query. We suggest you to follow up the support incident for better solution. 

Please let us know if you have any concern. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon