Category / Section
How to customize the border of legend and legend items in ASP.NET MVC Chart?
1 min read
Essential Chart supports customizing width and color of legend border by using Border property of legend. To customize the legend items’ border, you can use ItemStyle property of legend. Item style property contains the Border property to customize the width and color of legend items’ border.
CSHTML
@(Html.EJ().Chart("container") . . . . . . . . . . . . . . .Legend(legend => legend.Border(border => border.Width(2).Color("orange")).ItemStyle(style =>style.Border(border => border.Width(2).Color("black")))) . . . . . . . . . . . . . . )