I have implemented spline chart component using angular 4 . I need legend icons to be displayed as square but it is appearing as circle. One of the reasons why i feel it is circle is because , I have defined the marker as circle. It displays the circle for the plotted lines as well as legend icons. I need it to be displayed as circle for plotted lines but square for legends
I have tried the following but it doesn't seem to apply. Could somebody tell me why it isn't applying.
legend: {
symbolRadius: 0,
symbolHeight: 20,
symbolWidth: 20
}
It looks like this at present
Need it to look like this
The complete code is below
export class SplineChartComponent implements OnChanges {
public options: any;
chart: any;
@Input() public series: any;
@Input() public yaxisdata: any;
@Input() public selectedRating: string = '';
constructor() {
this.options = {
credits: {
enabled: false
},
chart: {
type: 'spline',
},
title:{
text:''
},
subtitle:{
text:''
},
legend: {
align: 'right',
verticalAlign: 'bottom',
layout: 'horizontal',
margin: 25,
itemMarginTop: 0,
symbolRadius: 0,
symbolHeight: 20,
symbolWidth: 20
},
yAxis: {
categories: [
],
allowDecimals: false,
},
tooltip: {
},
plotOptions: {
series: {
allowPointSelect: true
},
spline: {
lineWidth: 2,
states: {
hover: {
lineWidth: 3
}
},
marker: {
enabled: true,
symbol: 'circle'
},
}
},
series: [
{
type: 'spline',
showInLegend: false
}
]
};
}