What is the use of ColumnDefinitions property in ejChart?
Essential Chart supports splitting the chart area into multiple columns by using the ColumnDefinitions property. It has options that allow you to specify the column width and unit to be considered like percentage or pixel, for the specified width of a column.
Horizontal axes can be added to a column using the ColumnIndex property of the axis. By default, all the horizontal axes are present at the column with index 0, that is, the first column. This property is useful in scenarios that need to display multiple series in the chart. It can also be used in combination with the RowDefinitions property to split chart area into multiple rows and columns.
Note that all the series in the chart should be compatible with each other when you are using the ColumnDefinitions property, since incompatible series types are not rendered. For example, column and bar type series are not compatible with each other. When any attempts are made to render incompatible series in different columns, either the column or the bar series will be drawn based on their position in the series collection.
<ej:Chart ID="container" runat="server"> <ColumnDefinitions> <ej:ColumnDefinitions ColumnWidth="50" Unit="percentage" /> . . . . . . . . . . . . . . </ColumnDefinitions> <PrimaryXAxis ColumnIndex="1"></PrimaryXAxis> <Axes> <ej:Axis RowIndex="0" Name="SecondaryX" Orientation="horizontal"></ej:Axis> </Axes> . . . . . . . . . . . . . . . . </ej:Chart>
The following screenshot displays chart with multiple columns.
Figure 1: Output
The Classic controls can be used in existing projects; however, if you are starting a new project, we recommend using the latest version of Essential Studio for ASP.NET. Although Syncfusion will continue to support all Classic Versions, we are happy to assist you in migrating to the newest edition.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls. If you have any queries or require clarifications, please let us know in the comments section below.