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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

What is the use of columnDefinitions property in ejChart?

Platform: jQuery |
Control: 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.


     //Splitting chart area into multiple columns
    columnDefinitions: [{
       //Specifying width for the column
        columnWidth: 50,
        //Specifying width should be considered in percentage
        unit: 'percentage',
    . . . . . . . .
    . . . . . . . .
    primaryXAxis: {
        //Placing axis at second column
        columnIndex: 1
    axes: [{
        orientation: 'horizontal',
        name: 'SecondaryX',
        //Placing axis at first column. First column starts from the left side of chart area
        columnIndex: 0
    . . . . . . .
    . . . . . . .


The following screenshot displays chart with multiple columns.

Use of column definitions

Figure 1: Output

JS Playground sample link: Column Definitions

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile