Articles in this section
Category / Section

What is the use of RowDefinitions property in ASP.NET MVC Chart?

1 min read

Essential 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.

CSHTML

@(Html.EJ().Chart("container")
    .RowDefinitions(definitions =>
    {
    definitions.RowHeight(50).Unit("percentage").LineColor("green").LineWidth(3).Add();
         . . . . . . . . . .
         . . . . . . . . . .
    })
    .PrimaryYAxis(axis =>
        axis.RowIndex(1))
    .Axes(axis =>
    {
        axis.RowIndex(0).Name("SecondaryY").Orientation("vertical").Add();
    })
    . . . . . . . . .
    . . . . . . . . .
)

The following screenshot displays the Chart with multiple rows.

The use of RowDefinitions property in ejChart

Conclusion

I hope you enjoyed learning about the use of RowDefinitions property in Chart

You can refer to our ASP.NET MVC 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 ASP.NET MVC 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 forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied