| @@ -184,8 +184,9 @@ | ||
| 184 | 184 | case 'timeofday': |
| 185 | 185 | type = 'date'; |
| 186 | 186 | break; |
| 187 | 187 | } |
| 188 | + | |
| 188 | 189 | render = addRenderer(series[j].type, settings.series, j); |
| 189 | 190 | |
| 190 | 191 | var col = { title: series[j].label, data: series[j].label, type: type, render: render }; |
| 191 | 192 | if(typeof chart.settings['cssClassNames'] !== 'undefined' && typeof chart.settings['cssClassNames']['tableCell'] !== 'undefined'){ |
| @@ -246,13 +247,10 @@ | ||
| 246 | 247 | parts[0] = series.format.thousands; |
| 247 | 248 | } |
| 248 | 249 | if(typeof series.format.decimal !== ''){ |
| 249 | 250 | parts[1] = series.format.decimal; |
| 250 | - if ( '' === series.format.precision ) { | |
| 251 | - series.format.precision = 2; | |
| 252 | - } | |
| 253 | 251 | } |
| 254 | - if(typeof series.format.precision !== '' && parseInt(series.format.precision) > 0){ | |
| 252 | + if(typeof series.format.precision !== ''){ | |
| 255 | 253 | parts[2] = series.format.precision; |
| 256 | 254 | } |
| 257 | 255 | if(typeof series.format.prefix !== ''){ |
| 258 | 256 | parts[3] = series.format.prefix; |
| @@ -268,21 +266,10 @@ | ||
| 268 | 266 | if(typeof series.format.to !== 'undefined' && typeof series.format.from !== 'undefined' && series.format.from != '' && series.format.to !== ''){ |
| 269 | 267 | render = $.fn.dataTable.render.moment(series.format.from, series.format.to); |
| 270 | 268 | } |
| 271 | 269 | break; |
| 272 | - default: | |
| 273 | - render = $.fn.dataTable.render.extra = function ( data, type, row ) { | |
| 274 | - if((data === true || data === 'true') && typeof series.format !== 'undefined' && series.format.truthy !== ''){ | |
| 275 | - data = series.format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); | |
| 276 | - } | |
| 277 | - if((data === false || data === 'false') && typeof series.format !== 'undefined' && series.format.falsy !== ''){ | |
| 278 | - data = series.format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); | |
| 279 | - } | |
| 280 | - return data; | |
| 281 | - } | |
| 282 | 270 | } |
| 283 | 271 | /* jshint ignore:end */ |
| 284 | - | |
| 285 | 272 | return render; |
| 286 | 273 | } |
| 287 | 274 | |
| 288 | 275 | function render(v) { |
| @@ -292,14 +279,9 @@ | ||
| 292 | 279 | } |
| 293 | 280 | |
| 294 | 281 | $('body').on('visualizer:render:chart:start', function(event, v){ |
| 295 | 282 | all_charts = v.charts; |
| 296 | - | |
| 297 | - if(v.is_front == true && typeof v.id !== 'undefined'){ // jshint ignore:line | |
| 298 | - renderChart(v.id, v); | |
| 299 | - } else { | |
| 300 | - render(v); | |
| 301 | - } | |
| 283 | + render(v); | |
| 302 | 284 | }); |
| 303 | 285 | |
| 304 | 286 | $('body').on('visualizer:render:specificchart:start', function(event, v){ |
| 305 | 287 | renderSpecificChart(v.id, v.chart, v.v); |