Skip to Content

How to create a viz chart with 2 y-axes?

Hi,

I want to create a viz chart with 2 y-axes.Can anyone help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Feb 02, 2015 at 05:26 PM

    Hi you can use dual combination charts

    sap.viz.ui5.types.Combination

    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.viz.ui5.types.Combination

    or

    sap.viz.ui5.DualCombination(I bar(primary) + n line charts(secondary axis))

    for second case you can give the dataset as

    var oDataset = new sap.viz.ui5.data.FlattenedDataset({

    dimensions : [

    {axis : 1, name: "ABC", value: "{ABC}"},

    ],

    measures : [

    {group: 1, name : "A", value : "{A}"},

    {group: 2, name : "B", value : "{B}"},

    {group: 2, name : "C", value : "{C}"}

    ],

    data : {

    path : "/data"}

    });

    this will create A as primary axis (Bar)

    B , C as Secondary axis (Line)

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Michael, actually it's better to check the api docu, my example was also not really correct, i adapted my example: https://jsfiddle.net/sok_/dnj2ar73/3/

      Here the link to the parameters: https://sapui5.netweaver.ondemand.com/docs/vizdocs/index.html

      For dual_line the correct property names for the axis are categoryAxis (Dimension) and valueAxis resp. valueAxis2 . The VizFrame type needs to have two Axis supported, you can check the docu. It's the one with dual_.. starting. Eg. dual_stacked_combination has 2 axis, but for the measures on the axis, it seems to render the first axis measure as colum, the following as lines, not exactly what you mentioned. According to the docu, you can create your own series type. maybe i try it out when i find some time ;-), br, Sophie.

  • Posted on Feb 02, 2015 at 04:42 PM

    Hi Singanamala,

    you mean like here:

    https://sapui5.hana.ondemand.com/sdk/test-resources/sap/viz/Charting.html

    see Dual bar / line ?

    i dropped it also into a jsfiddle http://jsfiddle.net/sok_/stxhnLbe/

    best regards, Sophie.

    Add a comment
    10|10000 characters needed characters exceeded

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.