Skip to content

Commit

Permalink
Merge pull request #34 from sgratzl/release/v3.8.0
Browse files Browse the repository at this point in the history
Release v3.8.0
  • Loading branch information
sgratzl authored Jun 11, 2022
2 parents df94c46 + 3142440 commit ae1b61c
Show file tree
Hide file tree
Showing 31 changed files with 2,356 additions and 2,253 deletions.
785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

786 changes: 786 additions & 0 deletions .yarn/releases/yarn-3.2.1.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.2.0.cjs
yarnPath: .yarn/releases/yarn-3.2.1.cjs
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NPM Package][npm-image]][npm-url] [![Github Actions][github-actions-image]][github-actions-url]

Chart.js module for charting graphs. Adding new chart types: `graph`, `forceDirectedGraph`, `dendogram`, and `tree`.
Chart.js module for charting graphs. Adding new chart types: `graph`, `forceDirectedGraph`, `dendrogram`, and `tree`.

![force](https://user-images.githubusercontent.com/4129778/65398353-9bc03f80-dd84-11e9-8f14-339635c1ba4e.png)

Expand Down Expand Up @@ -101,25 +101,25 @@ Computes the x,y position of nodes based on a force simulation. It is based on h

### Options

## Dendogram, Tree
## Dendrogram, Tree

chart types: `dendogram`, `tree`
chart types: `dendrogram`, `tree`

The tree and dendograms layouts are based on https://github.com/d3/d3-hierarchy.
The tree and dendrograms layouts are based on https://github.com/d3/d3-hierarchy.

**Dendogram Horizontal**
**Dendrogram Horizontal**

![dend_h](https://user-images.githubusercontent.com/4129778/65398352-9bc03f80-dd84-11e9-9197-ecb66a872736.png)

[![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/jObedwg)

**Dendogram Vertical**
**Dendrogram Vertical**

![dend_v](https://user-images.githubusercontent.com/4129778/65398355-9bc03f80-dd84-11e9-9ea3-9501a79491fb.png)

[![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/jObedwg)

**Dendogram Radial**
**Dendrogram Radial**

![radial](https://user-images.githubusercontent.com/4129778/65398460-581a0580-dd85-11e9-93b6-b70946f1155f.png)

Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chartjs-chart-graph",
"description": "Chart.js module for charting error bars",
"version": "3.7.1",
"version": "3.8.0",
"author": {
"name": "Samuel Gratzl",
"email": "sam@sgratzl.com",
Expand Down Expand Up @@ -35,7 +35,7 @@
"src/**/*.ts"
],
"peerDependencies": {
"chart.js": "^3.7.1"
"chart.js": "^3.8.0"
},
"browserslist": [
"Firefox ESR",
Expand All @@ -51,42 +51,42 @@
"devDependencies": {
"@chiogen/rollup-plugin-terser": "^7.0.2",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.2.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.3.2",
"@types/jest": "^27.4.1",
"@rollup/plugin-typescript": "^8.3.3",
"@types/jest": "^28.1.1",
"@types/jest-image-snapshot": "^4.3.1",
"@types/node": "^17.0.31",
"@types/node": "^17.0.42",
"@types/seedrandom": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"@yarnpkg/sdks": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"@yarnpkg/sdks": "^2.6.2",
"canvas": "^2.9.1",
"canvas-5-polyfill": "^0.1.5",
"chart.js": "^3.7.1",
"eslint": "^8.14.0",
"chart.js": "^3.8.0",
"eslint": "^8.17.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.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest-image-snapshot": "^4.5.1",
"jest": "^28.1.1",
"jest-environment-jsdom": "^28.1.1",
"jest-image-snapshot": "^5.1.0",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"rollup": "^2.71.1",
"rollup": "~2.75.6",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^4.2.1",
"rollup-plugin-dts": "^4.2.2",
"seedrandom": "^3.0.5",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.4",
"tslib": "^2.4.0",
"typedoc": "^0.22.15",
"typescript": "^4.6.4"
"typedoc": "^0.22.17",
"typescript": "^4.7.3"
},
"scripts": {
"clean": "rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\"",
Expand All @@ -108,5 +108,5 @@
"docs": "typedoc src/index.ts",
"prepare": "yarn run build"
},
"packageManager": "yarn@3.2.0"
"packageManager": "yarn@3.2.1"
}
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.7.1?module",
"chart.js/helpers": "https://unpkg.com/chart.js@3.7.1/helpers/helpers.esm.js?module",
"chart.js": "https://unpkg.com/chart.js@3.8.0?module",
"chart.js/helpers": "https://unpkg.com/chart.js@3.8.0/helpers/helpers.esm.js?module",
"chartjs-chart-graph": "../build/index.js",
"d3-force": "https://unpkg.com/d3-force?module",
"d3-hierarchy": "https://unpkg.com/d3-hierarchy?module"
Expand Down
8 changes: 4 additions & 4 deletions samples/directed.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

<body>
<div style="width: 75%">
<canvas id="canvas"></canvas>
<select id="mode" value="dendogram">
<option>dendogram</option>
<select id="mode" value="dendrogram">
<option>dendrogram</option>
<option>tree</option>
</select>
<select id="orientation" value="horizontal">
Expand All @@ -23,7 +23,7 @@
.then((r) => r.json())
.then((nodes) => {
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: 'dendogram',
type: 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script>
<script src="https://unpkg.com/chartjs-plugin-zoom/dist/chartjs-plugin-zoom"></script>
<script src="../build/index.umd.js"></script>
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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand Down
6 changes: 3 additions & 3 deletions samples/multi.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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
<style>
body {
Expand Down Expand Up @@ -54,8 +54,8 @@
.then((r) => r.json())
.then((nodes) => {
createChart(nodes, 'dh', 'tree', 'horizontal');
createChart(nodes, 'dv', 'dendogram', 'vertical');
createChart(nodes, 'dr', 'dendogram', 'radial');
createChart(nodes, 'dv', 'dendrogram', 'vertical');
createChart(nodes, 'dr', 'dendrogram', 'radial');
createChart(nodes, 'th', 'tree', 'horizontal');
createChart(nodes, 'tv', 'tree', 'vertical');
createChart(nodes, 'tr', 'tree', 'radial');
Expand Down
4 changes: 2 additions & 2 deletions 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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

Expand All @@ -14,7 +14,7 @@
.then((r) => r.json())
.then((nodes) => {
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: 'dendogram',
type: 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand Down
4 changes: 2 additions & 2 deletions 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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="https://unpkg.com/chartjs-plugin-datalabels@next"></script>
<!-- <script src="https://unpkg.com/chartjs-plugin-datalabels"></script> -->
<script src="../build/index.umd.js"></script>
Expand All @@ -17,7 +17,7 @@
.then((r) => r.json())
.then((nodes) => {
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: 'dendogram',
type: 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand Down
8 changes: 4 additions & 4 deletions samples/tree.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/chart.js@3.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="../build/index.umd.js"></script>
</head>

<body>
<div style="width: 75%">
<canvas id="canvas"></canvas>
<select id="mode" value="dendogram">
<option>dendogram</option>
<select id="mode" value="dendrogram">
<option>dendrogram</option>
<option>tree</option>
</select>
<select id="orientation" value="horizontal">
Expand All @@ -23,7 +23,7 @@
.then((r) => r.json())
.then((nodes) => {
const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: 'dendogram',
type: 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand Down
6 changes: 3 additions & 3 deletions 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.7.1/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.8.0/dist/chart.js"></script>
<script src="https://unpkg.com/chartjs-plugin-datalabels@next"></script>
<script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script>
<script src="https://unpkg.com/chartjs-plugin-zoom/dist/chartjs-plugin-zoom"></script>
Expand All @@ -11,8 +11,8 @@
<body>
<div style="width: 75%">
<canvas id="canvas"></canvas>
<select id="mode" value="dendogram">
<option>dendogram</option>
<select id="mode" value="dendrogram">
<option>dendrogram</option>
<option>tree</option>
</select>
<select id="orientation" value="horizontal">
Expand Down
2 changes: 1 addition & 1 deletion samples/type_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const chart2 = new Chart(ctx, {
});

const chart3 = new Chart(ctx, {
type: 'dendogram',
type: 'dendrogram',
data: {
labels: ['A', 'B', 'C'], // node labels
datasets: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { registry, PointElement, LinearScale } from 'chart.js';
import createChart from '../__tests__/createChart';
import { DendogramController } from './DendogramController';
import { DendrogramController } from './DendrogramController';
import nodes from './__tests__/tree';
import { EdgeLine } from '../elements';

describe('dendogram', () => {
describe('dendrogram', () => {
beforeAll(() => {
registry.addControllers(DendogramController);
registry.addControllers(DendrogramController);
registry.addElements(EdgeLine, PointElement);
registry.addScales(LinearScale);
});
test('default', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -28,7 +28,7 @@ describe('dendogram', () => {
});
test('vertical', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -47,7 +47,7 @@ describe('dendogram', () => {
});
test('radial', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -67,7 +67,7 @@ describe('dendogram', () => {

test('default tree', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -86,7 +86,7 @@ describe('dendogram', () => {
});
test('vertical tree', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -106,7 +106,7 @@ describe('dendogram', () => {
});
test('radial tree', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand All @@ -126,7 +126,7 @@ describe('dendogram', () => {
});
test('directed', () => {
return createChart({
type: DendogramController.id as 'dendogram',
type: DendrogramController.id as 'dendrogram',
data: {
labels: nodes.map((d) => d.name),
datasets: [
Expand Down
Loading

0 comments on commit ae1b61c

Please sign in to comment.