Skip to Content

Change the legend value in sap vizframe

Hi All,

I am yet stuck in another sap ui5 implementations of vizframe. I have a requirement to change the legend value for a stacked column chart of sap.viz libarary. Basically i have a json which is binded with the stacked column chart. For example, i have to display a timeline representation of some sales information. Input Json looks like this






Now when i bind this json to the chart, in the legend there is No Value shown as one of the legends. So i need to find a way to show that 20.12.2015 has no items and number but still needs to be there since it is a timeline display, but without displaying No Value in the legend.

I looked into the getVizProperties() function in the vizframe control object but could not find a way to change the legend values. If anyone has possible suggestions or solution for this issue would be of great help. Thanks



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 19, 2016 at 02:21 AM

    Could you try double quoted the date value like "20.10.2015" and value of item like "books"?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2016 at 10:59 AM


    Take a look at SAPUI5 Explored - Stacked Column Chart

    Kindly Regards,

    Arthur Silva

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Arthur,

      Thanks for the link, but that's the first reference i look into while trying to implement a new control. Even with the given source code, i couldn'd finda way. What i tried is to retrieve the dataset binded with the chart and then manipulate the values and add them again. I tried chart.getDataset().getDimensions()[1].getValue() but unfortunately this returns null value. So i am kinda stuck. You can check the code here JS Bin - Collaborative JavaScript Debugging



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.