diff --git a/CustomChartApp.js b/CustomChartApp.js index 5863766..731dc79 100644 --- a/CustomChartApp.js +++ b/CustomChartApp.js @@ -233,19 +233,19 @@ Ext.define('CustomChartApp', { model = this.models[0], config = { xtype: chartType, - enableStacking: !!stackField, - chartColors: [ - "#FF8200", // $orange - "#F6A900", // $gold - "#FAD200", // $yellow - "#8DC63F", // $lime - "#1E7C00", // $green_dk - "#337EC6", // $blue_link - "#005EB8", // $blue - "#7832A5", // $purple, - "#DA1884", // $pink, - "#C0C0C0" // $grey4 - ], + enableStacking: !!stackField, + chartColors: [ + "#FF8200", // $orange + "#F6A900", // $gold + "#FAD200", // $yellow + "#8DC63F", // $lime + "#1E7C00", // $green_dk + "#337EC6", // $blue_link + "#005EB8", // $blue + "#7832A5", // $purple, + "#DA1884", // $pink, + "#C0C0C0" // $grey4 + ], storeConfig: { context: this.getContext().getDataContext(), //TODO: can we do summary fetch here and not limit infinity? diff --git a/Overrides.js b/Overrides.js new file mode 100644 index 0000000..a678e13 --- /dev/null +++ b/Overrides.js @@ -0,0 +1,15 @@ +Ext.override(Rally.ui.gridboard.Export, { + // Override to also look at the cmp initial config storeConfig value + _getScopeParams: function(cmp) { + var context = (cmp.store && cmp.store.context) || + (cmp.initialConfig && cmp.initialConfig.storeConfig && cmp.initialConfig.storeConfig.context) || + cmp.getContext().getDataContext(); + + return { + workspace: context.workspace, + project: context.project, + projectScopeDown: context.projectScopeDown, + projectScopeUp: context.projectScopeUp + }; + } +}); diff --git a/column/Chart.js b/column/Chart.js index 379037d..1a006d9 100644 --- a/column/Chart.js +++ b/column/Chart.js @@ -45,7 +45,7 @@ Ext.define('ColumnChart', { this.chartConfig.plotOptions.column.showInLegend = this.enableStacking; this.chartConfig.plotOptions.column.colorByPoint = !this.enableStacking; - + if (!this.enableStacking) { this.chartConfig.tooltip = { headerFormat: '', diff --git a/config.json b/config.json index 7098344..ac7ba9e 100644 --- a/config.json +++ b/config.json @@ -3,6 +3,7 @@ "server": "https://rally1.rallydev.com", "sdk": "2.1", "javascript": [ + "Overrides.js", "node_modules/@agile-central-technical-services/utils-ancestor-pi-app-filter/index.js", "node_modules/@agile-central-technical-services/utils-ancestor-pi-inline-filter/index.js", "ChartUtils.js", diff --git a/deploy/Ugly.txt b/deploy/Ugly.txt index 2f84a42..ca2dda2 100644 --- a/deploy/Ugly.txt +++ b/deploy/Ugly.txt @@ -3,11 +3,11 @@ CustomChart-1.3.3 - + @@ -18,7 +18,7 @@