Articles in this section
Category / Section

How to customize the border of legend and legend items in JS Chart?

2 mins read

Essential Chart supports customizing width and color of legend border 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. This is illustrated in the following code example.

JS

$("#container").ejChart({
    . . . . . .
    . . . . . .
    legend: {
        visible: true, shape: "circle",
        //Customizing legend border
        border: { color: 'orange', width: 1.5 },
        itemStyle: {
            height: 10, width: 10,
            //Customizing legend item border
            border: { color: " black", width: 2 }
        }
    }
});

The following screenshot illustrates the output.

Customizing the border of legend and legend items

Figure 1: Customized Chart

JS Playground Link: Legend Border

 

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