Skip to content

Commit

Permalink
Merge pull request #71 from sgratzl/sgratzl/hidden
Browse files Browse the repository at this point in the history
fix: internal to hidden
  • Loading branch information
sgratzl authored Jul 13, 2023
2 parents d1f9d46 + b8d6edf commit bec8063
Show file tree
Hide file tree
Showing 8 changed files with 702 additions and 693 deletions.
14 changes: 7 additions & 7 deletions src/controllers/BarWithErrorBarsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ import patchController from './patchController';

export class BarWithErrorBarsController extends BarController {
/**
* @internal
* @hidden
*/
getMinMax(scale: Scale, canStack: boolean): { min: number; max: number } {
return getMinMax(scale, (patchedScale) => super.getMinMax(patchedScale, canStack));
}

/**
* @internal
* @hidden
*/
protected parsePrimitiveData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
const parsed = super.parsePrimitiveData(meta, data, start, count);
Expand All @@ -49,7 +49,7 @@ export class BarWithErrorBarsController extends BarController {
}

/**
* @internal
* @hidden
*/
protected parseObjectData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
const parsed = super.parseObjectData(meta, data, start, count);
Expand All @@ -71,7 +71,7 @@ export class BarWithErrorBarsController extends BarController {
}

/**
* @internal
* @hidden
*/
updateElement(
element: Element,
Expand All @@ -95,7 +95,7 @@ export class BarWithErrorBarsController extends BarController {
static readonly id = 'barWithErrorBars';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ merge({}, [
BarController.defaults,
Expand All @@ -106,7 +106,7 @@ export class BarWithErrorBarsController extends BarController {
]);

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ merge({}, [
(BarController as any).overrides,
Expand All @@ -122,7 +122,7 @@ export class BarWithErrorBarsController extends BarController {
]);

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = BarController.defaultRoutes;
}
Expand Down
20 changes: 10 additions & 10 deletions src/controllers/LineWithErrorBarsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ const NUMERIC_SCALE_TYPES = ['linear', 'logarithmic', 'time', 'timeseries'];

export class LineWithErrorBarsController extends LineController {
/**
* @internal
* @hidden
*/
getMinMax(scale: Scale, canStack: boolean): { min: number; max: number } {
return getMinMax(scale, (patchedScale) => super.getMinMax(patchedScale, canStack));
}

/**
* @internal
* @hidden
*/
protected parsePrimitiveData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
const parsed = super.parsePrimitiveData(meta, data, start, count);
Expand All @@ -51,7 +51,7 @@ export class LineWithErrorBarsController extends LineController {
}

/**
* @internal
* @hidden
*/
protected parseObjectData(meta: ChartMeta, data: any[], start: number, count: number): Record<string, unknown>[] {
const parsed = super.parseObjectData(meta, data, start, count);
Expand All @@ -60,7 +60,7 @@ export class LineWithErrorBarsController extends LineController {
}

/**
* @internal
* @hidden
*/
private parseErrorData(
parsed: Record<string, unknown>[],
Expand All @@ -82,7 +82,7 @@ export class LineWithErrorBarsController extends LineController {
}

/**
* @internal
* @hidden
*/
updateElement(
element: Element,
Expand All @@ -98,7 +98,7 @@ export class LineWithErrorBarsController extends LineController {
}

/**
* @internal
* @hidden
*/
protected updateElementScale(index: number, properties: Record<string, unknown>, mode: UpdateMode): void {
// inject the other error bar related properties
Expand All @@ -124,7 +124,7 @@ export class LineWithErrorBarsController extends LineController {
}

/**
* @internal
* @hidden
*/
updateElements(points: Element[], start: number, count: number, mode: UpdateMode) {
const reset = mode === 'reset';
Expand All @@ -149,7 +149,7 @@ export class LineWithErrorBarsController extends LineController {
static readonly id = 'lineWithErrorBars';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ merge({}, [
LineController.defaults,
Expand All @@ -160,7 +160,7 @@ export class LineWithErrorBarsController extends LineController {
]);

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ merge({}, [
(LineController as any).overrides,
Expand All @@ -176,7 +176,7 @@ export class LineWithErrorBarsController extends LineController {
]);

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = LineController.defaultRoutes;
}
Expand Down
16 changes: 8 additions & 8 deletions src/controllers/PolarAreaWithErrorBarsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import patchController from './patchController';

export class PolarAreaWithErrorBarsController extends PolarAreaController {
/**
* @internal
* @hidden
*/
getMinMaxImpl(scale: Scale) {
// new version doesn't use scale.axis wrongly
Expand All @@ -50,14 +50,14 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
}

/**
* @internal
* @hidden
*/
getMinMax(scale: Scale): { min: number; max: number } {
return getMinMax(scale, (patchedScale) => this.getMinMaxImpl(patchedScale));
}

/**
* @internal
* @hidden
*/
countVisibleElements(): number {
const meta = this._cachedMeta;
Expand Down Expand Up @@ -120,7 +120,7 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
}

/**
* @internal
* @hidden
*/
updateElement(
element: Element,
Expand All @@ -141,7 +141,7 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
}

/**
* @internal
* @hidden
*/
updateElements(arcs: Element[], start: number, count: number, mode: UpdateMode): void {
const scale = this.chart.scales.r as RadialLinearScale;
Expand All @@ -159,7 +159,7 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
static readonly id = 'polarAreaWithErrorBars';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ merge({}, [
PolarAreaController.defaults,
Expand All @@ -170,7 +170,7 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
]);

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ merge({}, [
(PolarAreaController as any).overrides,
Expand All @@ -186,7 +186,7 @@ export class PolarAreaWithErrorBarsController extends PolarAreaController {
]);

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = PolarAreaController.defaultRoutes;
}
Expand Down
12 changes: 6 additions & 6 deletions src/controllers/ScatterWithErrorBarsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import patchController from './patchController';

export class ScatterWithErrorBarsController extends ScatterController {
/**
* @internal
* @hidden
*/
getMinMax(scale: Scale, canStack: boolean): { min: number; max: number } {
return getMinMax(scale, (patchedScale) => super.getMinMax(patchedScale, canStack));
Expand Down Expand Up @@ -58,7 +58,7 @@ export class ScatterWithErrorBarsController extends ScatterController {
}

/**
* @internal
* @hidden
*/
updateElement(
element: Element,
Expand Down Expand Up @@ -92,7 +92,7 @@ export class ScatterWithErrorBarsController extends ScatterController {
}

/**
* @internal
* @hidden
*/
updateElements(points: Element[], start: number, count: number, mode: UpdateMode) {
const reset = mode === 'reset';
Expand All @@ -117,7 +117,7 @@ export class ScatterWithErrorBarsController extends ScatterController {
static readonly id = 'scatterWithErrorBars';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ merge({}, [
ScatterController.defaults,
Expand All @@ -128,7 +128,7 @@ export class ScatterWithErrorBarsController extends ScatterController {
]);

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ merge({}, [
(ScatterController as any).overrides,
Expand All @@ -144,7 +144,7 @@ export class ScatterWithErrorBarsController extends ScatterController {
]);

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = LineController.defaultRoutes;
}
Expand Down
8 changes: 4 additions & 4 deletions src/elements/ArcWithErrorBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { renderErrorBarArc, errorBarDefaults, errorBarDescriptors, IErrorBarOpti

export default class ArcWithErrorBar extends ArcElement {
/**
* @internal
* @hidden
*/
draw(ctx: CanvasRenderingContext2D): void {
super.draw(ctx);
Expand All @@ -21,17 +21,17 @@ export default class ArcWithErrorBar extends ArcElement {
static readonly id = 'arcWithErrorBar';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ { ...ArcElement.defaults, ...errorBarDefaults };

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = ArcElement.defaultRoutes;

/**
* @internal
* @hidden
*/
static readonly descriptors = errorBarDescriptors;
}
Expand Down
8 changes: 4 additions & 4 deletions src/elements/BarWithErrorBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { renderErrorBar, errorBarDefaults, errorBarDescriptors, IErrorBarOptions

export default class BarWithErrorBar extends BarElement {
/**
* @internal
* @hidden
*/
draw(ctx: CanvasRenderingContext2D): void {
super.draw(ctx);
Expand All @@ -21,17 +21,17 @@ export default class BarWithErrorBar extends BarElement {
static readonly id = 'barWithErrorBar';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ { ...BarElement.defaults, ...errorBarDefaults };

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = BarElement.defaultRoutes;

/**
* @internal
* @hidden
*/
static readonly descriptors = errorBarDescriptors;
}
Expand Down
8 changes: 4 additions & 4 deletions src/elements/PointWithErrorBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { renderErrorBar, errorBarDefaults, errorBarDescriptors, IErrorBarOptions

export default class PointWithErrorBar extends PointElement {
/**
* @internal
* @hidden
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
draw(ctx: CanvasRenderingContext2D, area?: any): void {
Expand All @@ -22,17 +22,17 @@ export default class PointWithErrorBar extends PointElement {
static readonly id = 'pointWithErrorBar';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ { ...PointElement.defaults, ...errorBarDefaults };

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = PointElement.defaultRoutes;

/**
* @internal
* @hidden
*/
static readonly descriptors = errorBarDescriptors;
}
Expand Down
Loading

0 comments on commit bec8063

Please sign in to comment.