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;
chart.Series.Add(series);
=====================================================
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; }
}