Home › forums › Using CanvasJS › Problem with LegendText when there is no data
This topic contains 9 replies, has 2 voices, and was last updated by Samyukta 4 months, 3 weeks ago.
Below is the JsFiddle link of my existing code – StackedColumn with LegendText
I want to remove blank legend if there is no Legendtext available. Please help me resolving this issue.
Please take a look at this updated JSFiddle.
Thank you for your updated code. But in my case it’s not working again when I updated code. Please have a look and give me advice.
Sorry I forgot to add updated jsFiddle – https://jsfiddle.net/c1r7mkb8/
The issue seems to be in parsing the JSON. Parsing JSON properly should work fine in your case. Please take a look at this updated JSFiddle.
Thank you so much! Really appreciated your great help! But one question, how these 2018 data is coming in the chart since we have JSON data only for 2019
Actually I need to plot dataPoints from January to December only as given in JSON data.
You can see 2018 and 2020 in axisX due to the auto-calculated minimum and maximum. You can customize it to show only 2019 data by setting minimum and maximum properties as shown in this updated JSFiddle.
Thank you so much for your help!
I really appreciated your help. But I still need your help in resolving the following issue. Please have a look in the screenshot.
You must be logged in to reply to this topic.