Skip to content

Commit 84703c7

Browse files
author
Pascal Martin
committed
Adds a data-graph-xaxis-labels-enabled option, which allows one to disable the labels on the X-axis (useful when there are so many items that labels overlap each others)
1 parent 964aeec commit 84703c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jquery.highchartTable.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@
299299
var marginRight = $table.data('graph-margin-right');
300300
var marginBottom = $table.data('graph-margin-bottom');
301301
var marginLeft = $table.data('graph-margin-left');
302+
303+
var xAxisLabelsEnabled = $table.data('graph-xaxis-labels-enabled');
302304

303305
var highChartConfig = {
304306
colors: colors,
@@ -344,7 +346,8 @@
344346
labels:
345347
{
346348
rotation: $table.data('graph-xaxis-rotation') || 0,
347-
align: $table.data('graph-xaxis-align') || 'center'
349+
align: $table.data('graph-xaxis-align') || 'center',
350+
enabled: typeof xAxisLabelsEnabled != 'undefined' ? xAxisLabelsEnabled : true
348351
},
349352
startOnTick: $table.data('graph-xaxis-start-on-tick'),
350353
endOnTick: $table.data('graph-xaxis-end-on-tick'),

0 commit comments

Comments
 (0)