Hi,
I am having an issue regarding legends in my chart.my data is absolutely dynamic so i am
i am setting the option[i].data[j].name =”some dynamic value”.while loading i can debug and see the option being loaded with the dynamic data in the legend.Even while rendering the option in chart,it’s showing the correct data but after the loading of the chart only the first legend is showing.
This i copied from the console the value of the option during run time..
Chart
options
:
axisX
:
{intervalType: “hour”, labelMaxWidth: 180, labelAngle: 0, labelFontFamily: “verdana0”, labelFontSize: 7, …}
data
:
Array(5)
0
:
{type: “line”, dataPoints: Array(440), name: “ABCD”, showInLegend: true}
1
:
{type: “line”, dataPoints: Array(441), name: “efgh”, showInLegend: true}
2
:
{type: “line”, dataPoints: Array(439), name: “W”, showInLegend: true}
3
:
{type: “line”, dataPoints: Array(0)}
4
:
{type: “line”, dataPoints: Array(0)}
length
:
5
__proto__
:
Array(0)
title
:
{text: “WT”, fontSize: 15}
zoomEnabled
:
true
__proto__
:
Object
render
:
ƒ ()
__proto__
:
Object
As shown above the first 3series has 3legend names.But after chart rendering only the first legend is being shown in the ui.Please refer to the below image for reference for the ui.Also the label is getting vanished for x axis.
If i set showLegend=true in both the data definition of the option statically as well as while dynamically updating the option,then the labels are showing,but then also the legends r not showing correctly.Please refer to the below image.
Please help.