Chartjs-Need to put border on variablepie highchart?

2๐Ÿ‘

โœ…

1 โ€“ To add the border use Highcharts. SVGRenderer:

chart: {
    type: 'variablepie',
    events: {
        load: function() {
            this.renderer.circle(
                this.chartWidth / 2,
                this.plotHeight / 2 + this.plotTop,
                this.plotHeight / 2
            ).attr({
                fill: 'rgba(0,0,0,0)',
                stroke: 'green',
                'stroke-width': 2
            }).add()
        }
    }
}

API: https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#circle

2 โ€“ To change the colors of points set the colors array:

colors: ['#4286f4', '#19e597', '#e84a4a', '#bbd827', '#27cfd8', '#d827cf', '#3a1c0f'],

API: https://api.highcharts.com/highcharts/colors

3 โ€“ To change text size in the legend set fontSize in itemStyle:

legend: {
    itemStyle: {
        fontSize: 16
    }
}

API: https://api.highcharts.com/highcharts/legend.itemStyle

Live demo: https://jsfiddle.net/BlackLabel/dLv2e0hq/

Leave a comment