You must be logged in to post your query.
Home › Forums › Chart Support › Problem with LegendText when there is no data
Below is the JsFiddle link of my existing code – StackedColumn with LegendText https://jsfiddle.net/yp9bj1L2/1/
I want to remove blank legend if there is no Legendtext available. Please help me resolving this issue.
Regards, Samyukta
@Samyukta,
Please take a look at this updated JSFiddle.
— Vishwas R Team CanvasJS
Hi Vishwas,
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/
Samyukta,
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.
Screenshot
You must be logged in to reply to this topic. Login/Register