Forums

Full Version: Padding Script for component
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to adjust the padding for the components using the script?

//script in dashboard 

var arr = ['ComponentID1'];
for(var i=0;i<arr.length;i++){
var comp=sdk.getWidget( arr[i] );
comp.m_chartpaddings.leftBorderToDescription = 2;
comp.m_chartpaddings.leftDescriptionToMarkers = 2;
comp.m_chartpaddings.leftMarkersToLine = 2;
comp.m_chartpaddings.bottomBorderToDescription = 10;
comp.m_chartpaddings.bottomDescriptionToMarkers = 10;
comp.m_chartpaddings.bottomMarkersToLine = 5;
comp.m_chartpaddings.rightDescriptionToMarkers = 2;
comp.m_chartpaddings.rightMarkersToLine = 2;
comp.m_chartpaddings.rightBorderToLegend = 15;
comp.m_chartpaddings.topTitleToSubtitle = 10;
comp.m_chartpaddings.topSubtitleToChart = 15;
comp.m_chartpaddings.chartToBorder = 10;

}