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

SfChart Histogram Yaxis range setting

Thread ID:





129428 Mar 16,2017 11:30 PM UTC Mar 20,2017 10:36 AM UTC WPF 3
Tags: SfChart
Asked On March 16, 2017 11:57 PM UTC

My Y binding data for  HistogramSeries definitely has frequency counts of more than 1. However, after binding, it detects that the maximum is 1 and plots my histogram as shown below.

The x axis is fine.

My understanding for HistogramSeries data is
X data -> location of each bin
Y data -> Number of counts in each bin
and then I set some bin interval.
Is this correct? If not, what is the series expecting for X and Y data?

Below is the code that I use.


var plotPoints = new ObservableCollection<HistoPlotPoint>();

            foreach (var pt in pgDataSet.Histogram.HistogramPoints)


                plotPoints.Add(new HistoPlotPoint(pt.X, pt.Y));



            // Perform Data Binding

            var series = new HistogramSeries();

            series.ItemsSource = plotPoints;

            series.XBindingPath = "X";

            series.YBindingPath = "Y";

            series.HistogramInterval = pgDataSet.Histogram.BucketSize;

            series.ShowTooltip = true;


            series.Interior = Brushes.Orange;


            series.ShowNormalDistributionCurve = true;




private class HistoPlotPoint


public HistoPlotPoint(double x, double y, string toolTip = null)


X = x;

Y = (int) y;

ToolTip = toolTip;


public double X { get; set; }

public int Y { get; set; }

public string ToolTip { get; set; }


Devi Aruna Maharasi Murugan [Syncfusion]
Replied On March 17, 2017 09:34 AM UTC

Hi Keenan, 
Thanks for contacting Syncfusion Support. 
In SfChart, the histogram series Y-values are calculated internally as number of x-values fall in each bin (in provided HistogramInterval). So, we no need to define Y-data (Number of count in each bin) externally in sample.  
We have prepared a demo sample with histogram series for your reference and it can be downloaded from below link, 
Sample: HistogramSample 
Please find the output screenshot for the above code snippet 

Replied On March 17, 2017 03:00 PM UTC

Thank you. I can get my histogram working now.

However, I do not understand why in the example you have histogram.YBindingPath = "Value" when only Model.Price is set but Model.Value is null. Why is histogram.YBindingPath = "Value" needed and what does it do?

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On March 20, 2017 10:36 AM UTC

Hi Keenan, 
Thanks for your update. 
We would like to inform you that we have generated data points for all the XYDataSeries based on XBindingPath and YBindingPath property. So, we must specify the YBindingPath for HistogramSeries (here we can define the empty YData). 
As we mentioned in our earlier update, we have calculated Y-Values internally based on the number of X-values falls in each bin. 


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