Skip to content

Commit 71aee67

Browse files
committed
Merge branch 'dev'
2 parents 3d9a21c + ed983c0 commit 71aee67

17 files changed

+1192
-2459
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Samuel Gratzl
3+
Copyright (c) 2021 Samuel Gratzl
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
Chart.js module for charting maps with legends. Adding new chart types: `choropleth` and `bubbleMap`.
66

7-
**Works only with Chart.js >= 3.0.0**
8-
97
![Choropleth](https://user-images.githubusercontent.com/4129778/78821942-8b974700-79da-11ea-988d-142f7788ffe6.png)
108

119
[![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/gOaBQep)
@@ -20,6 +18,18 @@ Chart.js module for charting maps with legends. Adding new chart types: `choropl
2018

2119
works great with https://github.com/chartjs/chartjs-plugin-datalabels
2220

21+
## Related Plugins
22+
23+
Check out also my other chart.js plugins:
24+
25+
- [chartjs-chart-boxplot](https://github.com/sgratzl/chartjs-chart-boxplot) for rendering boxplots and violin plots
26+
- [chartjs-chart-error-bars](https://github.com/sgratzl/chartjs-chart-error-bars) for rendering errors bars to bars and line charts
27+
- [chartjs-chart-graph](https://github.com/sgratzl/chartjs-chart-graph) for rendering graphs, trees, and networks
28+
- [chartjs-chart-pcp](https://github.com/sgratzl/chartjs-chart-pcp) for rendering parallel coordinate plots
29+
- [chartjs-chart-venn](https://github.com/sgratzl/chartjs-chart-venn) for rendering venn and euler diagrams
30+
- [chartjs-chart-wordcloud](https://github.com/sgratzl/chartjs-chart-wordcloud) for rendering word clouds
31+
- [chartjs-plugin-hierarchical](https://github.com/sgratzl/chartjs-plugin-hierarchical) for rendering hierarchical categorical axes which can be expanded and collapsed
32+
2333
## Install
2434

2535
```bash

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* eslint-env node */
22

33
module.exports = {
4+
testEnvironment: 'jsdom',
45
preset: 'ts-jest',
6+
rootDir: './src',
57
testRegex: '((\\.|/)(test|spec))\\.tsx?$',
68
};

package.json

Lines changed: 20 additions & 16 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.0.2",
4+
"version": "3.1.0",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "sam@sgratzl.com",
@@ -36,12 +36,13 @@
3636
"src/**/*.ts"
3737
],
3838
"peerDependencies": {
39-
"chart.js": "^3.2.1"
39+
"chart.js": "^3.3.2"
4040
},
4141
"dependencies": {
4242
"@types/d3-geo": "^2.0.0",
4343
"@types/d3-scale-chromatic": "^2.0.0",
4444
"@types/topojson-client": "^3.1.0",
45+
"d3-array": "^2.12.0",
4546
"d3-geo": "^2.0.1",
4647
"d3-scale-chromatic": "^2.0.0",
4748
"topojson-client": "^3.1.0"
@@ -53,41 +54,44 @@
5354
"@rollup/plugin-typescript": "^8.2.1",
5455
"@types/jest": "^26.0.23",
5556
"@types/jest-image-snapshot": "^4.3.0",
56-
"@types/node": "^15.0.2",
57+
"@types/node": "^15.12.1",
5758
"@types/seedrandom": "^3.0.0",
58-
"@typescript-eslint/eslint-plugin": "^4.22.1",
59-
"@typescript-eslint/parser": "^4.22.1",
59+
"@typescript-eslint/eslint-plugin": "^4.26.0",
60+
"@typescript-eslint/parser": "^4.26.0",
6061
"@yarnpkg/pnpify": "^2.4.0",
61-
"canvas": "^2.7.0",
62+
"canvas": "^2.8.0",
6263
"canvas-5-polyfill": "^0.1.5",
6364
"chart.js": "3.0.0-rc.3",
64-
"eslint": "^7.26.0",
65+
"eslint": "^7.28.0",
6566
"eslint-config-airbnb-typescript": "^12.3.1",
6667
"eslint-config-prettier": "^8.3.0",
6768
"eslint-config-react-app": "^6.0.0",
6869
"eslint-plugin-flowtype": "^5.7.2",
69-
"eslint-plugin-import": "^2.22.1",
70+
"eslint-plugin-import": "^2.23.4",
7071
"eslint-plugin-jsx-a11y": "^6.4.1",
7172
"eslint-plugin-prettier": "^3.4.0",
72-
"eslint-plugin-react": "^7.23.2",
73+
"eslint-plugin-react": "^7.24.0",
7374
"eslint-plugin-react-hooks": "^4.2.0",
74-
"jest": "^26.6.3",
75+
"jest": "^27.0.4",
7576
"jest-image-snapshot": "^4.5.0",
76-
"prettier": "^2.3.0",
77-
"release-it": "^14.6.2",
77+
"prettier": "^2.3.1",
78+
"release-it": "^14.7.0",
7879
"rimraf": "^3.0.2",
79-
"rollup": "^2.47.0",
80+
"rollup": "^2.50.6",
8081
"rollup-plugin-cleanup": "^3.2.1",
81-
"rollup-plugin-dts": "^3.0.1",
82+
"rollup-plugin-dts": "^3.0.2",
8283
"rollup-plugin-terser": "^7.0.2",
8384
"seedrandom": "^3.0.5",
84-
"ts-jest": "^26.5.6",
85+
"ts-jest": "^27.0.2",
8586
"tslib": "^2.2.0",
8687
"typedoc": "^0.20.36",
87-
"typescript": "^4.2.4",
88+
"typescript": "^4.3.2",
8889
"us-atlas": "^3.0.0",
8990
"world-atlas": "^2.0.2"
9091
},
92+
"resolutions": {
93+
"d3-array": "^2.12.0"
94+
},
9195
"scripts": {
9296
"clean": "rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\"",
9397
"compile": "tsc -b tsconfig.c.json",

rollup.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,22 @@ import fs from 'fs';
1010

1111
const pkg = JSON.parse(fs.readFileSync('./package.json'));
1212

13+
function resolveYear() {
14+
// Extract copyrights from the LICENSE.
15+
const license = fs.readFileSync('./LICENSE', 'utf-8').toString();
16+
const matches = Array.from(license.matchAll(/\(c\) (\d+)/gm));
17+
if (!matches || matches.length === 0) {
18+
return 2021;
19+
}
20+
return matches[matches.length - 1][1];
21+
}
22+
const year = resolveYear();
23+
1324
const banner = `/**
1425
* ${pkg.name}
1526
* ${pkg.homepage}
1627
*
17-
* Copyright (c) ${new Date().getFullYear()} ${pkg.author.name} <${pkg.author.email}>
28+
* Copyright (c) ${year} ${pkg.author.name} <${pkg.author.email}>
1829
*/
1930
`;
2031

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.0.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.3.2/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.0.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.3.2/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.0.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.3.2/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.0.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.3.2/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.0.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.3.2/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>

0 commit comments

Comments
 (0)