12-22-2022, 05:37 AM
(This post was last modified: 12-22-2022, 05:39 AM by neeraja.pattathil@bdb.ai.)
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;
}
//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;
}