@syncfusion/ej2-angular-maps 19.4.56 → 19.4.57-105067
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/@syncfusion/ej2-angular-maps.es5.js +866 -866
- package/@syncfusion/ej2-angular-maps.es5.js.map +1 -1
- package/@syncfusion/ej2-angular-maps.js +771 -771
- package/@syncfusion/ej2-angular-maps.js.map +1 -1
- package/CHANGELOG.md +2 -0
- package/README.md +73 -73
- package/dist/ej2-angular-maps.umd.js +857 -865
- package/dist/ej2-angular-maps.umd.js.map +1 -1
- package/dist/ej2-angular-maps.umd.min.js +1 -10
- package/dist/ej2-angular-maps.umd.min.js.map +1 -1
- package/ej2-angular-maps.d.ts +5 -5
- package/ej2-angular-maps.metadata.json +1 -1
- package/package.json +80 -80
- package/postinstall/tagchange.js +18 -18
- package/public_api.d.ts +1 -1
- package/schematics/generators/maps-annotation/images/__path__/__name@dasherize__/compass.svg +197 -197
- package/schematics/generators/maps-annotation/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +20 -20
- package/schematics/generators/maps-annotation/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +14 -14
- package/schematics/generators/maps-annotation/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +57 -57
- package/schematics/generators/maps-annotation/schema.json +3 -2
- package/schematics/generators/maps-bubble/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-bubble/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +10 -10
- package/schematics/generators/maps-bubble/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +71 -71
- package/schematics/generators/maps-bubble/samples/__path__/__name@dasherize@if-flat__/assets/population-data.ts +45 -45
- package/schematics/generators/maps-bubble/samples/__path__/__name@dasherize@if-flat__/assets/world-map.ts +184 -184
- package/schematics/generators/maps-bubble/schema.json +3 -2
- package/schematics/generators/maps-color-mapping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-color-mapping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +8 -8
- package/schematics/generators/maps-color-mapping/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +76 -76
- package/schematics/generators/maps-color-mapping/schema.json +3 -2
- package/schematics/generators/maps-default/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-default/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +10 -10
- package/schematics/generators/maps-default/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +32 -32
- package/schematics/generators/maps-default/schema.json +3 -2
- package/schematics/generators/maps-label/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-label/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +8 -8
- package/schematics/generators/maps-label/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +37 -37
- package/schematics/generators/maps-label/samples/__path__/__name@dasherize@if-flat__/assets/world-map.ts +184 -184
- package/schematics/generators/maps-label/schema.json +3 -2
- package/schematics/generators/maps-legend/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-legend/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +7 -7
- package/schematics/generators/maps-legend/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +101 -101
- package/schematics/generators/maps-legend/schema.json +3 -2
- package/schematics/generators/maps-marker/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-marker/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +10 -10
- package/schematics/generators/maps-marker/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +100 -100
- package/schematics/generators/maps-marker/schema.json +3 -2
- package/schematics/generators/maps-navigation-line/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +18 -18
- package/schematics/generators/maps-navigation-line/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +5 -5
- package/schematics/generators/maps-navigation-line/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +120 -120
- package/schematics/generators/maps-navigation-line/samples/__path__/__name@dasherize@if-flat__/assets/map-location.ts +127 -127
- package/schematics/generators/maps-navigation-line/samples/__path__/__name@dasherize@if-flat__/assets/world-map.ts +184 -184
- package/schematics/generators/maps-navigation-line/schema.json +3 -2
- package/schematics/generators/maps-osm/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +3 -3
- package/schematics/generators/maps-osm/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +10 -10
- package/schematics/generators/maps-osm/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +32 -32
- package/schematics/generators/maps-osm/schema.json +3 -2
- package/schematics/ng-add/index.ts +10 -10
- package/schematics/ng-add/schema.json +34 -34
- package/schematics/ng-add/schema.ts +30 -30
- package/schematics/tsconfig.json +25 -25
- package/schematics/utils/lib-details.d.ts +2 -2
- package/schematics/utils/lib-details.js +2 -2
- package/schematics/utils/lib-details.ts +4 -4
- package/src/index.d.ts +11 -11
- package/src/maps/annotations.directive.d.ts +49 -49
- package/src/maps/bubblesettings.directive.d.ts +116 -116
- package/src/maps/colormapping.directive.d.ts +71 -71
- package/src/maps/initialshapeselection.directive.d.ts +37 -37
- package/src/maps/layers.directive.d.ts +151 -147
- package/src/maps/maps-all.module.d.ts +19 -19
- package/src/maps/maps.component.d.ts +64 -63
- package/src/maps/maps.module.d.ts +5 -5
- package/src/maps/markersettings.directive.d.ts +149 -149
- package/src/maps/navigationlinesettings.directive.d.ts +74 -74
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<div class="control-section">
|
|
2
|
-
<div align='center'>
|
|
3
|
-
<ejs-maps id='container' style="display:block;" [zoomSettings]='zoomSettings' [annotations]='annotations' [layers]='layers'
|
|
4
|
-
(load)="load($event)">
|
|
5
|
-
</ejs-maps>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
<svg height="150" width="400">
|
|
9
|
-
<defs>
|
|
10
|
-
<linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
11
|
-
<stop offset="0%" style="stop-color:#C5494B;stop-opacity:1"></stop>
|
|
12
|
-
<stop offset="100%" style="stop-color:#4C134F;stop-opacity:1"></stop>
|
|
13
|
-
</linearGradient>
|
|
14
|
-
</defs>
|
|
1
|
+
<div class="control-section">
|
|
2
|
+
<div align='center'>
|
|
3
|
+
<ejs-maps id='container' style="display:block;" [zoomSettings]='zoomSettings' [annotations]='annotations' [layers]='layers'
|
|
4
|
+
(load)="load($event)">
|
|
5
|
+
</ejs-maps>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<svg height="150" width="400">
|
|
9
|
+
<defs>
|
|
10
|
+
<linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
11
|
+
<stop offset="0%" style="stop-color:#C5494B;stop-opacity:1"></stop>
|
|
12
|
+
<stop offset="100%" style="stop-color:#4C134F;stop-opacity:1"></stop>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
</defs>
|
|
15
15
|
</svg>
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import { Component, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { MapsTheme, Maps, Annotations, Marker, ILoadEventArgs, MapAjax } from '@syncfusion/ej2-angular-maps';
|
|
4
|
-
import {africa_continent} from './assets/africa-continent';
|
|
5
|
-
Maps.Inject(Annotations, Marker);
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Sample for Accumulation Distribution
|
|
9
|
-
*/
|
|
10
|
-
@Component({
|
|
11
|
-
selector: '<%=dasherize(selector)%>',
|
|
12
|
-
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
13
|
-
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
14
|
-
encapsulation: ViewEncapsulation.None
|
|
15
|
-
})
|
|
16
|
-
export class <%= classify(name) %>Component {
|
|
17
|
-
public zoomSettings: object= {
|
|
18
|
-
enable: false
|
|
19
|
-
};
|
|
20
|
-
public load = (args: ILoadEventArgs) => {
|
|
21
|
-
let theme: string = location.hash.split('/')[1];
|
|
22
|
-
theme = theme ? theme : 'Material';
|
|
23
|
-
args.maps.theme = <MapsTheme>(theme.charAt(0).toUpperCase() + theme.slice(1));
|
|
24
|
-
}
|
|
25
|
-
public annotations: object[] = [
|
|
26
|
-
{
|
|
27
|
-
content: '<div id="maps-annotation"> <div id="annotation"> <div> <p style="margin-left:10px;font-size:13px;font-weight:500">Facts about Africa</p> </div> <hr style="margin-top:-3px;margin-bottom:10px;border:0.5px solid #DDDDDD"> <div> <ul style="list-style-type:disc; margin-left:-20px;margin-bottom:2px; font-weight:400"> <li>Africa is the second largest and second most populated continent in the world.</li> <li style="padding-top:5px;">Africa has 54 sovereign states and 10 non-sovereign territories.</li> <li style="padding-top:5px;">Algeria is the largest country in Africa, where as Mayotte is the smallest.</li> </ul> </div> </div> </div>',
|
|
28
|
-
x: '0%', y: '70%'
|
|
29
|
-
}, {
|
|
30
|
-
content: '<div id="compass-maps"> <img src="src/app/maps/images/compass.svg" width="75px" height="75px"> </div>',
|
|
31
|
-
x: '85%', y: '5%'
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
public layers: object[] = [
|
|
35
|
-
{
|
|
36
|
-
shapeDataPath: 'name',
|
|
37
|
-
shapePropertyPath: 'name',
|
|
38
|
-
shapeData: africa_continent,
|
|
39
|
-
shapeSettings: {
|
|
40
|
-
fill: 'url(#grad1)'
|
|
41
|
-
},
|
|
42
|
-
markerSettings: [
|
|
43
|
-
{
|
|
44
|
-
visible: true,
|
|
45
|
-
template: '<h3 style="color:white">{{:name}}</h3>',
|
|
46
|
-
animationDuration: 1,
|
|
47
|
-
dataSource: [{
|
|
48
|
-
name: 'Africa', latitude: 13.97274101999902, longitude: 20.390625
|
|
49
|
-
}]
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
constructor() {
|
|
55
|
-
//code
|
|
56
|
-
};
|
|
57
|
-
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { Component, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import { MapsTheme, Maps, Annotations, Marker, ILoadEventArgs, MapAjax } from '@syncfusion/ej2-angular-maps';
|
|
4
|
+
import {africa_continent} from './assets/africa-continent';
|
|
5
|
+
Maps.Inject(Annotations, Marker);
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Sample for Accumulation Distribution
|
|
9
|
+
*/
|
|
10
|
+
@Component({
|
|
11
|
+
selector: '<%=dasherize(selector)%>',
|
|
12
|
+
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
13
|
+
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
14
|
+
encapsulation: ViewEncapsulation.None
|
|
15
|
+
})
|
|
16
|
+
export class <%= classify(name) %>Component {
|
|
17
|
+
public zoomSettings: object= {
|
|
18
|
+
enable: false
|
|
19
|
+
};
|
|
20
|
+
public load = (args: ILoadEventArgs) => {
|
|
21
|
+
let theme: string = location.hash.split('/')[1];
|
|
22
|
+
theme = theme ? theme : 'Material';
|
|
23
|
+
args.maps.theme = <MapsTheme>(theme.charAt(0).toUpperCase() + theme.slice(1));
|
|
24
|
+
}
|
|
25
|
+
public annotations: object[] = [
|
|
26
|
+
{
|
|
27
|
+
content: '<div id="maps-annotation"> <div id="annotation"> <div> <p style="margin-left:10px;font-size:13px;font-weight:500">Facts about Africa</p> </div> <hr style="margin-top:-3px;margin-bottom:10px;border:0.5px solid #DDDDDD"> <div> <ul style="list-style-type:disc; margin-left:-20px;margin-bottom:2px; font-weight:400"> <li>Africa is the second largest and second most populated continent in the world.</li> <li style="padding-top:5px;">Africa has 54 sovereign states and 10 non-sovereign territories.</li> <li style="padding-top:5px;">Algeria is the largest country in Africa, where as Mayotte is the smallest.</li> </ul> </div> </div> </div>',
|
|
28
|
+
x: '0%', y: '70%'
|
|
29
|
+
}, {
|
|
30
|
+
content: '<div id="compass-maps"> <img src="src/app/maps/images/compass.svg" width="75px" height="75px"> </div>',
|
|
31
|
+
x: '85%', y: '5%'
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
public layers: object[] = [
|
|
35
|
+
{
|
|
36
|
+
shapeDataPath: 'name',
|
|
37
|
+
shapePropertyPath: 'name',
|
|
38
|
+
shapeData: africa_continent,
|
|
39
|
+
shapeSettings: {
|
|
40
|
+
fill: 'url(#grad1)'
|
|
41
|
+
},
|
|
42
|
+
markerSettings: [
|
|
43
|
+
{
|
|
44
|
+
visible: true,
|
|
45
|
+
template: '<h3 style="color:white">{{:name}}</h3>',
|
|
46
|
+
animationDuration: 1,
|
|
47
|
+
dataSource: [{
|
|
48
|
+
name: 'Africa', latitude: 13.97274101999902, longitude: 20.390625
|
|
49
|
+
}]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
constructor() {
|
|
55
|
+
//code
|
|
56
|
+
};
|
|
57
|
+
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"id": "
|
|
3
|
+
"$id": "EJ2SchemaTemplateID",
|
|
4
4
|
"title": "maps-annotation",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
@@ -120,5 +120,6 @@
|
|
|
120
120
|
},
|
|
121
121
|
"required": [
|
|
122
122
|
"name"
|
|
123
|
-
]
|
|
123
|
+
],
|
|
124
|
+
"id": "maps-annotation"
|
|
124
125
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.control-section {
|
|
2
|
-
min-height: 450px;
|
|
3
|
-
}
|
|
1
|
+
.control-section {
|
|
2
|
+
min-height: 450px;
|
|
3
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<div class="control-section">
|
|
2
|
-
<div align='center'>
|
|
3
|
-
<ejs-maps id='container' style="display:block;" format='n' useGroupingSeparator=t rue [zoomSettings]='zoomSettings' [layers]='layers'
|
|
4
|
-
[titleSettings]="titleSettings" (bubbleRendering)="bubbleRendering($event)" (load)="load($event)"
|
|
5
|
-
format='n' useGroupingSeparator="true">
|
|
6
|
-
</ejs-maps>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<div class="control-section">
|
|
2
|
+
<div align='center'>
|
|
3
|
+
<ejs-maps id='container' style="display:block;" format='n' useGroupingSeparator=t rue [zoomSettings]='zoomSettings' [layers]='layers'
|
|
4
|
+
[titleSettings]="titleSettings" (bubbleRendering)="bubbleRendering($event)" (load)="load($event)"
|
|
5
|
+
format='n' useGroupingSeparator="true">
|
|
6
|
+
</ejs-maps>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import { Component, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { MapsTheme, Maps, Bubble, IBubbleRenderingEventArgs, MapsTooltip, ILoadEventArgs, } from '@syncfusion/ej2-angular-maps';
|
|
4
|
-
import { internetUsers } from './assets/population-data';
|
|
5
|
-
import { world_map } from './assets/world-map';
|
|
6
|
-
|
|
7
|
-
Maps.Inject(Bubble, MapsTooltip);
|
|
8
|
-
|
|
9
|
-
export interface Data { value?: number; }
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: '<%=dasherize(selector)%>',
|
|
13
|
-
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
14
|
-
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
15
|
-
encapsulation: ViewEncapsulation.None
|
|
16
|
-
})
|
|
17
|
-
export class <%= classify(name) %>Component {
|
|
18
|
-
public load = (args: ILoadEventArgs) => {
|
|
19
|
-
let theme: string = location.hash.split('/')[1];
|
|
20
|
-
theme = theme ? theme : 'Material';
|
|
21
|
-
args.maps.theme = <MapsTheme>(theme.charAt(0).toUpperCase() + theme.slice(1));
|
|
22
|
-
}
|
|
23
|
-
public zoomSettings: object= {
|
|
24
|
-
enable: true,
|
|
25
|
-
horizontalAlignment: 'Near',
|
|
26
|
-
toolBarOrientation: 'Vertical',
|
|
27
|
-
pinchZooming: true
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public titleSettings : object = {
|
|
31
|
-
text: 'Top 30 countries with highest Internet users',
|
|
32
|
-
titleStyle: {
|
|
33
|
-
size: '16px'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public layers: object[] = [
|
|
38
|
-
{
|
|
39
|
-
shapeDataPath: 'name',
|
|
40
|
-
shapePropertyPath: 'name',
|
|
41
|
-
shapeData: world_map,
|
|
42
|
-
shapeSettings: {
|
|
43
|
-
fill: '#E5E5E5'
|
|
44
|
-
},
|
|
45
|
-
bubbleSettings: [
|
|
46
|
-
{
|
|
47
|
-
visible: true,
|
|
48
|
-
valuePath: 'value',
|
|
49
|
-
colorValuePath: 'color',
|
|
50
|
-
minRadius: 3,
|
|
51
|
-
maxRadius: 70,
|
|
52
|
-
opacity: 0.8,
|
|
53
|
-
dataSource: internetUsers,
|
|
54
|
-
tooltipSettings: {
|
|
55
|
-
visible: true,
|
|
56
|
-
valuePath: 'population',
|
|
57
|
-
format: 'Country: ${name} <br> Population: ${population}'
|
|
58
|
-
},
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
public bubbleRendering = (args: IBubbleRenderingEventArgs) => {
|
|
65
|
-
args.radius = (args.data as Data).value;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
constructor() {
|
|
69
|
-
//code
|
|
70
|
-
};
|
|
71
|
-
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { Component, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import { MapsTheme, Maps, Bubble, IBubbleRenderingEventArgs, MapsTooltip, ILoadEventArgs, } from '@syncfusion/ej2-angular-maps';
|
|
4
|
+
import { internetUsers } from './assets/population-data';
|
|
5
|
+
import { world_map } from './assets/world-map';
|
|
6
|
+
|
|
7
|
+
Maps.Inject(Bubble, MapsTooltip);
|
|
8
|
+
|
|
9
|
+
export interface Data { value?: number; }
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: '<%=dasherize(selector)%>',
|
|
13
|
+
templateUrl: '<%=dasherize(name)%>.component.html',
|
|
14
|
+
styleUrls: ['<%=dasherize(name)%>.component.css'],
|
|
15
|
+
encapsulation: ViewEncapsulation.None
|
|
16
|
+
})
|
|
17
|
+
export class <%= classify(name) %>Component {
|
|
18
|
+
public load = (args: ILoadEventArgs) => {
|
|
19
|
+
let theme: string = location.hash.split('/')[1];
|
|
20
|
+
theme = theme ? theme : 'Material';
|
|
21
|
+
args.maps.theme = <MapsTheme>(theme.charAt(0).toUpperCase() + theme.slice(1));
|
|
22
|
+
}
|
|
23
|
+
public zoomSettings: object= {
|
|
24
|
+
enable: true,
|
|
25
|
+
horizontalAlignment: 'Near',
|
|
26
|
+
toolBarOrientation: 'Vertical',
|
|
27
|
+
pinchZooming: true
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public titleSettings : object = {
|
|
31
|
+
text: 'Top 30 countries with highest Internet users',
|
|
32
|
+
titleStyle: {
|
|
33
|
+
size: '16px'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public layers: object[] = [
|
|
38
|
+
{
|
|
39
|
+
shapeDataPath: 'name',
|
|
40
|
+
shapePropertyPath: 'name',
|
|
41
|
+
shapeData: world_map,
|
|
42
|
+
shapeSettings: {
|
|
43
|
+
fill: '#E5E5E5'
|
|
44
|
+
},
|
|
45
|
+
bubbleSettings: [
|
|
46
|
+
{
|
|
47
|
+
visible: true,
|
|
48
|
+
valuePath: 'value',
|
|
49
|
+
colorValuePath: 'color',
|
|
50
|
+
minRadius: 3,
|
|
51
|
+
maxRadius: 70,
|
|
52
|
+
opacity: 0.8,
|
|
53
|
+
dataSource: internetUsers,
|
|
54
|
+
tooltipSettings: {
|
|
55
|
+
visible: true,
|
|
56
|
+
valuePath: 'population',
|
|
57
|
+
format: 'Country: ${name} <br> Population: ${population}'
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
public bubbleRendering = (args: IBubbleRenderingEventArgs) => {
|
|
65
|
+
args.radius = (args.data as Data).value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
constructor() {
|
|
69
|
+
//code
|
|
70
|
+
};
|
|
71
|
+
|
|
72
72
|
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export let internetUsers: any = [
|
|
3
|
-
{ 'rank': 1, 'name': 'China', 'value': bubblesize(746662194), 'color': '#7F38A0', 'population': 746662194},
|
|
4
|
-
{ 'rank': 2, 'name': 'India', 'value': bubblesize(391292635), 'color': '#7F38A0 ', 'population': 391292635 },
|
|
5
|
-
{ 'rank': 3, 'name': 'United States', 'value': bubblesize(245436423), 'color': '#99295D ','population': 245436423 },
|
|
6
|
-
{ 'rank': 4, 'name': 'Brazil', 'value': bubblesize(123927230), 'color': '#364A98','population': 123927230 },
|
|
7
|
-
{ 'rank': 5, 'name': 'Japan', 'value': bubblesize(117528631), 'color': '#7F38A0 ','population': 117528631 },
|
|
8
|
-
{ 'rank': 6, 'name': 'Russia', 'value': bubblesize(110003284), 'color': '#2E769F','population': 110003284 },
|
|
9
|
-
{ 'rank': 7, 'name': 'Mexico', 'value': bubblesize(75937568), 'color': '#99295D ','population': 75937568 },
|
|
10
|
-
{ 'rank': 8, 'name': 'Germany', 'value': bubblesize(73436503), 'color': '#2E769F', 'population': 73436503 },
|
|
11
|
-
{ 'rank': 9, 'name': 'Indonesia', 'value': bubblesize(66244991), 'color': '#7F38A0 ', 'population': 66244991 },
|
|
12
|
-
{ 'rank': 10, 'name': 'United Kingdom', 'value': bubblesize(62354410), 'color': '#2E769F', 'population': 62354410 },
|
|
13
|
-
{ 'rank': 11, 'name': 'Philippines', 'value': bubblesize(57342723), 'color': '#7F38A0 ', 'population': 57342723 },
|
|
14
|
-
{ 'rank': 12, 'name': 'France', 'value': bubblesize(55413854), 'color': '#2E769F', 'population': 55413854 },
|
|
15
|
-
{ 'rank': 13, 'name': 'Nigeria', 'value': bubblesize(47743541), 'color': '#816F28', 'population': 47743541 },
|
|
16
|
-
{ 'rank': 14, 'name': 'South Africa', 'value': bubblesize(47094267), 'color': '#816F28', 'population': 47094267 },
|
|
17
|
-
{ 'rank': 15, 'name': 'Turkey', 'value': bubblesize(46395500), 'color': '#2E769F', 'population': 46395500 },
|
|
18
|
-
{ 'rank': 16, 'name': 'Vietnam', 'value': bubblesize(43974618), 'color': '#7F38A0 ', 'population': 43974618 },
|
|
19
|
-
{ 'rank': 17, 'name': 'Iran', 'value': bubblesize(42731675), 'color': '#7F38A0 ', 'population': 42731675 },
|
|
20
|
-
{ 'rank': 18, 'name': 'Egypt', 'value': bubblesize(37519531), 'color': '#816F28', 'population': 37519531 },
|
|
21
|
-
{ 'rank': 19, 'name': 'Spain', 'value': bubblesize(37337607), 'color': '#2E769F', 'population': 37337607 },
|
|
22
|
-
{ 'rank': 20, 'name': 'Italy', 'value': bubblesize(36442438), 'color': '#2E769F', 'population': 36442438 },
|
|
23
|
-
{ 'rank': 21, 'name': 'Thailand', 'value': bubblesize(32710169), 'color': '#7F38A0 ', 'population': 32710169 },
|
|
24
|
-
{ 'rank': 22, 'name': 'Canada', 'value': bubblesize(32602776), 'color': '#99295D ', 'population': 32602776 },
|
|
25
|
-
{ 'rank': 23, 'name': 'Argentina', 'value': bubblesize(30758972), 'color': '#364A98', 'population': 30758972 },
|
|
26
|
-
{ 'rank': 24, 'name': 'South Africa', 'value': bubblesize(30248355), 'color': '#816F28', 'population': 30248355 },
|
|
27
|
-
{ 'rank': 25, 'name': 'Pakistan', 'value': bubblesize(29965859), 'color': '#7F38A0 ', 'population': 29965859 },
|
|
28
|
-
{ 'rank': 26, 'name': 'Bangladesh', 'value': bubblesize(29738660), 'color': '#7F38A0 ', 'population': 29738660 },
|
|
29
|
-
{ 'rank': 27, 'name': 'Colombia', 'value': bubblesize(28287098), 'color': '#364A98', 'population': 28287098 },
|
|
30
|
-
{ 'rank': 28, 'name': 'Poland', 'value': bubblesize(28018492), 'color': '#2E769F', 'population': 28018492 },
|
|
31
|
-
{ 'rank': 29, 'name': 'Malaysia', 'value': bubblesize(24572446), 'color': '#7F38A0 ', 'population': 24572446 },
|
|
32
|
-
{ 'rank': 30, 'name': 'Saudi Arabia', 'value': bubblesize(23803319), 'color': '#7F38A0 ', 'population': 23803319 },
|
|
33
|
-
|
|
34
|
-
];
|
|
35
|
-
function bubblesize(value: number): number {
|
|
36
|
-
let max: number = 1347565324;
|
|
37
|
-
let min: number = 324366;
|
|
38
|
-
let maxBox: number = 70 * 70 * 2 * Math.PI;
|
|
39
|
-
let minBox: number = 3 * 3 * 2 * Math.PI;
|
|
40
|
-
let box: number = (value - min) / (max - min) * (maxBox - minBox) + minBox;
|
|
41
|
-
if (box < minBox) {
|
|
42
|
-
box = minBox;
|
|
43
|
-
}
|
|
44
|
-
return Math.sqrt(box / (Math.PI * 2)) / 2;
|
|
45
|
-
}
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export let internetUsers: any = [
|
|
3
|
+
{ 'rank': 1, 'name': 'China', 'value': bubblesize(746662194), 'color': '#7F38A0', 'population': 746662194},
|
|
4
|
+
{ 'rank': 2, 'name': 'India', 'value': bubblesize(391292635), 'color': '#7F38A0 ', 'population': 391292635 },
|
|
5
|
+
{ 'rank': 3, 'name': 'United States', 'value': bubblesize(245436423), 'color': '#99295D ','population': 245436423 },
|
|
6
|
+
{ 'rank': 4, 'name': 'Brazil', 'value': bubblesize(123927230), 'color': '#364A98','population': 123927230 },
|
|
7
|
+
{ 'rank': 5, 'name': 'Japan', 'value': bubblesize(117528631), 'color': '#7F38A0 ','population': 117528631 },
|
|
8
|
+
{ 'rank': 6, 'name': 'Russia', 'value': bubblesize(110003284), 'color': '#2E769F','population': 110003284 },
|
|
9
|
+
{ 'rank': 7, 'name': 'Mexico', 'value': bubblesize(75937568), 'color': '#99295D ','population': 75937568 },
|
|
10
|
+
{ 'rank': 8, 'name': 'Germany', 'value': bubblesize(73436503), 'color': '#2E769F', 'population': 73436503 },
|
|
11
|
+
{ 'rank': 9, 'name': 'Indonesia', 'value': bubblesize(66244991), 'color': '#7F38A0 ', 'population': 66244991 },
|
|
12
|
+
{ 'rank': 10, 'name': 'United Kingdom', 'value': bubblesize(62354410), 'color': '#2E769F', 'population': 62354410 },
|
|
13
|
+
{ 'rank': 11, 'name': 'Philippines', 'value': bubblesize(57342723), 'color': '#7F38A0 ', 'population': 57342723 },
|
|
14
|
+
{ 'rank': 12, 'name': 'France', 'value': bubblesize(55413854), 'color': '#2E769F', 'population': 55413854 },
|
|
15
|
+
{ 'rank': 13, 'name': 'Nigeria', 'value': bubblesize(47743541), 'color': '#816F28', 'population': 47743541 },
|
|
16
|
+
{ 'rank': 14, 'name': 'South Africa', 'value': bubblesize(47094267), 'color': '#816F28', 'population': 47094267 },
|
|
17
|
+
{ 'rank': 15, 'name': 'Turkey', 'value': bubblesize(46395500), 'color': '#2E769F', 'population': 46395500 },
|
|
18
|
+
{ 'rank': 16, 'name': 'Vietnam', 'value': bubblesize(43974618), 'color': '#7F38A0 ', 'population': 43974618 },
|
|
19
|
+
{ 'rank': 17, 'name': 'Iran', 'value': bubblesize(42731675), 'color': '#7F38A0 ', 'population': 42731675 },
|
|
20
|
+
{ 'rank': 18, 'name': 'Egypt', 'value': bubblesize(37519531), 'color': '#816F28', 'population': 37519531 },
|
|
21
|
+
{ 'rank': 19, 'name': 'Spain', 'value': bubblesize(37337607), 'color': '#2E769F', 'population': 37337607 },
|
|
22
|
+
{ 'rank': 20, 'name': 'Italy', 'value': bubblesize(36442438), 'color': '#2E769F', 'population': 36442438 },
|
|
23
|
+
{ 'rank': 21, 'name': 'Thailand', 'value': bubblesize(32710169), 'color': '#7F38A0 ', 'population': 32710169 },
|
|
24
|
+
{ 'rank': 22, 'name': 'Canada', 'value': bubblesize(32602776), 'color': '#99295D ', 'population': 32602776 },
|
|
25
|
+
{ 'rank': 23, 'name': 'Argentina', 'value': bubblesize(30758972), 'color': '#364A98', 'population': 30758972 },
|
|
26
|
+
{ 'rank': 24, 'name': 'South Africa', 'value': bubblesize(30248355), 'color': '#816F28', 'population': 30248355 },
|
|
27
|
+
{ 'rank': 25, 'name': 'Pakistan', 'value': bubblesize(29965859), 'color': '#7F38A0 ', 'population': 29965859 },
|
|
28
|
+
{ 'rank': 26, 'name': 'Bangladesh', 'value': bubblesize(29738660), 'color': '#7F38A0 ', 'population': 29738660 },
|
|
29
|
+
{ 'rank': 27, 'name': 'Colombia', 'value': bubblesize(28287098), 'color': '#364A98', 'population': 28287098 },
|
|
30
|
+
{ 'rank': 28, 'name': 'Poland', 'value': bubblesize(28018492), 'color': '#2E769F', 'population': 28018492 },
|
|
31
|
+
{ 'rank': 29, 'name': 'Malaysia', 'value': bubblesize(24572446), 'color': '#7F38A0 ', 'population': 24572446 },
|
|
32
|
+
{ 'rank': 30, 'name': 'Saudi Arabia', 'value': bubblesize(23803319), 'color': '#7F38A0 ', 'population': 23803319 },
|
|
33
|
+
|
|
34
|
+
];
|
|
35
|
+
function bubblesize(value: number): number {
|
|
36
|
+
let max: number = 1347565324;
|
|
37
|
+
let min: number = 324366;
|
|
38
|
+
let maxBox: number = 70 * 70 * 2 * Math.PI;
|
|
39
|
+
let minBox: number = 3 * 3 * 2 * Math.PI;
|
|
40
|
+
let box: number = (value - min) / (max - min) * (maxBox - minBox) + minBox;
|
|
41
|
+
if (box < minBox) {
|
|
42
|
+
box = minBox;
|
|
43
|
+
}
|
|
44
|
+
return Math.sqrt(box / (Math.PI * 2)) / 2;
|
|
45
|
+
}
|
|
46
46
|
|