Skip to content

Commit 3b07c66

Browse files
authored
Merge pull request #80 from sgratzl/release/v4.2.4
Release v4.2.4
2 parents 96a92b2 + b0de682 commit 3b07c66

File tree

10 files changed

+724
-715
lines changed

10 files changed

+724
-715
lines changed

package.json

Lines changed: 1 addition & 1 deletion
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.3",
4+
"version": "4.2.4",
55
"publishConfig": {
66
"access": "public"
77
},

src/controllers/BoxPlotController.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ import { boxOptionsKeys } from '../elements/BoxAndWiskers';
2121

2222
export class BoxPlotController extends StatsBase<IBoxPlot, Required<IBoxplotOptions>> {
2323
/**
24-
* @internal
24+
* @hidden
2525
*/
2626
// eslint-disable-next-line class-methods-use-this
2727
protected _parseStats(value: unknown, config: IBoxplotOptions): IBoxPlot | undefined {
2828
return asBoxPlotStats(value, config);
2929
}
3030

3131
/**
32-
* @internal
32+
* @hidden
3333
*/
3434
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
3535
protected _transformStats<T>(target: any, source: IBoxPlot, mapper: (v: number) => T): void {
@@ -43,7 +43,7 @@ export class BoxPlotController extends StatsBase<IBoxPlot, Required<IBoxplotOpti
4343
static readonly id = 'boxplot';
4444

4545
/**
46-
* @internal
46+
* @hidden
4747
*/
4848
static readonly defaults: any = /* #__PURE__ */ merge({}, [
4949
BarController.defaults,
@@ -63,7 +63,7 @@ export class BoxPlotController extends StatsBase<IBoxPlot, Required<IBoxplotOpti
6363
]);
6464

6565
/**
66-
* @internal
66+
* @hidden
6767
*/
6868
static readonly overrides: any = /* #__PURE__ */ merge({}, [(BarController as any).overrides, defaultOverrides()]);
6969
}

src/controllers/StatsBase.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { interpolateNumberArray } from '../animation';
44
import { outlierPositioner, patchInHoveredOutlier } from '../tooltip';
55
import { defaultStatsOptions, IBaseOptions, IBaseStats } from '../data';
66
/**
7-
* @internal
7+
* @hidden
88
*/
99
export /* #__PURE__ */ function baseDefaults(keys: string[]): Record<string, unknown> {
1010
const colorKeys = ['borderColor', 'backgroundColor'].concat(keys.filter((c) => c.endsWith('Color')));
@@ -60,12 +60,12 @@ export function defaultOverrides(): Record<string, unknown> {
6060

6161
export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOptions>> extends BarController {
6262
/**
63-
* @internal
63+
* @hidden
6464
*/
6565
declare options: C;
6666

6767
/**
68-
* @internal
68+
* @hidden
6969
*/
7070
// eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
7171
protected _transformStats<T>(target: any, source: S, mapper: (v: number) => T): void {
@@ -85,7 +85,7 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
8585
}
8686

8787
/**
88-
* @internal
88+
* @hidden
8989
*/
9090
getMinMax(scale: Scale, canStack?: boolean | undefined): { min: number; max: number } {
9191
const bak = scale.axis;
@@ -102,7 +102,7 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
102102
}
103103

104104
/**
105-
* @internal
105+
* @hidden
106106
*/
107107
parsePrimitiveData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
108108
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -126,26 +126,26 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
126126
}
127127

128128
/**
129-
* @internal
129+
* @hidden
130130
*/
131131
parseArrayData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
132132
return this.parsePrimitiveData(meta, data, start, count);
133133
}
134134

135135
/**
136-
* @internal
136+
* @hidden
137137
*/
138138
parseObjectData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
139139
return this.parsePrimitiveData(meta, data, start, count);
140140
}
141141

142142
/**
143-
* @internal
143+
* @hidden
144144
*/
145145
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
146146
protected abstract _parseStats(value: any, options: C): S | undefined;
147147
/**
148-
* @internal
148+
* @hidden
149149
*/
150150
getLabelAndValue(index: number): { label: string; value: string & { raw: S; hoveredOutlierIndex: number } & S } {
151151
const r = super.getLabelAndValue(index) as any;
@@ -172,7 +172,7 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
172172
}
173173

174174
/**
175-
* @internal
175+
* @hidden
176176
*/
177177
// eslint-disable-next-line class-methods-use-this
178178
protected _toStringStats(b: S): string {
@@ -184,7 +184,7 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
184184
}
185185

186186
/**
187-
* @internal
187+
* @hidden
188188
*/
189189
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
190190
updateElement(rectangle: Element, index: number, properties: any, mode: UpdateMode): void {

src/controllers/ViolinController.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ import patchController from './patchController';
2222

2323
export class ViolinController extends StatsBase<IViolin, Required<IViolinOptions>> {
2424
/**
25-
* @internal
25+
* @hidden
2626
*/
2727
// eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
2828
protected _parseStats(value: any, config: IViolinOptions): IViolin | undefined {
2929
return asViolinStats(value, config);
3030
}
3131

3232
/**
33-
* @internal
33+
* @hidden
3434
*/
3535
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
3636
protected _transformStats<T>(target: any, source: IViolin, mapper: (v: number) => T): void {
@@ -46,7 +46,7 @@ export class ViolinController extends StatsBase<IViolin, Required<IViolinOptions
4646
static readonly id = 'violin';
4747

4848
/**
49-
* @internal
49+
* @hidden
5050
*/
5151
static readonly defaults: any = /* #__PURE__ */ merge({}, [
5252
BarController.defaults,
@@ -71,7 +71,7 @@ export class ViolinController extends StatsBase<IViolin, Required<IViolinOptions
7171
]);
7272

7373
/**
74-
* @internal
74+
* @hidden
7575
*/
7676
static readonly overrides: any = /* #__PURE__ */ merge({}, [(BarController as any).overrides, defaultOverrides()]);
7777
}

src/data.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export interface IViolinOptions extends IBaseOptions {
148148
}
149149

150150
/**
151-
* @internal
151+
* @hidden
152152
*/
153153
export const defaultStatsOptions = {
154154
coef: 1.5,
@@ -184,7 +184,7 @@ function determineStatsOptions(options?: IBaseOptions) {
184184
}
185185

186186
/**
187-
* @internal
187+
* @hidden
188188
*/
189189
export function boxplotStats(arr: readonly number[] | Float32Array | Float64Array, options: IBaseOptions): IBoxPlot {
190190
const vs =
@@ -221,7 +221,7 @@ function computeSamples(min: number, max: number, points: number) {
221221
}
222222

223223
/**
224-
* @internal
224+
* @hidden
225225
*/
226226
export function violinStats(arr: readonly number[], options: IViolinOptions): IViolin | undefined {
227227
// console.assert(Array.isArray(arr));
@@ -254,7 +254,7 @@ export function violinStats(arr: readonly number[], options: IViolinOptions): IV
254254
}
255255

256256
/**
257-
* @internal
257+
* @hidden
258258
*/
259259
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
260260
export function asBoxPlotStats(value: any, options: IBoxplotOptions): IBoxPlot | undefined {
@@ -284,7 +284,7 @@ export function asBoxPlotStats(value: any, options: IBoxplotOptions): IBoxPlot |
284284
}
285285

286286
/**
287-
* @internal
287+
* @hidden
288288
*/
289289
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
290290
export function asViolinStats(value: any, options: IViolinOptions): IViolin | undefined {
@@ -301,7 +301,7 @@ export function asViolinStats(value: any, options: IViolinOptions): IViolin | un
301301
}
302302

303303
/**
304-
* @internal
304+
* @hidden
305305
*/
306306
export function rnd(seed = Date.now()): () => number {
307307
// Adapted from http://indiegamr.com/generate-repeatable-random-numbers-in-js/

src/elements/BoxAndWiskers.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
type IStatsBaseProps,
99
} from './base';
1010
/**
11-
* @internal
11+
* @hidden
1212
*/
1313
export const boxOptionsKeys = baseOptionKeys.concat(['medianColor', 'lowerBackgroundColor']);
1414

@@ -41,7 +41,7 @@ export interface IBoxAndWhiskerProps extends IStatsBaseProps {
4141

4242
export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhiskersOptions> {
4343
/**
44-
* @internal
44+
* @hidden
4545
*/
4646
draw(ctx: CanvasRenderingContext2D): void {
4747
ctx.save();
@@ -60,7 +60,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
6060
}
6161

6262
/**
63-
* @internal
63+
* @hidden
6464
*/
6565
protected _drawBoxPlot(ctx: CanvasRenderingContext2D): void {
6666
if (this.isVertical()) {
@@ -71,7 +71,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
7171
}
7272

7373
/**
74-
* @internal
74+
* @hidden
7575
*/
7676
protected _drawBoxPlotVertical(ctx: CanvasRenderingContext2D): void {
7777
const { options } = this;
@@ -137,7 +137,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
137137
}
138138

139139
/**
140-
* @internal
140+
* @hidden
141141
*/
142142
protected _drawBoxPlotHorizontal(ctx: CanvasRenderingContext2D): void {
143143
const { options } = this;
@@ -200,7 +200,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
200200
}
201201

202202
/**
203-
* @internal
203+
* @hidden
204204
*/
205205
_getBounds(useFinalPosition?: boolean): { left: number; top: number; right: number; bottom: number } {
206206
const vert = this.isVertical();
@@ -242,7 +242,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
242242
static id = 'boxandwhiskers';
243243

244244
/**
245-
* @internal
245+
* @hidden
246246
*/
247247
static defaults = /* #__PURE__ */ {
248248
...BarElement.defaults,
@@ -252,7 +252,7 @@ export class BoxAndWiskers extends StatsBase<IBoxAndWhiskerProps, IBoxAndWhisker
252252
};
253253

254254
/**
255-
* @internal
255+
* @hidden
256256
*/
257257
static defaultRoutes = /* #__PURE__ */ { ...BarElement.defaultRoutes, ...baseRoutes };
258258
}

src/elements/Violin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface IViolinElementProps extends IStatsBaseProps {
2121

2222
export class Violin extends StatsBase<IViolinElementProps, IViolinElementOptions> {
2323
/**
24-
* @internal
24+
* @hidden
2525
*/
2626
draw(ctx: CanvasRenderingContext2D): void {
2727
ctx.save();
@@ -58,7 +58,7 @@ export class Violin extends StatsBase<IViolinElementProps, IViolinElementOptions
5858
}
5959

6060
/**
61-
* @internal
61+
* @hidden
6262
*/
6363
protected _drawCoords(
6464
ctx: CanvasRenderingContext2D,
@@ -103,7 +103,7 @@ export class Violin extends StatsBase<IViolinElementProps, IViolinElementOptions
103103
}
104104

105105
/**
106-
* @internal
106+
* @hidden
107107
*/
108108
_getBounds(useFinalPosition?: boolean): { left: number; top: number; right: number; bottom: number } {
109109
if (this.isVertical()) {
@@ -129,12 +129,12 @@ export class Violin extends StatsBase<IViolinElementProps, IViolinElementOptions
129129
static id = 'violin';
130130

131131
/**
132-
* @internal
132+
* @hidden
133133
*/
134134
static defaults = /* #__PURE__ */ { ...BarElement.defaults, ...baseDefaults };
135135

136136
/**
137-
* @internal
137+
* @hidden
138138
*/
139139
static defaultRoutes = /* #__PURE__ */ { ...BarElement.defaultRoutes, ...baseRoutes };
140140
}

0 commit comments

Comments
 (0)