Skip to content

Commit af9e89f

Browse files
authored
Merge pull request #7 from sgratzl/release/v3.7.0
Release v3.7.0
2 parents 14402ee + 5e40a54 commit af9e89f

File tree

14 files changed

+2787
-1502
lines changed

14 files changed

+2787
-1502
lines changed

.eslintrc.js

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

66
module.exports = {
7-
plugins: ['@typescript-eslint', 'prettier'],
7+
plugins: [
8+
// '@typescript-eslint',
9+
'prettier',
10+
],
811
extends: [
9-
'airbnb-typescript',
12+
// 'airbnb-typescript',
1013
'react-app',
11-
'plugin:@typescript-eslint/recommended',
14+
// 'plugin:@typescript-eslint/recommended',
1215
'plugin:prettier/recommended',
1316
'prettier',
1417
],

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- run: yarn build
2626
- run: yarn lint
2727
- run: yarn test
28+
- run: yarn samples
2829
- uses: actions/upload-artifact@v2
2930
if: failure()
3031
with:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ npm-debug.log*
2121
/.vscode/extensions.json
2222
/docs
2323
*.tsbuildinfo
24-
__diff_output__
24+
__diff_output__
25+
/samples/type_test.js

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
/yarn.lock
1212
/.vscode
1313
*.png
14-
*.tsbuildinfo
14+
*.tsbuildinfo
15+
/samples/type_test.js

.yarn/releases/yarn-3.1.0.cjs renamed to .yarn/releases/yarn-3.1.1.cjs

Lines changed: 150 additions & 150 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.0.cjs
6+
yarnPath: .yarn/releases/yarn-3.1.1.cjs

package.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chartjs-chart-pcp",
33
"description": "Chart.js module for charting parallel coordinate plots",
4-
"version": "3.6.0",
4+
"version": "3.7.0",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "sam@sgratzl.com",
@@ -33,7 +33,7 @@
3333
"src/**/*.ts"
3434
],
3535
"peerDependencies": {
36-
"chart.js": "^3.6.0"
36+
"chart.js": "^3.7.0"
3737
},
3838
"browserslist": [
3939
"Firefox ESR",
@@ -42,40 +42,40 @@
4242
],
4343
"devDependencies": {
4444
"@rollup/plugin-commonjs": "^21.0.1",
45-
"@rollup/plugin-node-resolve": "^13.0.6",
46-
"@rollup/plugin-replace": "^3.0.0",
45+
"@rollup/plugin-node-resolve": "^13.1.3",
46+
"@rollup/plugin-replace": "^3.0.1",
4747
"@rollup/plugin-typescript": "^8.3.0",
48-
"@types/jest": "^27.0.2",
48+
"@types/jest": "^27.4.0",
4949
"@types/jest-image-snapshot": "^4.3.1",
50-
"@types/node": "^16.11.6",
51-
"@typescript-eslint/eslint-plugin": "^5.3.0",
52-
"@typescript-eslint/parser": "^5.3.0",
50+
"@types/node": "^17.0.16",
51+
"@typescript-eslint/eslint-plugin": "^5.11.0",
52+
"@typescript-eslint/parser": "^5.11.0",
5353
"@yarnpkg/sdks": "^2.5.0",
54-
"canvas": "^2.8.0",
54+
"canvas": "^2.9.0",
5555
"canvas-5-polyfill": "^0.1.5",
56-
"chart.js": "^3.6.0",
57-
"eslint": "^8.1.0",
58-
"eslint-config-airbnb-typescript": "^14.0.1",
56+
"chart.js": "^3.7.0",
57+
"eslint": "^8.8.0",
58+
"eslint-config-airbnb-typescript": "^16.1.0",
5959
"eslint-config-prettier": "^8.3.0",
60-
"eslint-config-react-app": "^6.0.0",
60+
"eslint-config-react-app": "^7.0.0",
6161
"eslint-plugin-flowtype": "^8.0.3",
62-
"eslint-plugin-import": "^2.25.2",
63-
"eslint-plugin-jsx-a11y": "^6.4.1",
62+
"eslint-plugin-import": "^2.25.4",
63+
"eslint-plugin-jsx-a11y": "^6.5.1",
6464
"eslint-plugin-prettier": "^4.0.0",
65-
"eslint-plugin-react": "^7.26.1",
66-
"eslint-plugin-react-hooks": "^4.2.0",
67-
"jest": "^27.3.1",
65+
"eslint-plugin-react": "^7.28.0",
66+
"eslint-plugin-react-hooks": "^4.3.0",
67+
"jest": "^27.5.1",
6868
"jest-image-snapshot": "^4.5.1",
69-
"prettier": "^2.4.1",
69+
"prettier": "^2.5.1",
7070
"rimraf": "^3.0.2",
71-
"rollup": "^2.59.0",
71+
"rollup": "^2.67.1",
7272
"rollup-plugin-cleanup": "^3.2.1",
73-
"rollup-plugin-dts": "^4.0.0",
73+
"rollup-plugin-dts": "^4.1.0",
7474
"rollup-plugin-terser": "^7.0.2",
75-
"ts-jest": "^27.0.7",
75+
"ts-jest": "^27.1.3",
7676
"tslib": "^2.3.1",
77-
"typedoc": "^0.22.7",
78-
"typescript": "^4.4.4"
77+
"typedoc": "^0.22.11",
78+
"typescript": "^4.5.5"
7979
},
8080
"scripts": {
8181
"clean": "rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\"",
@@ -87,6 +87,7 @@
8787
"test": "jest --passWithNoTests",
8888
"test:watch": "jest --passWithNoTests --watch",
8989
"test:coverage": "jest --passWithNoTests --coverage",
90+
"samples": "yarn tsc samples/type_test.ts",
9091
"lint": "yarn run eslint && yarn run prettier",
9192
"fix": "yarn run eslint:fix && yarn run prettier:write",
9293
"prettier:write": "prettier \"*\" \"*/**\" --write",
@@ -96,5 +97,5 @@
9697
"docs": "typedoc src/index.ts",
9798
"prepare": "yarn run build"
9899
},
99-
"packageManager": "yarn@3.1.0"
100+
"packageManager": "yarn@3.1.1"
100101
}

samples/basic.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.6.0/dist/chart.js"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.0/dist/chart.js"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/basicLog.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.6.0"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.0"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

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.6.0?module",
15-
"chart.js/helpers": "https://unpkg.com/chart.js@3.6.0/helpers/helpers.esm.js?module",
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",
1616
"chartjs-chart-pcp": "../build/index.js"
1717
}
1818
}

samples/tension.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.6.0"></script>
4+
<script src="https://unpkg.com/chart.js@3.7.0"></script>
55
<script src="../build/index.umd.js"></script>
66
</head>
77

samples/type_test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Chart } from 'chart.js';
2+
import { ParallelCoordinatesController, LinearAxis, LineSegment, PCPScale } from '../build';
3+
4+
Chart.register(ParallelCoordinatesController, PCPScale, LineSegment);
5+
Chart.registry.addElements(LinearAxis);
6+
7+
const ctx = document.querySelector('canvas').getContext('2d');
8+
9+
const objs = [
10+
{ label: 'A', f1: 5, f2: 3, f4: 3 },
11+
{ label: 'B', f1: 2, f2: 1, f4: 8 },
12+
{ label: 'C', f1: 10, f2: 6, f4: 2 },
13+
];
14+
const attrs = ['f1', 'f2', 'f3'];
15+
16+
const chart = new Chart(ctx, {
17+
type: 'pcp',
18+
data: {
19+
labels: objs.map((obj) => obj.label),
20+
datasets: attrs.map((attr) => ({
21+
label: attr,
22+
data: objs.map((obj) => obj[attr]),
23+
axisWidth: 20,
24+
})),
25+
},
26+
options: {
27+
elements: {
28+
linearAxis: {
29+
axisWidth: 20,
30+
},
31+
lineSegment: {
32+
tension: 10,
33+
},
34+
},
35+
},
36+
});

src/elements/LineSegment.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,9 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
123123

124124
static readonly descriptors = (LineElement as any).descriptors;
125125
}
126+
127+
declare module 'chart.js' {
128+
export interface ElementOptionsByType<TType extends ChartType> {
129+
lineSegment: ScriptableAndArrayOptions<ILineSegmentOptions, ScriptableContext<TType>>;
130+
}
131+
}

0 commit comments

Comments
 (0)