Skip to content

Commit

Permalink
Merge pull request #35 from sgratzl/release/v4.2.3
Browse files Browse the repository at this point in the history
Release v4.2.3
  • Loading branch information
sgratzl authored Jul 13, 2023
2 parents 0239d3d + e98f36c commit bc57fb7
Show file tree
Hide file tree
Showing 7 changed files with 668 additions and 658 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chartjs-chart-pcp",
"description": "Chart.js module for charting parallel coordinate plots",
"version": "4.2.2",
"version": "4.2.3",
"author": {
"name": "Samuel Gratzl",
"email": "[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/LogarithmicParallelCoordinatesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export class LogarithmicParallelCoordinatesController extends ParallelCoordinate
static readonly id = 'logarithmicPcp';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ {
...ParallelCoordinatesController.defaults,
datasetElementType: LogarithmicAxis.id,
};

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ ParallelCoordinatesController.overrides;
}
Expand Down
30 changes: 15 additions & 15 deletions src/controllers/ParallelCoordinatesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ export class ParallelCoordinatesController extends DatasetController<
LinearAxis & Element<AnyObject, AnyObject>
> {
/**
* @internal
* @hidden
*/
declare datasetElementType: ChartComponent;

/**
* @internal
* @hidden
*/
declare dataElementType: ChartComponent;

private declare _type: string;

/**
* @internal
* @hidden
*/
initialize(): void {
super.initialize();
this.enableOptionSharing = true;
}

/**
* @internal
* @hidden
*/
linkScales(): void {
const ds = this.getDataset() as any;
Expand All @@ -68,7 +68,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
addElements(): void {
super.addElements();
Expand All @@ -90,7 +90,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
update(mode: UpdateMode): void {
// from front to back
Expand All @@ -112,7 +112,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
draw(): void {
// from back to front
Expand All @@ -136,7 +136,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
updateAxis(axis: LinearAxis & Element<AnyObject, AnyObject>, mode: UpdateMode): void {
const meta = this._cachedMeta;
Expand All @@ -158,7 +158,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
updateElements(
rectangles: (LineSegment & Element<AnyObject, AnyObject>)[],
Expand Down Expand Up @@ -232,7 +232,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
removeBaseHoverStyle(
element: LineSegment & Element<AnyObject, AnyObject>,
Expand All @@ -243,7 +243,7 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
removeHoverStyle(element: LineSegment & Element<AnyObject, AnyObject>, datasetIndex: number, index: number): void {
super.removeHoverStyle(element, datasetIndex, index);
Expand All @@ -257,14 +257,14 @@ export class ParallelCoordinatesController extends DatasetController<
}

/**
* @internal
* @hidden
*/
setBaseHoverStyle(element: LineSegment & Element<AnyObject, AnyObject>, datasetIndex: number, index: number): void {
super.setHoverStyle(element, datasetIndex, index);
}

/**
* @internal
* @hidden
*/
setHoverStyle(element: LineSegment & Element<AnyObject, AnyObject>, datasetIndex: number, index: number): void {
super.setHoverStyle(element, datasetIndex, index);
Expand All @@ -280,7 +280,7 @@ export class ParallelCoordinatesController extends DatasetController<
static readonly id: string = 'pcp';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ {
datasetElementType: LinearAxis.id,
Expand All @@ -294,7 +294,7 @@ export class ParallelCoordinatesController extends DatasetController<
};

/**
* @internal
* @hidden
*/
static readonly overrides: any = /* #__PURE__ */ {
scales: {
Expand Down
20 changes: 10 additions & 10 deletions src/elements/LineSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface ILineSegmentProps {

export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSegmentOptions & AnyObject> {
/**
* @internal
* @hidden
*/
// eslint-disable-next-line class-methods-use-this
_getLineParts(props: Pick<ILineSegmentProps, 'x' | 'y' | 'x1' | 'y1'>): { d: number; k: number } {
Expand All @@ -33,7 +33,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
inRange(mouseX: number, mouseY: number, useFinalPosition: boolean): boolean {
const props = this.getProps(['x', 'x1', 'y', 'y1'], useFinalPosition) as unknown as ILineSegmentProps;
Expand All @@ -51,7 +51,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
tooltipPosition(useFinalPosition: boolean): { x: number; y: number; padding: number } {
const props = this.getProps(['x', 'x1', 'y', 'y1'], useFinalPosition) as unknown as ILineSegmentProps;
Expand All @@ -63,7 +63,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
getCenterPoint(useFinalPosition: boolean): { x: number; y: number } {
const props = this.getProps(['x', 'x1', 'y', 'y1'], useFinalPosition) as unknown as ILineSegmentProps;
Expand All @@ -74,7 +74,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
inXRange(mouseX: number, useFinalPosition: boolean): boolean {
const props = this.getProps(['x', 'x1'], useFinalPosition) as unknown as ILineSegmentProps;
Expand All @@ -83,7 +83,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
inYRange(mouseY: number, useFinalPosition: boolean): boolean {
const props = this.getProps(['y', 'y1'], useFinalPosition) as unknown as ILineSegmentProps;
Expand All @@ -92,7 +92,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
}

/**
* @internal
* @hidden
*/
draw(ctx: CanvasRenderingContext2D): void {
const props = this.getProps([
Expand Down Expand Up @@ -133,7 +133,7 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
static readonly id = 'lineSegment';

/**
* @internal
* @hidden
*/
static readonly defaults = /* #__PURE__ */ {
...LineElement.defaults,
Expand All @@ -144,12 +144,12 @@ export class LineSegment extends Element<ILineSegmentProps & AnyObject, ILineSeg
};

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

/**
* @internal
* @hidden
*/
static readonly descriptors = (LineElement as any).descriptors;
}
Expand Down
10 changes: 5 additions & 5 deletions src/elements/LinearAxis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ export class LogarithmicAxis extends LogarithmicScale<ILogarithmicAxisOptions> {
static readonly id = 'logarithmicAxis';

/**
* @internal
* @hidden
*/
static readonly defaults: any = /* #__PURE__ */ merge({}, [defaults.scale, LogarithmicScale.defaults, scaleDefaults]);

/**
* @internal
* @hidden
*/
static readonly descriptors = /* #__PURE__ */ LinearAxis.descriptors;

Expand All @@ -134,22 +134,22 @@ export class LogarithmicAxis extends LogarithmicScale<ILogarithmicAxisOptions> {
}

/**
* @internal
* @hidden
*/
// eslint-disable-next-line class-methods-use-this
_computeLabelArea(): void {
return undefined;
}

/**
* @internal
* @hidden
*/
update(): number {
return LinearAxis.prototype.update.call(this);
}

/**
* @internal
* @hidden
*/
draw(c: unknown): void {
return LinearAxis.prototype.draw.call(this, c);
Expand Down
2 changes: 1 addition & 1 deletion src/scales/PCPScale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class PCPScale extends CategoryScale {
static readonly id = 'pcp';

/**
* @internal
* @hidden
*/
static readonly defaults = CategoryScale.defaults;
}
Expand Down
Loading

0 comments on commit bc57fb7

Please sign in to comment.