Skip to content

Commit

Permalink
Merge pull request #110 from sgratzl/release/v3.7.2
Browse files Browse the repository at this point in the history
Release v3.7.2
  • Loading branch information
sgratzl authored May 3, 2022
2 parents d0b7a80 + 668a69b commit 1dbfc31
Show file tree
Hide file tree
Showing 20 changed files with 1,890 additions and 1,737 deletions.
13 changes: 2 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,8 @@
const pkg = require('./package.json');

module.exports = {
plugins: [
// '@typescript-eslint',
'prettier',
],
extends: [
// 'airbnb-typescript',
'react-app',
// 'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
],
plugins: ['prettier'],
extends: ['airbnb-typescript', 'react-app', 'plugin:prettier/recommended', 'prettier'],
parserOptions: {
project: './tsconfig.eslint.json',
},
Expand Down
768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

785 changes: 785 additions & 0 deletions .yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ packageExtensions:
dependencies:
eslint-import-resolver-node: "*"

yarnPath: .yarn/releases/yarn-3.1.1.cjs
yarnPath: .yarn/releases/yarn-3.2.0.cjs
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
preset: 'ts-jest/presets/js-with-ts-esm',
rootDir: './src',
testRegex: '((\\.|/)(test|spec))\\.tsx?$',
};
73 changes: 37 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chartjs-chart-geo",
"description": "Chart.js module for charting maps",
"version": "3.7.1",
"version": "3.7.2",
"author": {
"name": "Samuel Gratzl",
"email": "[email protected]",
Expand Down Expand Up @@ -36,56 +36,57 @@
"src/**/*.ts"
],
"peerDependencies": {
"chart.js": "^3.7.0"
"chart.js": "^3.7.1"
},
"dependencies": {
"@types/d3-geo": "^3.0.2",
"@types/d3-scale-chromatic": "^3.0.0",
"@types/topojson-client": "^3.1.0",
"@types/topojson-client": "^3.1.1",
"d3-array": "^2.12.0",
"d3-geo": "^2.0.1",
"d3-scale-chromatic": "^2.0.0",
"topojson-client": "^3.1.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-typescript": "^8.3.0",
"@types/jest": "^27.4.0",
"@chiogen/rollup-plugin-terser": "^7.0.2",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.2.1",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.3.2",
"@types/jest": "^27.4.1",
"@types/jest-image-snapshot": "^4.3.1",
"@types/node": "^17.0.16",
"@types/seedrandom": "^3.0.1",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@yarnpkg/pnpify": "^3.1.0",
"@yarnpkg/sdks": "^2.5.0",
"canvas": "^2.9.0",
"@types/node": "^17.0.31",
"@types/seedrandom": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"@yarnpkg/pnpify": "^3.1.1",
"@yarnpkg/sdks": "^2.6.0",
"canvas": "^2.9.1",
"canvas-5-polyfill": "^0.1.5",
"chart.js": "^3.7.0",
"eslint": "^8.8.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^7.0.0",
"chart.js": "^3.7.1",
"eslint": "^8.14.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest-image-snapshot": "^4.5.1",
"prettier": "^2.5.1",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"rollup": "^2.67.1",
"rollup": "^2.71.1",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^4.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-dts": "^4.2.1",
"seedrandom": "^3.0.5",
"ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typedoc": "^0.22.11",
"typescript": "^4.5.5",
"ts-jest": "^27.1.4",
"tslib": "^2.4.0",
"typedoc": "^0.22.15",
"typescript": "^4.6.4",
"us-atlas": "^3.0.0",
"world-atlas": "^2.0.2"
},
Expand All @@ -99,9 +100,9 @@
"start": "yarn run watch",
"watch": "rollup -c -w",
"build": "rollup -c",
"test": "jest --passWithNoTests",
"test:watch": "jest --passWithNoTests --watch",
"test:coverage": "jest --passWithNoTests --coverage",
"test": "jest --passWithNoTests --detectOpenHandles --forceExit",
"test:watch": "yarn run test --watch",
"test:coverage": "yarn run test --coverage",
"samples": "yarn tsc samples/type_test.ts",
"lint": "yarn run eslint && yarn run prettier",
"fix": "yarn run eslint:fix && yarn run prettier:write",
Expand All @@ -112,9 +113,9 @@
"docs": "typedoc src/index.ts",
"prepare": "yarn run build"
},
"packageManager": "yarn@3.1.1",
"packageManager": "yarn@3.2.0",
"dependenciesMeta": {
"[email protected].0": {
"[email protected].1": {
"unplugged": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import resolve from '@rollup/plugin-node-resolve';
import cleanup from 'rollup-plugin-cleanup';
import dts from 'rollup-plugin-dts';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import { terser } from '@chiogen/rollup-plugin-terser';
import replace from '@rollup/plugin-replace';

import fs from 'fs';
Expand Down
2 changes: 1 addition & 1 deletion samples/albers.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/albersCustom.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/albersLegend.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/albersLog.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/bubbleMap.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="https://unpkg.com/chartjs-plugin-datalabels@next"></script>
<script src="../build/index.umd.js"></script>
<script src="https://unpkg.com/papaparse"></script>
Expand Down
2 changes: 1 addition & 1 deletion samples/bubbleMapArea.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
<script src="../build/index.umd.js"></script>
<script src="https://unpkg.com/papaparse"></script>
Expand Down
2 changes: 1 addition & 1 deletion samples/bubbleMapLog.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
<script src="../build/index.umd.js"></script>
<script src="https://unpkg.com/papaparse"></script>
Expand Down
4 changes: 2 additions & 2 deletions samples/default_esm.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<script type="importmap-shim">
{
"imports": {
"chart.js": "https://unpkg.com/[email protected].0?module",
"chart.js/helpers": "https://unpkg.com/[email protected].0/helpers/helpers.esm.js?module",
"chart.js": "https://unpkg.com/[email protected].1?module",
"chart.js/helpers": "https://unpkg.com/[email protected].1/helpers/helpers.esm.js?module",
"chartjs-chart-geo": "../build/index.js",
"d3-geo": "https://unpkg.com/d3-geo?module",
"d3-scale-chromatic": "https://unpkg.com/d3-scale-chromatic?module",
Expand Down
2 changes: 1 addition & 1 deletion samples/earth.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/earth_click.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
55 changes: 55 additions & 0 deletions samples/france.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected]/dist/chart.js"></script>
<script src="https://unpkg.com/d3@v6"></script>
<script src="https://unpkg.com/d3-composite-projections"></script>
<script src="../build/index.umd.js"></script>
</head>

<body>
<div style="width: 75%">
<canvas id="canvas" style="border: 1px solid black"></canvas>
</div>
<script>
fetch('https://raw.githubusercontent.com/rveciana/d3-composite-projections/master/test/data/france.json')
.then((r) => r.json())
.then((france) => {
const regions = ChartGeo.topojson.feature(france, france.objects.regions).features;
const projection = d3.geoConicConformalFrance();
projection.fitWidth = (size, object) => projection.fitSize([size, 1000], object);

const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: 'choropleth',
data: {
labels: regions.map((d, i) => d.properties.name || i),
datasets: [
{
label: 'Regions',
outline: regions,
data: regions.map((d) => ({ feature: d, value: Math.random() * 10 })),
},
],
},
options: {
plugins: {
legend: {
display: false,
},
},
scales: {
xy: {
// projection: 'equalEarth',
projection: () => projection,
},
// color: {
// position: 'bottom',
// quantize: 5,
// }
},
},
});
});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion samples/germany.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected].0/dist/chart.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
Loading

0 comments on commit 1dbfc31

Please sign in to comment.