Bar

Population: Age Structure
Data Estimate for 2020
0-14 years
15-64 years
65 years and older

This example uses the Age Structure dataset to illustrate different bar chart types. You can switch between the five different styles: Bar, Stacked Bar, Side-by-Side Stacked Bar, Full-Stacked Bar, and Side-by-Side Full-Stacked Bar.

Note that you need to use the Stack property to enable side-by-side views.

Histogram

Generated Data
Normal Distribution

This example uses the bar series to plot a histogram. The bar height depends on the number of points that belong to the histogram bin. You can change the histogram bin width in the Interval Width spin box on the top. The interval width is assigned to the DxChartAxis.TickInterval property. This example also applies the Count summary method used to calculate the number of values in histogram bins.

The DxChartBarSeries.BarPadding property specifies the padding between a bar and ticks, and consequently the bar width.

The line series is used to plot the Normal Distribution function. You can compare the line and bar graphs to see how close theoretical calculations are to actual results.

Since the magnitude of bar and line series point values is different, this chart uses a secondary value axis (hidden) to plot the line series. The DxChart.SynchronizeAxes property is set to false to disable axis synchronization and avoid distortion of graphs.