MindFusion.Charting Programmer's Guide

BarChart Class

Remarks See Also
 





A class for drawing bar charts.

Namespace: MindFusion.Charting
Assembly: MindFusion.Charting

 Syntax

C#  Copy Code

public class BarChart : AxesChart

Visual Basic  Copy Code

Public Class BarChart
    Inherits AxesChart

JavaScript  Copy Code

// class
BarChart.prototype = {}

 Remarks

BarChart inherits properties and methods from its base class AxesChart.

The class is used for drawing all types of bar charts - flat (2D charts) as well with 3D visual effect. The different bar types are listed as members of the BarType Enumeration. You can set the type of the bar chart with the BarType property. The Cylinder property enables you to draw the data as cylinders instead of bars.

The data for the bar chart is set with Data, which is used for calculating the height of the bars. The data can be numbers, or in any other format that can be parsed to numbers.

The orientation of the chart is set with the Horizontal property. The layout of bars in multiple series is set with BarSeriesLayout.

You can change the offset between the first bar and the beginning of the axis Offset. The distance between the bars - both horizontal and vertical - can be specified with DistBtwBarsBarWidth regulates the thickness of bars. Distance between bar series is specified with DistBtwSeries.

Bars can have labels inside and / or at the top. The type of the labels is set with InnerLabelType and TopLabelType. Custom labels are specified with InnerLabels and TopLabels. The position of the inner label inside the bar is set with InnerLabelAlignment.

Top labels can be rotated and drawn with offset from the edge of the bars as specified by the TopLabelRotAngle and TopLabelOffset properties. Use ClusterLabels if you want to draw a label at each cluster or group of bars.

The bar chart can be drawn with a grid, which type is set with the GridType property. The width of crossed grids is set with GridWidth. The grid can be drawn with stripes. The brushes for them are specified with GridBrush and AltGridBrush. Custom-set grid points are also possible.

 Inheritance Hierarchy

System.Object
    MindFusion.Charting.Chart
        MindFusion.Charting.AxesChart
            MindFusion.Charting.BarChart

 See Also