Skip to content

Commit 1dbfc31

Browse files
authored
Merge pull request #110 from sgratzl/release/v3.7.2
Release v3.7.2
2 parents d0b7a80 + 668a69b commit 1dbfc31

20 files changed

+1890
-1737
lines changed

.eslintrc.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@
44
const pkg = require('./package.json');
55

66
module.exports = {
7-
plugins: [
8-
// '@typescript-eslint',
9-
'prettier',
10-
],
11-
extends: [
12-
// 'airbnb-typescript',
13-
'react-app',
14-
// 'plugin:@typescript-eslint/recommended',
15-
'plugin:prettier/recommended',
16-
'prettier',
17-
],
7+
plugins: ['prettier'],
8+
extends: ['airbnb-typescript', 'react-app', 'plugin:prettier/recommended', 'prettier'],
189
parserOptions: {
1910
project: './tsconfig.eslint.json',
2011
},

.yarn/releases/yarn-3.1.1.cjs

Lines changed: 0 additions & 768 deletions
This file was deleted.

.yarn/releases/yarn-3.2.0.cjs

Lines changed: 785 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ packageExtensions:
33
dependencies:
44
eslint-import-resolver-node: "*"
55

6-
yarnPath: .yarn/releases/yarn-3.1.1.cjs
6+
yarnPath: .yarn/releases/yarn-3.2.0.cjs

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = {
44
testEnvironment: 'jsdom',
5-
preset: 'ts-jest',
5+
preset: 'ts-jest/presets/js-with-ts-esm',
66
rootDir: './src',
77
testRegex: '((\\.|/)(test|spec))\\.tsx?$',
88
};

package.json

Lines changed: 37 additions & 36 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": "3.7.1",
4+
"version": "3.7.2",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "sam@sgratzl.com",
@@ -36,56 +36,57 @@
3636
"src/**/*.ts"
3737
],
3838
"peerDependencies": {
39-
"chart.js": "^3.7.0"
39+
"chart.js": "^3.7.1"
4040
},
4141
"dependencies": {
4242
"@types/d3-geo": "^3.0.2",
4343
"@types/d3-scale-chromatic": "^3.0.0",
44-
"@types/topojson-client": "^3.1.0",
44+
"@types/topojson-client": "^3.1.1",
4545
"d3-array": "^2.12.0",
4646
"d3-geo": "^2.0.1",
4747
"d3-scale-chromatic": "^2.0.0",
4848
"topojson-client": "^3.1.0"
4949
},
5050
"devDependencies": {
51-
"@rollup/plugin-commonjs": "^21.0.1",
52-
"@rollup/plugin-node-resolve": "^13.1.3",
53-
"@rollup/plugin-replace": "^3.0.1",
54-
"@rollup/plugin-typescript": "^8.3.0",
55-
"@types/jest": "^27.4.0",
51+
"@chiogen/rollup-plugin-terser": "^7.0.2",
52+
"@rollup/plugin-commonjs": "^22.0.0",
53+
"@rollup/plugin-node-resolve": "^13.2.1",
54+
"@rollup/plugin-replace": "^4.0.0",
55+
"@rollup/plugin-typescript": "^8.3.2",
56+
"@types/jest": "^27.4.1",
5657
"@types/jest-image-snapshot": "^4.3.1",
57-
"@types/node": "^17.0.16",
58-
"@types/seedrandom": "^3.0.1",
59-
"@typescript-eslint/eslint-plugin": "^5.11.0",
60-
"@typescript-eslint/parser": "^5.11.0",
61-
"@yarnpkg/pnpify": "^3.1.0",
62-
"@yarnpkg/sdks": "^2.5.0",
63-
"canvas": "^2.9.0",
58+
"@types/node": "^17.0.31",
59+
"@types/seedrandom": "^3.0.2",
60+
"@typescript-eslint/eslint-plugin": "^5.21.0",
61+
"@typescript-eslint/parser": "^5.21.0",
62+
"@yarnpkg/pnpify": "^3.1.1",
63+
"@yarnpkg/sdks": "^2.6.0",
64+
"canvas": "^2.9.1",
6465
"canvas-5-polyfill": "^0.1.5",
65-
"chart.js": "^3.7.0",
66-
"eslint": "^8.8.0",
67-
"eslint-config-airbnb-typescript": "^16.1.0",
68-
"eslint-config-prettier": "^8.3.0",
69-
"eslint-config-react-app": "^7.0.0",
66+
"chart.js": "^3.7.1",
67+
"eslint": "^8.14.0",
68+
"eslint-config-airbnb-typescript": "^17.0.0",
69+
"eslint-config-prettier": "^8.5.0",
70+
"eslint-config-react-app": "^7.0.1",
7071
"eslint-plugin-flowtype": "^8.0.3",
71-
"eslint-plugin-import": "^2.25.4",
72+
"eslint-plugin-import": "^2.26.0",
7273
"eslint-plugin-jsx-a11y": "^6.5.1",
7374
"eslint-plugin-prettier": "^4.0.0",
74-
"eslint-plugin-react": "^7.28.0",
75-
"eslint-plugin-react-hooks": "^4.3.0",
75+
"eslint-plugin-react": "^7.29.4",
76+
"eslint-plugin-react-hooks": "^4.5.0",
7677
"jest": "^27.5.1",
78+
"jest-environment-jsdom": "^27.5.1",
7779
"jest-image-snapshot": "^4.5.1",
78-
"prettier": "^2.5.1",
80+
"prettier": "^2.6.2",
7981
"rimraf": "^3.0.2",
80-
"rollup": "^2.67.1",
82+
"rollup": "^2.71.1",
8183
"rollup-plugin-cleanup": "^3.2.1",
82-
"rollup-plugin-dts": "^4.1.0",
83-
"rollup-plugin-terser": "^7.0.2",
84+
"rollup-plugin-dts": "^4.2.1",
8485
"seedrandom": "^3.0.5",
85-
"ts-jest": "^27.1.3",
86-
"tslib": "^2.3.1",
87-
"typedoc": "^0.22.11",
88-
"typescript": "^4.5.5",
86+
"ts-jest": "^27.1.4",
87+
"tslib": "^2.4.0",
88+
"typedoc": "^0.22.15",
89+
"typescript": "^4.6.4",
8990
"us-atlas": "^3.0.0",
9091
"world-atlas": "^2.0.2"
9192
},
@@ -99,9 +100,9 @@
99100
"start": "yarn run watch",
100101
"watch": "rollup -c -w",
101102
"build": "rollup -c",
102-
"test": "jest --passWithNoTests",
103-
"test:watch": "jest --passWithNoTests --watch",
104-
"test:coverage": "jest --passWithNoTests --coverage",
103+
"test": "jest --passWithNoTests --detectOpenHandles --forceExit",
104+
"test:watch": "yarn run test --watch",
105+
"test:coverage": "yarn run test --coverage",
105106
"samples": "yarn tsc samples/type_test.ts",
106107
"lint": "yarn run eslint && yarn run prettier",
107108
"fix": "yarn run eslint:fix && yarn run prettier:write",
@@ -112,9 +113,9 @@
112113
"docs": "typedoc src/index.ts",
113114
"prepare": "yarn run build"
114115
},
115-
"packageManager": "yarn@3.1.1",
116+
"packageManager": "yarn@3.2.0",
116117
"dependenciesMeta": {
117-
"chart.js@3.7.0": {
118+
"chart.js@3.7.1": {
118119
"unplugged": true
119120
}
120121
}

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import resolve from '@rollup/plugin-node-resolve';
33
import cleanup from 'rollup-plugin-cleanup';
44
import dts from 'rollup-plugin-dts';
55
import typescript from '@rollup/plugin-typescript';
6-
import { terser } from 'rollup-plugin-terser';
6+
import { terser } from '@chiogen/rollup-plugin-terser';
77
import replace from '@rollup/plugin-replace';
88

99
import fs from 'fs';

samples/albers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/albersCustom.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/albersLegend.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/albersLog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/bubbleMap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="https://unpkg.com/chartjs-plugin-datalabels@next"></script>
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/papaparse"></script>

samples/bubbleMapArea.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/papaparse"></script>

samples/bubbleMapLog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
66
<script src="../build/index.umd.js"></script>
77
<script src="https://unpkg.com/papaparse"></script>

samples/default_esm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<script type="importmap-shim">
1212
{
1313
"imports": {
14-
"chart.js": "https://unpkg.com/chart.js@3.7.0?module",
15-
"chart.js/helpers": "https://unpkg.com/chart.js@3.7.0/helpers/helpers.esm.js?module",
14+
"chart.js": "https://unpkg.com/chart.js@3.7.1?module",
15+
"chart.js/helpers": "https://unpkg.com/chart.js@3.7.1/helpers/helpers.esm.js?module",
1616
"chartjs-chart-geo": "../build/index.js",
1717
"d3-geo": "https://unpkg.com/d3-geo?module",
1818
"d3-scale-chromatic": "https://unpkg.com/d3-scale-chromatic?module",

samples/earth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/earth_click.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/france.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
5+
<script src="https://unpkg.com/d3@v6"></script>
6+
<script src="https://unpkg.com/d3-composite-projections"></script>
7+
<script src="../build/index.umd.js"></script>
8+
</head>
9+
10+
<body>
11+
<div style="width: 75%">
12+
<canvas id="canvas" style="border: 1px solid black"></canvas>
13+
</div>
14+
<script>
15+
fetch('https://raw.githubusercontent.com/rveciana/d3-composite-projections/master/test/data/france.json')
16+
.then((r) => r.json())
17+
.then((france) => {
18+
const regions = ChartGeo.topojson.feature(france, france.objects.regions).features;
19+
const projection = d3.geoConicConformalFrance();
20+
projection.fitWidth = (size, object) => projection.fitSize([size, 1000], object);
21+
22+
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
23+
type: 'choropleth',
24+
data: {
25+
labels: regions.map((d, i) => d.properties.name || i),
26+
datasets: [
27+
{
28+
label: 'Regions',
29+
outline: regions,
30+
data: regions.map((d) => ({ feature: d, value: Math.random() * 10 })),
31+
},
32+
],
33+
},
34+
options: {
35+
plugins: {
36+
legend: {
37+
display: false,
38+
},
39+
},
40+
scales: {
41+
xy: {
42+
// projection: 'equalEarth',
43+
projection: () => projection,
44+
},
45+
// color: {
46+
// position: 'bottom',
47+
// quantize: 5,
48+
// }
49+
},
50+
},
51+
});
52+
});
53+
</script>
54+
</body>
55+
</html>

samples/germany.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

0 commit comments

Comments
 (0)