Skip to Content
0

charts padding in design studio 1.6

Nov 22, 2016 at 07:17 PM

112

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

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

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);

sem-titulo.png (33.9 kB)
sem-titulo1.png (22.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 23, 2016 at 01:19 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 24, 2016 at 08:13 PM
0

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


kfpja.png (10.8 kB)
xv099.png (2.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 25, 2016 at 04:40 AM
0

Hi Varun,

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

Thanks,

Poovarasan

Share
10 |10000 characters needed characters left characters exceeded