@amcharts/amcharts5 5.5.5 → 5.5.6
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/.internal/charts/map/ClusteredPointSeries.d.ts +92 -0
- package/.internal/charts/map/ClusteredPointSeries.d.ts.map +1 -0
- package/.internal/charts/map/ClusteredPointSeries.js +223 -0
- package/.internal/charts/map/ClusteredPointSeries.js.map +1 -0
- package/.internal/charts/map/MapPointSeries.d.ts +18 -0
- package/.internal/charts/map/MapPointSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapPointSeries.js +43 -1
- package/.internal/charts/map/MapPointSeries.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.js +1 -0
- package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
- package/.internal/core/Classes.d.ts +7 -1
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +1 -0
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/util/DateFormatter.d.ts.map +1 -1
- package/.internal/core/util/DateFormatter.js +4 -0
- package/.internal/core/util/DateFormatter.js.map +1 -1
- package/.internal/plugins/json/Classes-script.d.ts +10 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +5 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +10 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +5 -0
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/CHANGELOG.md +12 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/README.md +6 -0
- package/examples/javascript/map-clustered-points/index.css +11 -0
- package/examples/javascript/map-clustered-points/index.html +12 -0
- package/examples/javascript/map-clustered-points/index.js +292 -0
- package/examples/javascript/map-clustered-points/package.json +16 -0
- package/examples/javascript/map-clustered-points/webpack.config.js +38 -0
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/index.js +3 -0
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/README.md +6 -0
- package/examples/typescript/map-clustered-points/index.css +11 -0
- package/examples/typescript/map-clustered-points/index.html +12 -0
- package/examples/typescript/map-clustered-points/index.ts +292 -0
- package/examples/typescript/map-clustered-points/package.json +18 -0
- package/examples/typescript/map-clustered-points/tsconfig.json +12 -0
- package/examples/typescript/map-clustered-points/webpack.config.js +45 -0
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/index.ts +3 -0
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/map.d.ts +1 -0
- package/map.d.ts.map +1 -1
- package/map.js +1 -0
- package/map.js.map +1 -1
- package/package.json +1 -1
- package/stock.d.ts +1 -0
- package/stock.d.ts.map +1 -1
- package/stock.js +1 -0
- package/stock.js.map +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>amCharts 5 Example - map-clustered-points</title>
|
|
6
|
+
<link rel="stylesheet" href="index.css" />
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="chartdiv"></div>
|
|
10
|
+
<script src="dist/index.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import * as am5 from "@amcharts/amcharts5";
|
|
2
|
+
import * as am5map from "@amcharts/amcharts5/map";
|
|
3
|
+
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
|
|
4
|
+
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// Create root element
|
|
8
|
+
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
|
|
9
|
+
const root = am5.Root.new("chartdiv");
|
|
10
|
+
|
|
11
|
+
// Set themes
|
|
12
|
+
// https://www.amcharts.com/docs/v5/concepts/themes/
|
|
13
|
+
root.setThemes([
|
|
14
|
+
am5themes_Animated.new(root)
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
// Create the map chart
|
|
18
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/
|
|
19
|
+
const chart = root.container.children.push(
|
|
20
|
+
am5map.MapChart.new(root, {
|
|
21
|
+
panX: "rotateX",
|
|
22
|
+
panY: "translateY",
|
|
23
|
+
projection: am5map.geoMercator(),
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
chart.set("zoomControl", am5map.ZoomControl.new(root, {
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// Create main polygon series for countries
|
|
32
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/
|
|
33
|
+
const polygonSeries = chart.series.push(
|
|
34
|
+
am5map.MapPolygonSeries.new(root, {
|
|
35
|
+
geoJSON: am5geodata_worldLow,
|
|
36
|
+
exclude: ["AQ"]
|
|
37
|
+
})
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
polygonSeries.mapPolygons.template.setAll({
|
|
41
|
+
fill:am5.color(0xdadada)
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
// Create point series for markers
|
|
46
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/map-point-series/
|
|
47
|
+
const pointSeries = chart.series.push(am5map.ClusteredPointSeries.new(root, {}));
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Set clustered bullet
|
|
51
|
+
// https://www.amcharts.com/docs/v5/charts/map-chart/clustered-point-series/#Group_bullet
|
|
52
|
+
pointSeries.set("clusteredBullet", (root) => {
|
|
53
|
+
const container = am5.Container.new(root, {
|
|
54
|
+
cursorOverStyle:"pointer"
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const circle1 = container.children.push(am5.Circle.new(root, {
|
|
58
|
+
radius: 8,
|
|
59
|
+
tooltipY: 0,
|
|
60
|
+
fill: am5.color(0xff8c00)
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
const circle2 = container.children.push(am5.Circle.new(root, {
|
|
64
|
+
radius: 12,
|
|
65
|
+
fillOpacity: 0.3,
|
|
66
|
+
tooltipY: 0,
|
|
67
|
+
fill: am5.color(0xff8c00)
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
const circle3 = container.children.push(am5.Circle.new(root, {
|
|
71
|
+
radius: 16,
|
|
72
|
+
fillOpacity: 0.3,
|
|
73
|
+
tooltipY: 0,
|
|
74
|
+
fill: am5.color(0xff8c00)
|
|
75
|
+
}));
|
|
76
|
+
|
|
77
|
+
const label = container.children.push(am5.Label.new(root, {
|
|
78
|
+
centerX: am5.p50,
|
|
79
|
+
centerY: am5.p50,
|
|
80
|
+
fill: am5.color(0xffffff),
|
|
81
|
+
populateText: true,
|
|
82
|
+
fontSize: "8",
|
|
83
|
+
text: "{value}"
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
container.events.on("click", (e) => {
|
|
87
|
+
pointSeries.zoomToCluster(e.target.dataItem);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
return am5.Bullet.new(root, {
|
|
91
|
+
sprite: container
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Create regular bullets
|
|
96
|
+
pointSeries.bullets.push(() => {
|
|
97
|
+
const circle = am5.Circle.new(root, {
|
|
98
|
+
radius: 6,
|
|
99
|
+
tooltipY: 0,
|
|
100
|
+
fill: am5.color(0xff8c00),
|
|
101
|
+
tooltipText: "{title}"
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
return am5.Bullet.new(root, {
|
|
105
|
+
sprite: circle
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
// Set data
|
|
111
|
+
const cities = [
|
|
112
|
+
{ title: "Vienna", latitude: 48.2092, longitude: 16.3728 },
|
|
113
|
+
{ title: "Minsk", latitude: 53.9678, longitude: 27.5766 },
|
|
114
|
+
{ title: "Brussels", latitude: 50.8371, longitude: 4.3676 },
|
|
115
|
+
{ title: "Sarajevo", latitude: 43.8608, longitude: 18.4214 },
|
|
116
|
+
{ title: "Sofia", latitude: 42.7105, longitude: 23.3238 },
|
|
117
|
+
{ title: "Zagreb", latitude: 45.815, longitude: 15.9785 },
|
|
118
|
+
{ title: "Pristina", latitude: 42.666667, longitude: 21.166667 },
|
|
119
|
+
{ title: "Prague", latitude: 50.0878, longitude: 14.4205 },
|
|
120
|
+
{ title: "Copenhagen", latitude: 55.6763, longitude: 12.5681 },
|
|
121
|
+
{ title: "Tallinn", latitude: 59.4389, longitude: 24.7545 },
|
|
122
|
+
{ title: "Helsinki", latitude: 60.1699, longitude: 24.9384 },
|
|
123
|
+
{ title: "Paris", latitude: 48.8567, longitude: 2.351 },
|
|
124
|
+
{ title: "Berlin", latitude: 52.5235, longitude: 13.4115 },
|
|
125
|
+
{ title: "Athens", latitude: 37.9792, longitude: 23.7166 },
|
|
126
|
+
{ title: "Budapest", latitude: 47.4984, longitude: 19.0408 },
|
|
127
|
+
{ title: "Reykjavik", latitude: 64.1353, longitude: -21.8952 },
|
|
128
|
+
{ title: "Dublin", latitude: 53.3441, longitude: -6.2675 },
|
|
129
|
+
{ title: "Rome", latitude: 41.8955, longitude: 12.4823 },
|
|
130
|
+
{ title: "Riga", latitude: 56.9465, longitude: 24.1049 },
|
|
131
|
+
{ title: "Vaduz", latitude: 47.1411, longitude: 9.5215 },
|
|
132
|
+
{ title: "Vilnius", latitude: 54.6896, longitude: 25.2799 },
|
|
133
|
+
{ title: "Luxembourg", latitude: 49.61, longitude: 6.1296 },
|
|
134
|
+
{ title: "Skopje", latitude: 42.0024, longitude: 21.4361 },
|
|
135
|
+
{ title: "Valletta", latitude: 35.9042, longitude: 14.5189 },
|
|
136
|
+
{ title: "Chisinau", latitude: 47.0167, longitude: 28.8497 },
|
|
137
|
+
{ title: "Monaco", latitude: 43.7325, longitude: 7.4189 },
|
|
138
|
+
{ title: "Podgorica", latitude: 42.4602, longitude: 19.2595 },
|
|
139
|
+
{ title: "Amsterdam", latitude: 52.3738, longitude: 4.891 },
|
|
140
|
+
{ title: "Oslo", latitude: 59.9138, longitude: 10.7387 },
|
|
141
|
+
{ title: "Warsaw", latitude: 52.2297, longitude: 21.0122 },
|
|
142
|
+
{ title: "Lisbon", latitude: 38.7072, longitude: -9.1355 },
|
|
143
|
+
{ title: "Bucharest", latitude: 44.4479, longitude: 26.0979 },
|
|
144
|
+
{ title: "Moscow", latitude: 55.7558, longitude: 37.6176 },
|
|
145
|
+
{ title: "San Marino", latitude: 43.9424, longitude: 12.4578 },
|
|
146
|
+
{ title: "Belgrade", latitude: 44.8048, longitude: 20.4781 },
|
|
147
|
+
{ title: "Bratislava", latitude: 48.2116, longitude: 17.1547 },
|
|
148
|
+
{ title: "Ljubljana", latitude: 46.0514, longitude: 14.506 },
|
|
149
|
+
{ title: "Madrid", latitude: 40.4167, longitude: -3.7033 },
|
|
150
|
+
{ title: "Stockholm", latitude: 59.3328, longitude: 18.0645 },
|
|
151
|
+
{ title: "Bern", latitude: 46.948, longitude: 7.4481 },
|
|
152
|
+
{ title: "Kiev", latitude: 50.4422, longitude: 30.5367 },
|
|
153
|
+
{ title: "London", latitude: 51.5002, longitude: -0.1262 },
|
|
154
|
+
{ title: "Gibraltar", latitude: 36.1377, longitude: -5.3453 },
|
|
155
|
+
{ title: "Saint Peter Port", latitude: 49.466, longitude: -2.5522 },
|
|
156
|
+
{ title: "Douglas", latitude: 54.167, longitude: -4.4821 },
|
|
157
|
+
{ title: "Saint Helier", latitude: 49.1919, longitude: -2.1071 },
|
|
158
|
+
{ title: "Longyearbyen", latitude: 78.2186, longitude: 15.6488 },
|
|
159
|
+
{ title: "Kabul", latitude: 34.5155, longitude: 69.1952 },
|
|
160
|
+
{ title: "Yerevan", latitude: 40.1596, longitude: 44.509 },
|
|
161
|
+
{ title: "Baku", latitude: 40.3834, longitude: 49.8932 },
|
|
162
|
+
{ title: "Manama", latitude: 26.1921, longitude: 50.5354 },
|
|
163
|
+
{ title: "Dhaka", latitude: 23.7106, longitude: 90.3978 },
|
|
164
|
+
{ title: "Thimphu", latitude: 27.4405, longitude: 89.673 },
|
|
165
|
+
{ title: "Bandar Seri Begawan", latitude: 4.9431, longitude: 114.9425 },
|
|
166
|
+
{ title: "Phnom Penh", latitude: 11.5434, longitude: 104.8984 },
|
|
167
|
+
{ title: "Peking", latitude: 39.9056, longitude: 116.3958 },
|
|
168
|
+
{ title: "Nicosia", latitude: 35.1676, longitude: 33.3736 },
|
|
169
|
+
{ title: "T'bilisi", latitude: 41.701, longitude: 44.793 },
|
|
170
|
+
{ title: "New Delhi", latitude: 28.6353, longitude: 77.225 },
|
|
171
|
+
{ title: "Jakarta", latitude: -6.1862, longitude: 106.8063 },
|
|
172
|
+
{ title: "Teheran", latitude: 35.7061, longitude: 51.4358 },
|
|
173
|
+
{ title: "Baghdad", latitude: 33.3157, longitude: 44.3922 },
|
|
174
|
+
{ title: "Jerusalem", latitude: 31.76, longitude: 35.17 },
|
|
175
|
+
{ title: "Tokyo", latitude: 35.6785, longitude: 139.6823 },
|
|
176
|
+
{ title: "Amman", latitude: 31.9394, longitude: 35.9349 },
|
|
177
|
+
{ title: "Astana", latitude: 51.1796, longitude: 71.4475 },
|
|
178
|
+
{ title: "Kuwait", latitude: 29.3721, longitude: 47.9824 },
|
|
179
|
+
{ title: "Bishkek", latitude: 42.8679, longitude: 74.5984 },
|
|
180
|
+
{ title: "Vientiane", latitude: 17.9689, longitude: 102.6137 },
|
|
181
|
+
{ title: "Beyrouth / Beirut", latitude: 33.8872, longitude: 35.5134 },
|
|
182
|
+
{ title: "Kuala Lumpur", latitude: 3.1502, longitude: 101.7077 },
|
|
183
|
+
{ title: "Ulan Bator", latitude: 47.9138, longitude: 106.922 },
|
|
184
|
+
{ title: "Pyinmana", latitude: 19.7378, longitude: 96.2083 },
|
|
185
|
+
{ title: "Kathmandu", latitude: 27.7058, longitude: 85.3157 },
|
|
186
|
+
{ title: "Muscat", latitude: 23.6086, longitude: 58.5922 },
|
|
187
|
+
{ title: "Islamabad", latitude: 33.6751, longitude: 73.0946 },
|
|
188
|
+
{ title: "Manila", latitude: 14.579, longitude: 120.9726 },
|
|
189
|
+
{ title: "Doha", latitude: 25.2948, longitude: 51.5082 },
|
|
190
|
+
{ title: "Riyadh", latitude: 24.6748, longitude: 46.6977 },
|
|
191
|
+
{ title: "Singapore", latitude: 1.2894, longitude: 103.85 },
|
|
192
|
+
{ title: "Seoul", latitude: 37.5139, longitude: 126.9828 },
|
|
193
|
+
{ title: "Colombo", latitude: 6.9155, longitude: 79.8572 },
|
|
194
|
+
{ title: "Damascus", latitude: 33.5158, longitude: 36.2939 },
|
|
195
|
+
{ title: "Taipei", latitude: 25.0338, longitude: 121.5645 },
|
|
196
|
+
{ title: "Dushanbe", latitude: 38.5737, longitude: 68.7738 },
|
|
197
|
+
{ title: "Bangkok", latitude: 13.7573, longitude: 100.502 },
|
|
198
|
+
{ title: "Dili", latitude: -8.5662, longitude: 125.588 },
|
|
199
|
+
{ title: "Ankara", latitude: 39.9439, longitude: 32.856 },
|
|
200
|
+
{ title: "Ashgabat", latitude: 37.9509, longitude: 58.3794 },
|
|
201
|
+
{ title: "Abu Dhabi", latitude: 24.4764, longitude: 54.3705 },
|
|
202
|
+
{ title: "Tashkent", latitude: 41.3193, longitude: 69.2481 },
|
|
203
|
+
{ title: "Hanoi", latitude: 21.0341, longitude: 105.8372 },
|
|
204
|
+
{ title: "Sanaa", latitude: 15.3556, longitude: 44.2081 },
|
|
205
|
+
{ title: "Buenos Aires", latitude: -34.6118, longitude: -58.4173 },
|
|
206
|
+
{ title: "Bridgetown", latitude: 13.0935, longitude: -59.6105 },
|
|
207
|
+
{ title: "Belmopan", latitude: 17.2534, longitude: -88.7713 },
|
|
208
|
+
{ title: "Sucre", latitude: -19.0421, longitude: -65.2559 },
|
|
209
|
+
{ title: "Brasilia", latitude: -15.7801, longitude: -47.9292 },
|
|
210
|
+
{ title: "Ottawa", latitude: 45.4235, longitude: -75.6979 },
|
|
211
|
+
{ title: "Santiago", latitude: -33.4691, longitude: -70.642 },
|
|
212
|
+
{ title: "Bogota", latitude: 4.6473, longitude: -74.0962 },
|
|
213
|
+
{ title: "San Jose", latitude: 9.9402, longitude: -84.1002 },
|
|
214
|
+
{ title: "Havana", latitude: 23.1333, longitude: -82.3667 },
|
|
215
|
+
{ title: "Roseau", latitude: 15.2976, longitude: -61.39 },
|
|
216
|
+
{ title: "Santo Domingo", latitude: 18.479, longitude: -69.8908 },
|
|
217
|
+
{ title: "Quito", latitude: -0.2295, longitude: -78.5243 },
|
|
218
|
+
{ title: "San Salvador", latitude: 13.7034, longitude: -89.2073 },
|
|
219
|
+
{ title: "Guatemala", latitude: 14.6248, longitude: -90.5328 },
|
|
220
|
+
{ title: "Ciudad de Mexico", latitude: 19.4271, longitude: -99.1276 },
|
|
221
|
+
{ title: "Managua", latitude: 12.1475, longitude: -86.2734 },
|
|
222
|
+
{ title: "Panama", latitude: 8.9943, longitude: -79.5188 },
|
|
223
|
+
{ title: "Asuncion", latitude: -25.3005, longitude: -57.6362 },
|
|
224
|
+
{ title: "Lima", latitude: -12.0931, longitude: -77.0465 },
|
|
225
|
+
{ title: "Castries", latitude: 13.9972, longitude: -60.0018 },
|
|
226
|
+
{ title: "Paramaribo", latitude: 5.8232, longitude: -55.1679 },
|
|
227
|
+
{ title: "Washington D.C.", latitude: 38.8921, longitude: -77.0241 },
|
|
228
|
+
{ title: "Montevideo", latitude: -34.8941, longitude: -56.0675 },
|
|
229
|
+
{ title: "Caracas", latitude: 10.4961, longitude: -66.8983 },
|
|
230
|
+
{ title: "Oranjestad", latitude: 12.5246, longitude: -70.0265 },
|
|
231
|
+
{ title: "Cayenne", latitude: 4.9346, longitude: -52.3303 },
|
|
232
|
+
{ title: "Plymouth", latitude: 16.6802, longitude: -62.2014 },
|
|
233
|
+
{ title: "San Juan", latitude: 18.45, longitude: -66.0667 },
|
|
234
|
+
{ title: "Algiers", latitude: 36.7755, longitude: 3.0597 },
|
|
235
|
+
{ title: "Luanda", latitude: -8.8159, longitude: 13.2306 },
|
|
236
|
+
{ title: "Porto-Novo", latitude: 6.4779, longitude: 2.6323 },
|
|
237
|
+
{ title: "Gaborone", latitude: -24.657, longitude: 25.9089 },
|
|
238
|
+
{ title: "Ouagadougou", latitude: 12.3569, longitude: -1.5352 },
|
|
239
|
+
{ title: "Bujumbura", latitude: -3.3818, longitude: 29.3622 },
|
|
240
|
+
{ title: "Yaounde", latitude: 3.8612, longitude: 11.5217 },
|
|
241
|
+
{ title: "Bangui", latitude: 4.3621, longitude: 18.5873 },
|
|
242
|
+
{ title: "Brazzaville", latitude: -4.2767, longitude: 15.2662 },
|
|
243
|
+
{ title: "Kinshasa", latitude: -4.3369, longitude: 15.3271 },
|
|
244
|
+
{ title: "Yamoussoukro", latitude: 6.8067, longitude: -5.2728 },
|
|
245
|
+
{ title: "Djibouti", latitude: 11.5806, longitude: 43.1425 },
|
|
246
|
+
{ title: "Cairo", latitude: 30.0571, longitude: 31.2272 },
|
|
247
|
+
{ title: "Asmara", latitude: 15.3315, longitude: 38.9183 },
|
|
248
|
+
{ title: "Addis Abeba", latitude: 9.0084, longitude: 38.7575 },
|
|
249
|
+
{ title: "Libreville", latitude: 0.3858, longitude: 9.4496 },
|
|
250
|
+
{ title: "Banjul", latitude: 13.4399, longitude: -16.6775 },
|
|
251
|
+
{ title: "Accra", latitude: 5.5401, longitude: -0.2074 },
|
|
252
|
+
{ title: "Conakry", latitude: 9.537, longitude: -13.6785 },
|
|
253
|
+
{ title: "Bissau", latitude: 11.8598, longitude: -15.5875 },
|
|
254
|
+
{ title: "Nairobi", latitude: -1.2762, longitude: 36.7965 },
|
|
255
|
+
{ title: "Maseru", latitude: -29.2976, longitude: 27.4854 },
|
|
256
|
+
{ title: "Monrovia", latitude: 6.3106, longitude: -10.8047 },
|
|
257
|
+
{ title: "Tripoli", latitude: 32.883, longitude: 13.1897 },
|
|
258
|
+
{ title: "Antananarivo", latitude: -18.9201, longitude: 47.5237 },
|
|
259
|
+
{ title: "Lilongwe", latitude: -13.9899, longitude: 33.7703 },
|
|
260
|
+
{ title: "Bamako", latitude: 12.653, longitude: -7.9864 },
|
|
261
|
+
{ title: "Nouakchott", latitude: 18.0669, longitude: -15.99 },
|
|
262
|
+
{ title: "Port Louis", latitude: -20.1654, longitude: 57.4896 },
|
|
263
|
+
{ title: "Rabat", latitude: 33.9905, longitude: -6.8704 },
|
|
264
|
+
{ title: "Maputo", latitude: -25.9686, longitude: 32.5804 },
|
|
265
|
+
{ title: "Windhoek", latitude: -22.5749, longitude: 17.0805 },
|
|
266
|
+
{ title: "Niamey", latitude: 13.5164, longitude: 2.1157 },
|
|
267
|
+
{ title: "Abuja", latitude: 9.058, longitude: 7.4891 },
|
|
268
|
+
{ title: "Kigali", latitude: -1.9441, longitude: 30.0619 },
|
|
269
|
+
{ title: "Dakar", latitude: 14.6953, longitude: -17.4439 },
|
|
270
|
+
{ title: "Freetown", latitude: 8.4697, longitude: -13.2659 },
|
|
271
|
+
{ title: "Mogadishu", latitude: 2.0411, longitude: 45.3426 },
|
|
272
|
+
{ title: "Pretoria", latitude: -25.7463, longitude: 28.1876 },
|
|
273
|
+
{ title: "Mbabane", latitude: -26.3186, longitude: 31.141 },
|
|
274
|
+
{ title: "Dodoma", latitude: -6.167, longitude: 35.7497 },
|
|
275
|
+
{ title: "Lome", latitude: 6.1228, longitude: 1.2255 },
|
|
276
|
+
{ title: "Tunis", latitude: 36.8117, longitude: 10.1761 }
|
|
277
|
+
];
|
|
278
|
+
|
|
279
|
+
for (const i = 0; i < cities.length; i++) {
|
|
280
|
+
const city = cities[i];
|
|
281
|
+
addCity(city.longitude, city.latitude, city.title);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function addCity(longitude, latitude, title) {
|
|
285
|
+
pointSeries.data.push({
|
|
286
|
+
geometry: { type: "Point", coordinates: [longitude, latitude] },
|
|
287
|
+
title: title
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Make stuff animate on load
|
|
292
|
+
chart.appear(1000, 100);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "amcharts5-example-map-clustered-points",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"devDependencies": {
|
|
6
|
+
"@amcharts/amcharts5": "^5.5.6",
|
|
7
|
+
"source-map-loader": "^4.0.1",
|
|
8
|
+
"ts-loader": "^9.2.2",
|
|
9
|
+
"typescript": "^4.3.4",
|
|
10
|
+
"webpack": "^5.1.3",
|
|
11
|
+
"webpack-cli": "^5.1.1",
|
|
12
|
+
"webpack-dev-server": "^4.15.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "webpack",
|
|
16
|
+
"start": "webpack serve --mode development"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var $path = require("path");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
mode: "production",
|
|
5
|
+
|
|
6
|
+
devtool: "source-map",
|
|
7
|
+
|
|
8
|
+
stats: "errors-warnings",
|
|
9
|
+
|
|
10
|
+
target: ["web", "es5"],
|
|
11
|
+
|
|
12
|
+
entry: {
|
|
13
|
+
index: "./index.ts",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
devServer: {
|
|
17
|
+
publicPath: "/dist/",
|
|
18
|
+
liveReload: true,
|
|
19
|
+
overlay: true,
|
|
20
|
+
noInfo: true,
|
|
21
|
+
open: true
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
output: {
|
|
25
|
+
path: $path.resolve(__dirname, "dist"),
|
|
26
|
+
publicPath: "dist/",
|
|
27
|
+
filename: "[name].js",
|
|
28
|
+
chunkFilename: "[name].js"
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
resolve: {
|
|
32
|
+
extensions: [".ts", ".tsx", ".js"]
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
module: {
|
|
36
|
+
rules: [{
|
|
37
|
+
test: /.tsx?$/,
|
|
38
|
+
loader: "ts-loader"
|
|
39
|
+
}, {
|
|
40
|
+
test: /.js$/,
|
|
41
|
+
use: ["source-map-loader"],
|
|
42
|
+
enforce: "pre"
|
|
43
|
+
}]
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -242,6 +242,9 @@ var mainSeriesControl = am5stock.DropdownListControl.new(root, {
|
|
|
242
242
|
});
|
|
243
243
|
|
|
244
244
|
mainSeriesControl.events.on("selected", function(ev) {
|
|
245
|
+
var valueSeries = stockChart.get("stockSeries");
|
|
246
|
+
var volumeSeries = stockChart.get("volumeSeries");
|
|
247
|
+
|
|
245
248
|
mainSeriesControl.set("name", ev.item.subLabel);
|
|
246
249
|
valueSeries.set("name", ev.item.subLabel);
|
|
247
250
|
loadData(ev.item.subLabel, [valueSeries, volumeSeries, sbSeries], currentGranularity);
|