gamma-app-controller 2.0.17 → 2.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/application-controller/support-components/geo-map/geo-map.component.mjs +6 -1
- package/esm2020/lib/shared/advanced-component/gamma-geo-chart/gamma-geo-chart.component.mjs +12 -7
- package/fesm2015/gamma-app-controller.mjs +16 -6
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +16 -6
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/lib/shared/advanced-component/gamma-geo-chart/gamma-geo-chart.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3637,7 +3637,6 @@ class GammaGeoChartComponent {
|
|
|
3637
3637
|
if (chartConfig.isDataAggregation) {
|
|
3638
3638
|
const aggreationData = this.getGroupDataForChart(value.kpiConfig.dataSource, chartConfig['dataAggregationConfig']['dataAggregateColumes'], chartConfig['dataAggregationConfig']['aggregateFields']);
|
|
3639
3639
|
value.kpiConfig.dataSource = aggreationData;
|
|
3640
|
-
console.log(aggreationData);
|
|
3641
3640
|
}
|
|
3642
3641
|
this.choroplethMapDataSource = new Map();
|
|
3643
3642
|
this.choroplethTooltipDataSource = new Map();
|
|
@@ -4034,7 +4033,6 @@ class GammaGeoChartComponent {
|
|
|
4034
4033
|
}
|
|
4035
4034
|
addBubbleMarkers() {
|
|
4036
4035
|
this.prepareBubbleData();
|
|
4037
|
-
console.log(this.locations);
|
|
4038
4036
|
this.locations.forEach((location) => {
|
|
4039
4037
|
const marker = new google.maps.Marker({
|
|
4040
4038
|
position: {
|
|
@@ -4112,11 +4110,16 @@ class GammaGeoChartComponent {
|
|
|
4112
4110
|
initChoroplethMap(chartConfig, tootTipColumn) {
|
|
4113
4111
|
this.isLoader = true;
|
|
4114
4112
|
this.map = new google.maps.Map(document.getElementById("googlemap"), {
|
|
4115
|
-
center: {
|
|
4113
|
+
center: {
|
|
4114
|
+
lat: parseFloat(chartConfig.centerLat),
|
|
4115
|
+
lng: parseFloat(chartConfig.centerLng)
|
|
4116
|
+
},
|
|
4116
4117
|
zoom: parseInt(chartConfig.zoom)
|
|
4117
4118
|
});
|
|
4119
|
+
google.maps.event.addListenerOnce(this.map.data, 'addfeature', () => {
|
|
4120
|
+
this.applyChoroplethStyles(chartConfig);
|
|
4121
|
+
});
|
|
4118
4122
|
this.map.data.loadGeoJson(chartConfig.gjsonFilePath);
|
|
4119
|
-
this.map.data.setStyle(feature => this.getFeatureStyle(feature, chartConfig, this.minChoroplethMapCnt, this.maxChoroplethMapCnt));
|
|
4120
4123
|
const infoWindow = new google.maps.InfoWindow();
|
|
4121
4124
|
this.map.data.addListener('mouseover', (event) => {
|
|
4122
4125
|
const district = event.feature.getProperty('d');
|
|
@@ -4126,9 +4129,12 @@ class GammaGeoChartComponent {
|
|
|
4126
4129
|
infoWindow.setPosition(event.latLng);
|
|
4127
4130
|
infoWindow.open(this.map);
|
|
4128
4131
|
});
|
|
4129
|
-
this.isLoader = false;
|
|
4130
4132
|
this.map.data.addListener('mouseout', () => infoWindow.close());
|
|
4131
4133
|
}
|
|
4134
|
+
applyChoroplethStyles(chartConfig) {
|
|
4135
|
+
this.map.data.setStyle(feature => this.getFeatureStyle(feature, chartConfig, this.minChoroplethMapCnt, this.maxChoroplethMapCnt));
|
|
4136
|
+
this.isLoader = false;
|
|
4137
|
+
}
|
|
4132
4138
|
buildInfoWindowContent(district, row, tootTipColumn) {
|
|
4133
4139
|
const rows = tootTipColumn.map(c => `
|
|
4134
4140
|
<div style="display:flex; justify-content:space-between;">
|
|
@@ -4178,7 +4184,6 @@ class GammaGeoChartComponent {
|
|
|
4178
4184
|
getFeatureStyle(feature, chartConfig, minCount, maxCount) {
|
|
4179
4185
|
const districtName = feature.getProperty('d')?.toUpperCase();
|
|
4180
4186
|
const cnt = this.choroplethMapDataSource.get(districtName);
|
|
4181
|
-
console.log(districtName, cnt, this.getColor(cnt, chartConfig.colorOne, chartConfig.colorTwo, minCount, maxCount));
|
|
4182
4187
|
return {
|
|
4183
4188
|
fillColor: this.getColor(cnt, chartConfig.colorOne, chartConfig.colorTwo, minCount, maxCount),
|
|
4184
4189
|
strokeColor: '#555',
|
|
@@ -4403,6 +4408,11 @@ class GeoMapComponent {
|
|
|
4403
4408
|
this.tableDataConfig.chart_config = value.selectedWidgetConfig.dataConfig.chart_config;
|
|
4404
4409
|
}
|
|
4405
4410
|
else if (this.mapType == 'choroplethMap') {
|
|
4411
|
+
if (value.selectedWidgetConfig['dataConfig']['isDataAggregation']) {
|
|
4412
|
+
this.dataAggregationContainer = value.selectedWidgetConfig['dataConfig']['dataAggregationConfig']['dataAggregateColumes'];
|
|
4413
|
+
this.dataAggregateGroupByColume = value.selectedWidgetConfig['dataConfig']['dataAggregationConfig']['aggregateFields'];
|
|
4414
|
+
this.saveAggregationColume();
|
|
4415
|
+
}
|
|
4406
4416
|
this.choroplethMapConfig = value.selectedWidgetConfig.dataConfig;
|
|
4407
4417
|
this.choroplethMapConfig.chart_config = value.selectedWidgetConfig.dataConfig.chart_config;
|
|
4408
4418
|
this.tableDataConfig.chart_config = value.selectedWidgetConfig.dataConfig.chart_config;
|