diff --git a/src/GoogleCharts/widget/GoogleAreaChart.js b/src/GoogleCharts/widget/GoogleAreaChart.js index 0ede615..f4e63ea 100644 --- a/src/GoogleCharts/widget/GoogleAreaChart.js +++ b/src/GoogleCharts/widget/GoogleAreaChart.js @@ -129,12 +129,12 @@ define([ } : undefined, 'title': (this.title !== '') ? this.title : undefined, 'backgroundColor': (this.backgroundColor !== '') ? this.backgroundColor : undefined, - 'colors': (this.colors !== '') ? this.colors : undefined, + 'colors': (this.colors !== '') ? JSON.parse(this.colors) : undefined, 'areaOpacity': (this.areaOpacity !== '') ? this.areaOpacity : undefined, 'enableInteractivity': (this.enableInteractivity !== null) ? this.enableInteractivity : undefined, 'forceIFrame': (this.forceIFrame !== null) ? this.forceIFrame : undefined, - 'legend': (this.legend !== '') ? this.legend : undefined, - 'tooltip': (this.tooltip !== '') ? this.tooltip : undefined, + 'legend': (this.legend !== '') ? JSON.parse(this.legend) : undefined, + 'tooltip': (this.tooltip !== '') ? JSON.parse(this.tooltip) : undefined, 'aggregationTarget': (this.aggregationTarget !== '') ? this.aggregationTarget : undefined }); this._chartWrapper = new google.visualization.ChartWrapper({ diff --git a/src/GoogleCharts/widget/GoogleColumnChart.js b/src/GoogleCharts/widget/GoogleColumnChart.js index 7b77c71..9555f74 100644 --- a/src/GoogleCharts/widget/GoogleColumnChart.js +++ b/src/GoogleCharts/widget/GoogleColumnChart.js @@ -128,12 +128,12 @@ define([ } : undefined, 'title': (this.title !== '') ? this.title : undefined, 'backgroundColor': (this.backgroundColor !== '') ? this.backgroundColor : undefined, - 'colors': (this.colors !== '') ? this.colors : undefined, + 'colors': (this.colors !== '') ? JSON.parse(this.colors) : undefined, 'dataOpacity': (this.dataOpacity !== '') ? this.dataOpacity : undefined, 'enableInteractivity': (this.enableInteractivity !== null) ? this.enableInteractivity : undefined, 'forceIFrame': (this.forceIFrame !== null) ? this.forceIFrame : undefined, - 'legend': (this.legend !== '') ? this.legend : undefined, - 'tooltip': (this.tooltip !== '') ? this.tooltip : undefined + 'legend': (this.legend !== '') ? JSON.parse(this.legend) : undefined, + 'tooltip': (this.tooltip !== '') ? JSON.parse(this.tooltip) : undefined }); this._chartWrapper = new google.visualization.ChartWrapper({ 'chartType': 'ColumnChart', diff --git a/src/GoogleCharts/widget/GooglePieChart.js b/src/GoogleCharts/widget/GooglePieChart.js index 164860f..c2bc597 100644 --- a/src/GoogleCharts/widget/GooglePieChart.js +++ b/src/GoogleCharts/widget/GooglePieChart.js @@ -127,11 +127,11 @@ define([ var options = $.extend({},{ 'title': (this.title !== '') ? this.title : undefined, 'backgroundColor': (this.backgroundColor !== '') ? this.backgroundColor : undefined, - 'colors': (this.colors !== '') ? this.colors : undefined, + 'colors': (this.colors !== '') ? JSON.parse(this.colors) : undefined, 'enableInteractivity': (this.enableInteractivity !== null) ? this.enableInteractivity : undefined, 'forceIFrame': (this.forceIFrame !== null) ? this.forceIFrame : undefined, 'is3D': (this.is3D !== null) ? this.is3D : undefined, - 'legend': (this.legend !== '') ? this.legend : undefined, + 'legend': (this.legend !== '') ? JSON.parse(this.legend) : undefined, 'pieHole': (this.pieHole !== '') ? this.pieHole : undefined, 'pieSliceBorderColor': (this.pieSliceBorderColor !== '') ? this.pieSliceBorderColor : undefined, 'pieSliceText': (this.pieSliceText !== '') ? this.pieSliceText : undefined, @@ -140,7 +140,7 @@ define([ 'reverseCategories': (this.reverseCategories !== '') ? this.reverseCategories : undefined, 'slices': (this.slices !== '') ? this.slices : undefined, 'sliceVisibilityThreshold': (this.sliceVisibilityThreshold !== null) ? this.sliceVisibilityThreshold : undefined, - 'tooltip': (this.tooltip !== '') ? this.tooltip : undefined + 'tooltip': (this.tooltip !== '') ? JSON.parse(this.tooltip) : undefined }); this._chartWrapper = new google.visualization.ChartWrapper({ 'chartType': 'PieChart', diff --git a/test/Test.mpr b/test/Test.mpr index bd2e34a..31dd1d7 100644 Binary files a/test/Test.mpr and b/test/Test.mpr differ diff --git a/test/widgets/GoogleCharts.mpk b/test/widgets/GoogleCharts.mpk index 80fbfed..2eb93d3 100644 Binary files a/test/widgets/GoogleCharts.mpk and b/test/widgets/GoogleCharts.mpk differ