Skip to content

Commit a7e5cc3

Browse files
Google Table chart does not display chart if boolean values are specified
1 parent 0f98767 commit a7e5cc3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

js/render-google.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ var __visualizer_chart_images = [];
1414
function renderChart(id) {
1515
var chart = all_charts[id];
1616
var hasAnnotation = false;
17-
if(id !== 'canvas' && typeof chart.series !== 'undefined' && typeof chart.settings.series !== 'undefined'){
18-
hasAnnotation = chart.series.length - chart.settings.series.length > 1;
19-
}
17+
2018
// re-render the chart only if it doesn't have annotations and it is on the front-end
2119
// this is to prevent the chart from showing "All series on a given axis must be of the same data type" during resize.
22-
if(hasAnnotation){
23-
return;
20+
// table/tabular charts do not have annotations.
21+
if(id !== 'canvas' && typeof chart.series !== 'undefined' && typeof chart.settings.series !== 'undefined' && chart.type !== 'tabular'){
22+
hasAnnotation = chart.series.length - chart.settings.series.length > 1;
23+
}
24+
25+
if(! hasAnnotation){
26+
renderSpecificChart(id, all_charts[id]);
2427
}
25-
renderSpecificChart(id, all_charts[id]);
2628
}
2729

2830
function renderSpecificChart(id, chart) {
@@ -259,6 +261,7 @@ var __visualizer_chart_images = [];
259261
if (settings.series) {
260262
switch(chart.type){
261263
case 'table':
264+
case 'tabular':
262265
for(i in settings.series){
263266
i = parseInt(i);
264267
if (!series[i + 1]) {

0 commit comments

Comments
 (0)