Skip to content

Commit 964aeec

Browse files
committed
Fix margin options to use automatic margin system by default
1 parent 61f2206 commit 964aeec

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

jquery.highchartTable.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,20 @@
295295
colors.push(typeof $table.data(dataname) != 'undefined' ? $table.data(dataname) : typeof themeColors[i] != 'undefined' ? themeColors[i] : defaultColors[i]);
296296
}
297297

298+
var marginTop = $table.data('graph-margin-top');
299+
var marginRight = $table.data('graph-margin-right');
300+
var marginBottom = $table.data('graph-margin-bottom');
301+
var marginLeft = $table.data('graph-margin-left');
302+
298303
var highChartConfig = {
299304
colors: colors,
300305
chart: {
301306
renderTo: graphContainer,
302-
inverted: isGraphInverted,
303-
marginTop: $table.data('graph-margin-top'),
304-
marginRight: $table.data('graph-margin-right') || 50,
305-
marginBottom: $table.data('graph-margin-bottom') || 70,
306-
marginLeft: $table.data('graph-margin-left') || 80,
307+
inverted: isGraphInverted,
308+
marginTop: typeof marginTop != 'undefined' ? marginTop : null,
309+
marginRight: typeof marginRight != 'undefined' ? marginRight : null,
310+
marginBottom: typeof marginBottom != 'undefined' ? marginBottom : null,
311+
marginLeft: typeof marginLeft != 'undefined' ? marginLeft : null,
307312
spacingTop: $table.data('graph-spacing-top') || 10,
308313
height: $table.data('graph-height') || null
309314
},

0 commit comments

Comments
 (0)