Skip to content

Commit d854249

Browse files
authored
Merge pull request #72 from sgratzl/release/v4.2.1
Release v4.2.1
2 parents ecf7442 + 26d2cff commit d854249

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4211
-3609
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- run: yarn build
2626
- run: yarn lint
2727
- run: yarn test
28-
- run: yarn samples
2928
- uses: actions/upload-artifact@v2
3029
if: failure()
3130
with:
3231
name: diff outputs
3332
path: src/**/__diff_output__/*.png
33+
- run: yarn docs:build

.github/workflows/deploy_website.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Website
2+
on:
3+
workflow_dispatch: {}
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pages: write
12+
id-token: write
13+
environment:
14+
name: github-pages
15+
url: ${{ steps.deployment.outputs.page_url }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 16
23+
cache: npm
24+
- run: npm i -g yarn
25+
- run: yarn config set checksumBehavior ignore
26+
- name: Cache Node.js modules
27+
uses: actions/cache@v3
28+
with:
29+
path: |
30+
./.yarn/cache
31+
./.yarn/unplugged
32+
key: ${{ runner.os }}-yarn2-v5-${{ hashFiles('**/yarn.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn2-v5
35+
- run: yarn install
36+
- run: yarn docs:build
37+
- uses: actions/configure-pages@v2
38+
- uses: actions/upload-pages-artifact@v1
39+
with:
40+
path: docs/.vitepress/dist
41+
- name: Deploy
42+
id: deployment
43+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ npm-debug.log*
1919

2020
*.tgz
2121
/.vscode/extensions.json
22-
/docs
2322
*.tsbuildinfo
2423
.eslintcache
2524
__diff_output__
2625

27-
/samples/type_test.js
26+
docs/.vitepress/dist
27+
docs/.vitepress/cache
28+
docs/.vitepress/config.ts.timestamp*
29+
docs/api/

.prettierignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
/.yarnrc.yml
33
/.yarn
44
/build
5-
/docs
5+
/docs/.vitepress/cache
6+
/docs/.vitepress/dist
7+
/docs/.vitepress/config.ts.timestamp*
8+
/docs/api
69
/coverage
710
/.gitattributes
811
/.gitignore
@@ -14,4 +17,4 @@
1417
*.tgz
1518
*.tsbuildinfo
1619
.eslintcache
17-
/samples/type_test.js
20+
.nojekyll

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"[yaml]": {
1414
"editor.defaultFormatter": "esbenp.prettier-vscode"
1515
},
16-
"eslint.packageManager": "yarn",
1716
"npm.packageManager": "yarn",
1817
"eslint.nodePath": ".yarn/sdks",
1918
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",

.yarn/releases/yarn-3.5.0.cjs renamed to .yarn/releases/yarn-3.6.1.cjs

Lines changed: 280 additions & 279 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.5.0.cjs
6+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,15 @@ Chart.js module for charting box and violin plots. This is a maintained fork of
77
![Box Plot](https://user-images.githubusercontent.com/4129778/42724341-9a6ec554-8770-11e8-99b5-626e34dafdb3.png)
88
![Violin Plot](https://user-images.githubusercontent.com/4129778/42724342-9a8dbb58-8770-11e8-9a30-3e69d07d3b79.png)
99

10-
## Related Plugins
11-
12-
Check out also my other chart.js plugins:
13-
14-
- [chartjs-chart-error-bars](https://github.com/sgratzl/chartjs-chart-error-bars) for rendering errors bars to bars and line charts
15-
- [chartjs-chart-geo](https://github.com/sgratzl/chartjs-chart-geo) for rendering map, bubble maps, and choropleth charts
16-
- [chartjs-chart-graph](https://github.com/sgratzl/chartjs-chart-graph) for rendering graphs, trees, and networks
17-
- [chartjs-chart-pcp](https://github.com/sgratzl/chartjs-chart-pcp) for rendering parallel coordinate plots
18-
- [chartjs-chart-venn](https://github.com/sgratzl/chartjs-chart-venn) for rendering venn and euler diagrams
19-
- [chartjs-chart-wordcloud](https://github.com/sgratzl/chartjs-chart-wordcloud) for rendering word clouds
20-
- [chartjs-plugin-hierarchical](https://github.com/sgratzl/chartjs-plugin-hierarchical) for rendering hierarchical categorical axes which can be expanded and collapsed
21-
2210
## Install
2311

2412
```bash
25-
npm install --save chart.js @sgratzl/chartjs-chart-boxplot
13+
npm install chart.js @sgratzl/chartjs-chart-boxplot
2614
```
2715

2816
## Usage
2917

30-
see [Samples](https://github.com/sgratzl/chartjs-chart-box-and-violin-plot/tree/main/samples) on Github
18+
see [Examples](https://sgratzl.com/chartjs-chart-boxplot/examples/)
3119

3220
and [![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/QxoLoY)
3321

@@ -76,7 +64,7 @@ interface ITooltipItem {
7664
}
7765
```
7866

79-
### ESM and Tree Shaking
67+
## ESM and Tree Shaking
8068

8169
The ESM build of the library supports tree shaking thus having no side effects. As a consequence the chart.js library won't be automatically manipulated nor new controllers automatically registered. One has to manually import and register them.
8270

@@ -106,6 +94,18 @@ new BoxPlotChart(ctx, {
10694
});
10795
```
10896

97+
## Related Plugins
98+
99+
Check out also my other chart.js plugins:
100+
101+
- [chartjs-chart-error-bars](https://github.com/sgratzl/chartjs-chart-error-bars) for rendering errors bars to bars and line charts
102+
- [chartjs-chart-geo](https://github.com/sgratzl/chartjs-chart-geo) for rendering map, bubble maps, and choropleth charts
103+
- [chartjs-chart-graph](https://github.com/sgratzl/chartjs-chart-graph) for rendering graphs, trees, and networks
104+
- [chartjs-chart-pcp](https://github.com/sgratzl/chartjs-chart-pcp) for rendering parallel coordinate plots
105+
- [chartjs-chart-venn](https://github.com/sgratzl/chartjs-chart-venn) for rendering venn and euler diagrams
106+
- [chartjs-chart-wordcloud](https://github.com/sgratzl/chartjs-chart-wordcloud) for rendering word clouds
107+
- [chartjs-plugin-hierarchical](https://github.com/sgratzl/chartjs-plugin-hierarchical) for rendering hierarchical categorical axes which can be expanded and collapsed
108+
109109
## Development Environment
110110

111111
```sh

docs/.vitepress/config.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { defineConfig } from 'vitepress';
2+
import { name, description, repository, license, author } from '../../package.json';
3+
import typedocSidebar from '../api/typedoc-sidebar.json';
4+
5+
const cleanName = name.replace('@sgratzl/', '');
6+
7+
// https://vitepress.dev/reference/site-config
8+
export default defineConfig({
9+
title: cleanName,
10+
description,
11+
base: `/${cleanName}/`,
12+
useWebFonts: false,
13+
themeConfig: {
14+
// https://vitepress.dev/reference/default-theme-config
15+
nav: [
16+
{ text: 'Home', link: '/' },
17+
{ text: 'Getting Started', link: '/getting-started' },
18+
{ text: 'Examples', link: '/examples/' },
19+
{ text: 'API', link: '/api/' },
20+
{ text: 'Related Plugins', link: '/related' },
21+
],
22+
23+
sidebar: [
24+
{
25+
text: 'Examples',
26+
items: [
27+
{ text: 'Basic', link: '/examples/' },
28+
{ text: 'Data Limits', link: '/examples/datalimits' },
29+
{ text: 'Data Structures', link: '/examples/datastructures' },
30+
{ text: 'Quantile Computation', link: '/examples/fivenum' },
31+
{ text: 'Horizontal Plots', link: '/examples/horizontal' },
32+
{ text: 'Large Numbers', link: '/examples/large_number' },
33+
{ text: 'Logarithmic Scale', link: '/examples/logarithm' },
34+
{ text: 'Hybrid Chart', link: '/examples/hybrid' },
35+
{ text: 'Data Points', link: '/examples/items' },
36+
{ text: 'Styling', link: '/examples/styling' },
37+
],
38+
},
39+
{
40+
text: 'API',
41+
collapsed: true,
42+
items: typedocSidebar,
43+
},
44+
],
45+
46+
socialLinks: [{ icon: 'github', link: repository.url.replace('.git', '') }],
47+
48+
footer: {
49+
message: `Released under the <a href="${repository.url.replace(
50+
'.git',
51+
''
52+
)}/tree/main/LICENSE">${license} license</a>.`,
53+
copyright: `Copyright © 2019-present <a href="${author.url}">${author.name}</a>`,
54+
},
55+
56+
editLink: {
57+
pattern: `${repository.url.replace('.git', '')}/edit/main/docs/:path`,
58+
},
59+
60+
search: {
61+
provider: 'local',
62+
},
63+
},
64+
});

docs/.vitepress/theme/index.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import Theme from 'vitepress/theme';
2+
import { createTypedChart } from 'vue-chartjs';
3+
import {
4+
LinearScale,
5+
CategoryScale,
6+
LogarithmicScale,
7+
Tooltip,
8+
Title,
9+
Legend,
10+
Colors,
11+
BarElement,
12+
LineElement,
13+
PointElement,
14+
BarController,
15+
LineController,
16+
} from 'chart.js';
17+
import { BoxAndWiskers, BoxPlotController, Violin, ViolinController } from '../../../src';
18+
19+
export default {
20+
...Theme,
21+
enhanceApp({ app }) {
22+
app.component(
23+
'BoxplotChart',
24+
createTypedChart('boxplot', [
25+
LinearScale,
26+
CategoryScale,
27+
LogarithmicScale,
28+
BoxAndWiskers,
29+
BoxPlotController,
30+
Tooltip,
31+
Legend,
32+
Colors,
33+
Title,
34+
BarElement,
35+
LineElement,
36+
PointElement,
37+
BarController,
38+
LineController,
39+
])
40+
);
41+
app.component(
42+
'ViolinChart',
43+
createTypedChart('violin', [
44+
LinearScale,
45+
CategoryScale,
46+
LogarithmicScale,
47+
Violin,
48+
ViolinController,
49+
Tooltip,
50+
Legend,
51+
Colors,
52+
Title,
53+
])
54+
);
55+
},
56+
};

0 commit comments

Comments
 (0)