What is the use of rowDefinitions property in the ejChart?
Essential JavaScript Chart supports splitting the chart area into multiple rows by using the rowDefinitions property. There are options to specify the row height, unit to consider (percentage or pixel) for the specified row height, color and width for the line that indicates where the row starts in the chart area.
Vertical axes can be added to a row by using the rowIndex property of the axis. By default, all the vertical axes are present at the row with index 0 (first row). This property is useful for displaying multiple series in the Chart.
Note that all the series in the Chart should be compatible with one other when using the rowDefinitions property; incompatible series types are not rendered. For example, column and bar type series are not compatible. When attempts are made to render incompatible series in different rows, either the column or bar series are drawn based on their position in the series collection.
JS
$("#container").ejChart({ //Splits chart area into multiple rows. rowDefinitions: [{ //Specifies height for the row. rowHeight: 50, //Specifies whether height should be considered in percentage. unit: 'percentage', lineColor: 'green', lineWidth: 2 }, . . . . . . . . . . . . ], primaryYAxis: { //Places axis at the second row. rowIndex: 1 }, axes: [{ orientation: 'vertical', name: 'SecondaryY', //Places axis at the first row. First row starts from the bottom of the chart area. rowIndex: 0 }], . . . . . . . . . . . . . . });
The following screenshot displays the Chart with multiple rows.
JS Playground sample link: Row definitions
Conclusion
I hope you enjoyed learning about what is the use of rowDefinitions property in the ejChart.
You can refer to our JavaScript Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Chart example to understand how to create and manipulate data.
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. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!