Skip to Content
avatar image
Former Member

charts padding in design studio 1.6

HI Experts,

Please find the below image of alignment of charts

i want all these four charts aligned properly

i have given equal padding but still behaves same could anyone give some tips on this

top padding -10

bottom and left,right-0

same for all charts

k9rdt.png (14.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Mar 23, 2017 at 09:49 PM

    Hi Varun.

    I had the same problem. So I put all charts into a panel and setting the panel left margin dinamically.

    Result


    In my case, the 3rd group of charts has a fixed range for primary scale (0% to 100%), so I used it like my anchor.

    Group 3:


    So I got the max value from each datasource using like this:

    var v_members = DS_1.getMembers("0CALMONTH", 100);
    var vMaxValue1 = 0.0;
    var v1 = 0.0;
    v_members.forEach(function(element, index) 
    {
      v1 = DS_1.getData("MEASURE", {"0CALMONTH": element.internalKey}).value;
      if (index == 0) { vMaxValue1= v1;}
      else 
      {  
         if(vMaxValue1<v1) { vMaxValue1=v1; } 
      }
    });
    var val = ((Math.round(vMaxValue1)+"").length * (-10)) + 60;
    
    if (vMaxValue1 < 100) 
    { 
      CHART_1.setAxisScaling(InfoChartAxisScaling.AXIS_1, 0, 100); 
      val = 30;
    }
    else 
    { 
      CHART_1.setAxisScaling(InfoChartAxisScaling.AXIS_1, 0, vMaxValue1 + Math.round((vMaxValue1 * 0.3)));
    }
    
    PANEL_PADDING_1.setLeftMargin(val);
    
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 23, 2016 at 01:19 AM

    Hi Varun,

    You have alignment mismatch because of the length of your axis labels in your charts. To avoid it you can give left padding to all the charts as per the space needed for the label of maximum length.

    In your case, you need to give left padding value according to the second chart as it's label has four digit values.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 24, 2016 at 08:13 PM

    HI ,

    I tried with giving left padding same for all charts but no luck. is there any workaround because look and feel it dont look good

    Padding properties(same for all charts)

    Thanks,

    varun

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 25, 2016 at 04:40 AM

    Hi Varun,

    I think, value 100 or 110 for padding left will work for your charts.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded