Skip to content

Commit 932bc0c

Browse files
authored
Merge pull request #91 from sgratzl/release/v4.2.7
Release v4.2.7
2 parents faf3b8d + 38b8c1e commit 932bc0c

4 files changed

Lines changed: 436 additions & 406 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: ci
22

3-
on: [push]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
build:

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sgratzl/chartjs-chart-boxplot",
33
"description": "Chart.js module for charting boxplots and violin charts",
4-
"version": "4.2.6",
4+
"version": "4.2.7",
55
"publishConfig": {
66
"access": "public"
77
},
@@ -73,15 +73,15 @@
7373
},
7474
"devDependencies": {
7575
"@chiogen/rollup-plugin-terser": "^7.1.3",
76-
"@rollup/plugin-commonjs": "^25.0.5",
76+
"@rollup/plugin-commonjs": "^25.0.7",
7777
"@rollup/plugin-node-resolve": "^15.2.3",
78-
"@rollup/plugin-replace": "^5.0.3",
78+
"@rollup/plugin-replace": "^5.0.4",
7979
"@rollup/plugin-typescript": "^11.1.5",
80-
"@types/jest": "^29.5.5",
81-
"@types/jest-image-snapshot": "^6.2.1",
82-
"@types/node": "^20.8.3",
83-
"@typescript-eslint/eslint-plugin": "^6.7.4",
84-
"@typescript-eslint/parser": "^6.7.4",
80+
"@types/jest": "^29.5.6",
81+
"@types/jest-image-snapshot": "^6.2.2",
82+
"@types/node": "^20.8.7",
83+
"@typescript-eslint/eslint-plugin": "^6.8.0",
84+
"@typescript-eslint/parser": "^6.8.0",
8585
"@yarnpkg/sdks": "^2.7.1",
8686
"canvas": "^2.11.2",
8787
"canvas-5-polyfill": "^0.1.5",
@@ -93,15 +93,15 @@
9393
"eslint-plugin-flowtype": "^8.0.3",
9494
"eslint-plugin-import": "^2.28.1",
9595
"eslint-plugin-jsx-a11y": "^6.7.1",
96-
"eslint-plugin-prettier": "^5.0.0",
96+
"eslint-plugin-prettier": "^5.0.1",
9797
"eslint-plugin-react": "^7.33.2",
9898
"eslint-plugin-react-hooks": "^4.6.0",
9999
"jest": "^29.7.0",
100100
"jest-environment-jsdom": "^29.7.0",
101101
"jest-image-snapshot": "^6.2.0",
102102
"prettier": "^3.0.3",
103103
"rimraf": "^5.0.5",
104-
"rollup": "^4.0.2",
104+
"rollup": "^4.1.4",
105105
"rollup-plugin-cleanup": "^3.2.1",
106106
"rollup-plugin-dts": "^6.1.0",
107107
"ts-jest": "^29.1.1",
@@ -110,7 +110,7 @@
110110
"typedoc-plugin-markdown": "^4.0.0-next.16",
111111
"typedoc-vitepress-theme": "^1.0.0-next.3",
112112
"typescript": "^5.2.2",
113-
"vitepress": "^1.0.0-rc.20",
113+
"vitepress": "^1.0.0-rc.22",
114114
"vue": "^3.3.4",
115115
"vue-chartjs": "^5.2.0"
116116
},

src/data.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ export interface IBaseOptions {
135135
* @default 7
136136
*/
137137
quantiles?: QuantileMethod;
138+
139+
/**
140+
* the method to compute the whiskers.
141+
*
142+
* 'nearest': with this mode computed whisker values will be replaced with nearest real data points
143+
* 'exact': with this mode exact computed whisker values will be displayed on chart
144+
* @default 'nearest'
145+
*/
146+
whiskersMode?: 'nearest' | 'exact';
138147
}
139148

140149
export type IBoxplotOptions = IBaseOptions;
@@ -150,9 +159,10 @@ export interface IViolinOptions extends IBaseOptions {
150159
/**
151160
* @hidden
152161
*/
153-
export const defaultStatsOptions = {
162+
export const defaultStatsOptions: Required<Omit<IBaseOptions, 'minStats' | 'maxStats'>> = {
154163
coef: 1.5,
155164
quantiles: 7,
165+
whiskersMode: 'nearest',
156166
};
157167

158168
function determineQuantiles(q: QuantileMethod) {
@@ -177,9 +187,14 @@ function determineStatsOptions(options?: IBaseOptions) {
177187
const coef = options == null || typeof options.coef !== 'number' ? defaultStatsOptions.coef : options.coef;
178188
const q = options == null || options.quantiles == null ? quantilesType7 : options.quantiles;
179189
const quantiles = determineQuantiles(q);
190+
const whiskersMode =
191+
options == null || typeof options.whiskersMode !== 'string'
192+
? defaultStatsOptions.whiskersMode
193+
: options.whiskersMode;
180194
return {
181195
coef,
182196
quantiles,
197+
whiskersMode,
183198
};
184199
}
185200

0 commit comments

Comments
 (0)