Skip to Content
author's profile photo Former Member
Former Member

position for the legend ui5 vizcharts

Hi experts,

i can keep legend at the bottom of viz chart ,i would like to keep it middle at bottom

thanks

sc22.png (9.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Nov 25, 2015 at 08:40 AM

    Hi Shahid,

    You mean something like this? JS Bin - Collaborative JavaScript Debugging

    Regards,

    Sai Vellanki.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 25, 2015 at 06:23 AM

    Please check this example code. It may be useful :example code

    you just need to add legendGroup and its property position as mentioned below.

    var legendPosition = new sap.viz.ui5.types.Legend({layout: {

    position: "left"

    }});

    var column = new sap.viz.ui5.StackedColumn("chartStackedColumn", {

    width : "80%",

    height : "400px",

    title : { },

    dataset : dataset,

    legendGroup: legendPosition

    });

    Add a comment
    10|10000 characters needed characters exceeded

    • try with this code

      var oDualChart = new sap.viz.ui5.DualLine(

      {

      id: "dualline",

      width : "50%",

      height : "300px",

      legendGroup :new sap.viz.ui5.types.Legend({layout:new sap.viz.ui5.types.Legend_layout({position :sap.viz.ui5.types.legend.Common_position.middle}) }),

      legend : new sap.viz.ui5.types.legend.Common({isScrollable:true}),

      title: {

      visible : true,

      text : 'Profit & Measure By Region & Company'

      },

      dataset: oDataset

      }

      );

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.