Skip to content

Commit 60030f4

Browse files
authored
Merge pull request #262 from sgratzl/release/v4.3.4
Release v4.3.4
2 parents 10b846d + 21f6315 commit 60030f4

File tree

5 files changed

+1336
-1261
lines changed

5 files changed

+1336
-1261
lines changed
Lines changed: 367 additions & 358 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarnPath: .yarn/releases/yarn-4.5.0.cjs
1+
yarnPath: .yarn/releases/yarn-4.5.1.cjs

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chartjs-chart-geo",
33
"description": "Chart.js module for charting maps",
4-
"version": "4.3.3",
4+
"version": "4.3.4",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "sam@sgratzl.com",
@@ -61,42 +61,42 @@
6161
},
6262
"devDependencies": {
6363
"@chiogen/rollup-plugin-terser": "^7.1.3",
64-
"@eslint/js": "^9.11.1",
65-
"@rollup/plugin-commonjs": "^28.0.0",
64+
"@eslint/js": "~9.14.0",
65+
"@rollup/plugin-commonjs": "^28.0.1",
6666
"@rollup/plugin-node-resolve": "^15.3.0",
6767
"@rollup/plugin-replace": "^6.0.1",
68-
"@rollup/plugin-typescript": "^12.1.0",
68+
"@rollup/plugin-typescript": "^12.1.1",
6969
"@types/jest-image-snapshot": "^6.4.0",
70-
"@types/node": "^22.7.4",
70+
"@types/node": "^22.9.0",
7171
"@types/seedrandom": "^3",
7272
"@yarnpkg/sdks": "^3.2.0",
7373
"canvas": "^2.11.2",
7474
"canvas-5-polyfill": "^0.1.5",
75-
"chart.js": "^4.4.4",
75+
"chart.js": "^4.4.6",
7676
"chartjs-plugin-datalabels": "^2.2.0",
77-
"eslint": "^9.11.1",
77+
"eslint": "~9.14.0",
7878
"eslint-plugin-prettier": "^5.2.1",
7979
"jest-image-snapshot": "^6.4.0",
8080
"jsdom": "^25.0.1",
8181
"prettier": "^3.3.3",
8282
"rimraf": "^6.0.1",
83-
"rollup": "^4.22.5",
83+
"rollup": "^4.27.2",
8484
"rollup-plugin-cleanup": "^3.2.1",
8585
"rollup-plugin-dts": "^6.1.1",
8686
"seedrandom": "^3.0.5",
8787
"ts-jest": "^29.2.5",
88-
"tslib": "^2.7.0",
89-
"typedoc": "^0.26.7",
90-
"typedoc-plugin-markdown": "^4.2.8",
91-
"typedoc-vitepress-theme": "^1.0.1",
92-
"typescript": "^5.6.2",
93-
"typescript-eslint": "^8.7.0",
88+
"tslib": "^2.8.1",
89+
"typedoc": "^0.26.11",
90+
"typedoc-plugin-markdown": "^4.2.10",
91+
"typedoc-vitepress-theme": "^1.0.2",
92+
"typescript": "^5.6.3",
93+
"typescript-eslint": "^8.14.0",
9494
"us-atlas": "^3.0.1",
95-
"vite": "^5.4.8",
96-
"vitepress": "^1.3.4",
97-
"vitest": "^2.1.1",
98-
"vue": "^3.5.10",
99-
"vue-chartjs": "^5.3.1",
95+
"vite": "^5.4.11",
96+
"vitepress": "^1.5.0",
97+
"vitest": "^2.1.5",
98+
"vue": "^3.5.13",
99+
"vue-chartjs": "^5.3.2",
100100
"world-atlas": "^2.0.2"
101101
},
102102
"scripts": {
@@ -120,5 +120,5 @@
120120
"docs:build": "yarn run docs:api && vitepress build docs",
121121
"docs:preview": "vitepress preview docs"
122122
},
123-
"packageManager": "yarn@4.5.0"
123+
"packageManager": "yarn@4.5.1"
124124
}

samples/geo.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
5+
<script src="../build/index.umd.js"></script>
6+
</head>
7+
8+
<body>
9+
<div>
10+
<canvas id="canvas"></canvas>
11+
</div>
12+
<script>
13+
fetch('https://cdn.jsdelivr.net/npm/us-atlas/states-10m.json')
14+
.then((r) => r.json())
15+
.then((states10m) => {
16+
const nation = ChartGeo.topojson.feature(states10m, states10m.objects.nation).features[0];
17+
const states = ChartGeo.topojson.feature(states10m, states10m.objects.states).features;
18+
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
19+
type: 'choropleth',
20+
data: {
21+
labels: states.map((d) => d.properties.name),
22+
datasets: [
23+
{
24+
label: 'States',
25+
outline: nation,
26+
data: states.map((d) => ({
27+
feature: d,
28+
value: Math.random() * 11,
29+
})),
30+
},
31+
],
32+
},
33+
options: {
34+
lscales: {
35+
projection: {
36+
axis: 'x',
37+
projection: 'albersUsa',
38+
},
39+
color: {
40+
axis: 'x',
41+
quantize: 5,
42+
legend: {
43+
position: 'bottom-right',
44+
align: 'right',
45+
},
46+
},
47+
},
48+
},
49+
});
50+
});
51+
</script>
52+
</body>
53+
</html>

0 commit comments

Comments
 (0)