Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
check for aggrList in main widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeru committed Apr 5, 2022
1 parent ce8a5df commit 4200d87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ export class GpSmartEchartWidgetComponent implements OnInit, OnDestroy {
} else {
this.colorsForChart = [...userInput.colors.split(',')]
}
if (!userInput.aggrList) {
userInput.aggrList = [];
}
if (this.serviceData) {
this.dataChart.hideLoading();
let axisFontSize = 0;
Expand Down Expand Up @@ -1032,7 +1035,7 @@ export class GpSmartEchartWidgetComponent implements OnInit, OnDestroy {
if (isDevMode()) { console.log('Radar Chart without Aggregation for Datahub', this.chartOption); }
} // End of Radar Chart without Aggregation for Datahub
} // ENd of Datahub Calls Response without Aggregation
else if (userInput.aggrList.length > 0) {
else if (userInput.aggrList && userInput.aggrList.length > 0) {
// calls for API & Datahub with Aggregation
echarts.registerTransform(simpleTransform.aggregate);
const resultDimension = this.getResultDimesions(userInput.aggrList, userInput.groupBy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,11 @@ export class SmartChartConfigComponent implements OnInit {
this.chartData.chartLayout.filter(val => {
if (value === val.id) {
this.chartLayoutData = val.layout;
console.log(val);
this.config.layout = val.layout[0].id;
}
});
}else {
this.chartData.chartLayout.filter(val => {
console.log(val);
if (value === val.id) {
this.chartLayoutData = val.layout;
return;
Expand Down
2 changes: 1 addition & 1 deletion runtime/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const URLImportPlugin = require("webpack-external-import/webpack");
const path = require('path');

module.exports = {
mode: 'development',
mode: 'production',
devtool: 'source-map',
entry: {
[require('./cumulocity.json').contextPath]: './dist/bundle-src/custom-widget.js'
Expand Down

0 comments on commit 4200d87

Please sign in to comment.