Skip to content

Commit 6022332

Browse files
author
Mathieu Cottet
committed
Some more options to use spiderweb graph and polar chart (need to include highcharts-more.js)
* data-graph-polar "true" to render a polar graph. Default: undefined * data-graph-yaxis-{X}-grid-line-interpolation Define the graph type. Default: null ex: "polygon" to get a spiderweb graph * data-graph-xaxis-show-last-label If you have a number on the last label, put it to false. Default: true * tickmarkPlacement For categorized axes only. If "on" the tick mark is placed in the center of the category, if "between" the tick mark is placed between categories. default: "on" * data-graph-xaxis-gridLine-width The width of the grid lines extending the ticks across the plot area. Default: 0
1 parent b208df2 commit 6022332

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

jquery.highchartTable.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
var vlinex = $th.data('graph-vline-x');
129129
if (typeof vlinex == 'undefined') {
130130
thGraphConfig.scale = typeof columnScale != 'undefined' ? parseFloat(columnScale) : 1;
131-
thGraphConfig.graphType = serieGraphType == 'column' && isGraphInverted ? 'bar' : serieGraphType;;
131+
thGraphConfig.graphType = serieGraphType == 'column' && isGraphInverted ? 'bar' : serieGraphType;
132132
thGraphConfig.stack = serieStackGroup;
133133
thGraphConfig.unit = $th.data('graph-unit');
134134
columns[indexTh] = thGraphConfig;
@@ -283,7 +283,8 @@
283283
endOnTick: $table.data('graph-yaxis-'+yAxisNum+'-end-on-tick') !== "0",
284284
stackLabels : {
285285
enabled: $table.data('graph-yaxis-'+yAxisNum+'-stacklabels-enabled') == '1'
286-
}
286+
},
287+
gridLineInterpolation: $table.data('graph-yaxis-'+yAxisNum+'-grid-line-interpolation') || null
287288
};
288289

289290
var callableYAxisFormatter = getCallable(table, 'graph-yaxis-'+yAxisNum+'-formatter-callback');
@@ -344,7 +345,8 @@
344345
marginLeft: typeof marginLeft != 'undefined' ? marginLeft : null,
345346
spacingTop: $table.data('graph-spacing-top') || 10,
346347
height: $table.data('graph-height') || null,
347-
zoomType: $table.data('graph-zoom-type') || null
348+
zoomType: $table.data('graph-zoom-type') || null,
349+
polar: $table.data('graph-polar') ? $table.data('graph-polar') : undefined
348350
},
349351
title: {
350352
text: graphTitle
@@ -364,7 +366,7 @@
364366
type: ($table.data('graph-xaxis-type') == 'datetime') ? 'datetime' : undefined,
365367
reversed: $table.data('graph-xaxis-reversed') == '1',
366368
opposite: $table.data('graph-xaxis-opposite') == '1',
367-
showLastLabel: true,
369+
showLastLabel: typeof $table.data('graph-xaxis-show-last-label') != 'undefined' ? $table.data('graph-xaxis-show-last-label') : true,
368370
tickInterval: $table.data('graph-xaxis-tick-interval') || null,
369371
dateTimeLabelFormats: { //by default, we display the day and month on the datetime graphs
370372
second: '%e. %b',
@@ -391,7 +393,9 @@
391393
text: $table.data('graph-xaxis-title-text') || null
392394
},
393395
gridLineWidth: $table.data('graph-xaxis-gridLine-width') || 0,
394-
gridLineDashStyle: $table.data('graph-xaxis-gridLine-style') || 'ShortDot'
396+
gridLineDashStyle: $table.data('graph-xaxis-gridLine-style') || 'ShortDot',
397+
tickmarkPlacement: 'on',
398+
lineWidth: $table.data('graph-xaxis-line-width') || 0
395399
},
396400
yAxis: yAxisConfig,
397401
tooltip: {

0 commit comments

Comments
 (0)