Home Forums Chart Support Problem with LegendText when there is no data

Problem with LegendText when there is no data

Viewing 10 posts - 1 through 10 (of 10 total)
  • #25589

    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

    #25592

    @Samyukta,

    Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

    #25598

    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.

    Regards,
    Samyukta

    #25599

    Sorry I forgot to add updated jsFiddle – https://jsfiddle.net/c1r7mkb8/

    #25601

    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.


    Vishwas R
    Team CanvasJS

    #25602

    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

    Regards,
    Samyukta

    #25603

    Actually I need to plot dataPoints from January to December only as given in JSON data.

    Regards,
    Samyukta

    #25613

    Samyukta,

    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.


    Vishwas R
    Team CanvasJS

    #25618

    Thank you so much for your help!

    Regards,
    Samyukta

    #25637

    Hi Vishwas,

    I really appreciated your help. But I still need your help in resolving the following issue. Please have a look in the screenshot.

    Screenshot

    Regards,
    Samyukta

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.