Skip to content

Commit 298e51b

Browse files
WIP
1 parent 556ed88 commit 298e51b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

classes/Visualizer/Source.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ protected function _normalizeData( $data ) {
215215
$data[ $i ] = ( is_numeric( $data[ $i ] ) ) ? floatval( $data[ $i ] ) : ( is_numeric( str_replace( ',', '', $data[ $i ] ) ) ? floatval( str_replace( ',', '', $data[ $i ] ) ) : null );
216216
break;
217217
case 'boolean':
218+
error_log("aaya ");
218219
$datum = trim( strval( $data[ $i ] ) );
219220
$data[ $i ] = in_array( $datum, array( 'true', 'yes', '1' ), true ) ? 'true' : 'false';
220221
break;
@@ -242,6 +243,8 @@ protected function _normalizeData( $data ) {
242243
}
243244
}
244245

246+
error_log("gaya " . print_r($data,true));
247+
245248
return apply_filters( 'visualizer_format_data', $data, $this->_series );
246249
}
247250

js/render-datatables.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
series = chart.series;
3030
data = chart.data;
3131

32+
console.log(series);
33+
3234
container = document.getElementById(id);
3335
if (container == null) {
3436
return;
@@ -173,6 +175,7 @@
173175
$.extend( settings, additional );
174176

175177
cols = [];
178+
console.log(series);
176179
for (j = 0; j < series.length; j++) {
177180
type = series[j].type;
178181
switch(type){
@@ -219,6 +222,7 @@
219222
$('body').trigger('visualizer:chart:settings:extend', {id: id, chart: chart, settings: settings});
220223

221224
table = $('#' + id + ' table.visualizer-data-table');
225+
console.log("showing table");
222226
table.DataTable( settings );
223227

224228
// header row is handled here as the class is added dynamically to it (after the table is rendered).
@@ -267,8 +271,16 @@
267271
render = $.fn.dataTable.render.moment(series.format.from, series.format.to);
268272
}
269273
break;
274+
default:
275+
console.log("yahan aaya");
276+
render = $.fn.dataTable.render.extra = function ( from, to, locale ) {
277+
console.log("andar aaya");
278+
return from;
279+
}
270280
}
271281
/* jshint ignore:end */
282+
283+
272284
return render;
273285
}
274286

0 commit comments

Comments
 (0)