Skip to content

Commit

Permalink
feat: upgrade to beta.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Dec 9, 2020
1 parent 6957c49 commit 25f5adb
Show file tree
Hide file tree
Showing 15 changed files with 149 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"liveServer.settings.port": 5503
"liveServer.settings.port": 5504
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,30 @@
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-typescript": "^8.0.0",
"@types/jest": "^26.0.15",
"@types/jest": "^26.0.18",
"@types/jest-image-snapshot": "^4.1.3",
"@types/node": "^14.14.10",
"@types/node": "^14.14.11",
"@types/seedrandom": "^2.4.28",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"@typescript-eslint/eslint-plugin": "^4.9.1",
"@typescript-eslint/parser": "^4.9.1",
"@yarnpkg/pnpify": "^2.4.0",
"canvas": "^2.6.1",
"chart.js": "^3.0.0-beta.6",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"chart.js": "^3.0.0-beta.7",
"eslint": "^7.15.0",
"eslint-config-prettier": "^7.0.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^26.6.3",
"jest-image-snapshot": "^4.2.0",
"prettier": "^2.2.1",
"release-it": "^14.2.2",
"rimraf": "^3.0.2",
"rollup": "^2.34.0",
"rollup": "^2.34.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
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/chart.js@3.0.0-beta.6?module",
"chart.js/helpers": "https://unpkg.com/chart.js@3.0.0-beta.6/helpers/helpers.esm.js?module",
"chart.js": "https://unpkg.com/chart.js@3.0.0-beta.7?module",
"chart.js/helpers": "https://unpkg.com/chart.js@3.0.0-beta.7/helpers/helpers.esm.js?module",
"chartjs-chart-graph": "../build/index.esm.js",
"d3-force": "https://unpkg.com/d3-force?module",
"d3-hierarchy": "https://unpkg.com/d3-hierarchy?module"
Expand Down
2 changes: 1 addition & 1 deletion samples/directed.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.0.0-beta.6/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.0.0-beta.7/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion samples/radiallabel.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.0.0-beta.6/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.0.0-beta.7/dist/chart.js"></script>
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
<script src="../build/index.umd.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion samples/tree.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.0.0-beta.6/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.0.0-beta.7/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion samples/treelabel.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.0.0-beta.6/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.0.0-beta.7/dist/chart.js"></script>
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script>
<script src="https://unpkg.com/chartjs-plugin-dragdata"></script> -->
<script src="../build/index.umd.js"></script>
Expand Down
12 changes: 7 additions & 5 deletions src/__tests__/createChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ export default function createChart<
{
responsive: false,
animation: false,
legend: {
display: false,
},
title: {
display: false,
plugins: {
legend: {
display: false,
},
title: {
display: false,
},
},
},
config.options || {}
Expand Down
5 changes: 0 additions & 5 deletions src/controllers/forceDirected.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
});
3 changes: 1 addition & 2 deletions src/controllers/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ export class GraphController extends ScatterController {
initialize() {
const type = this._type;
const defaultConfig = defaults.get(`controllers.${type}`);
console.log('type', type, defaultConfig, (this as any)._config);
this.edgeElementOptions = defaultConfig.edgeElementOptions;
this.edgeElementType = registry.getElement(defaultConfig.edgeElementType);
this.edgeElementType = registry.getElement(defaultConfig.edgeElementType as string);
super.initialize();
this.enableOptionSharing = true;
this._scheduleResyncLayout();
Expand Down
35 changes: 0 additions & 35 deletions src/controllers/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
test('vertical', () => {
Expand All @@ -48,11 +43,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
test('radial', () => {
Expand All @@ -72,11 +62,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});

Expand All @@ -97,11 +82,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
test('vertical tree', () => {
Expand All @@ -122,11 +102,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
test('radial tree', () => {
Expand All @@ -147,11 +122,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
test('directed', () => {
Expand All @@ -169,11 +139,6 @@ describe('dendogram', () => {
},
],
},
options: {
legend: {
display: false,
},
},
}).toMatchImageSnapshot();
});
});
Loading

0 comments on commit 25f5adb

Please sign in to comment.