Skip to content

Commit

Permalink
Merge pull request #49 from upsetjs/release/v4.2.4
Browse files Browse the repository at this point in the history
Release v4.2.4
  • Loading branch information
sgratzl authored Jul 13, 2023
2 parents a03528f + 64210a5 commit 2c3391c
Show file tree
Hide file tree
Showing 5 changed files with 651 additions and 641 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-venn",
"description": "Chart.js module for venn diagrams",
"version": "4.2.3",
"version": "4.2.4",
"author": {
"name": "Samuel Gratzl",
"email": "sam@sgratzl.com",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/EulerDiagramController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class EulerDiagramController extends VennDiagramController {
static readonly id = 'euler';

/**
* @internal
* @hidden
*/
static readonly defaults = VennDiagramController.defaults;

Expand Down
12 changes: 6 additions & 6 deletions src/controllers/VennDiagramController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export class VennDiagramController extends DatasetController<'venn', ArcSlice> {
static readonly id: string = 'venn';

/**
* @internal
* @hidden
*/
static readonly defaults = {
dataElementType: ArcSlice.id,
};

/**
* @internal
* @hidden
*/
static readonly overrides: any = {
plugins: {
Expand Down Expand Up @@ -66,15 +66,15 @@ export class VennDiagramController extends DatasetController<'venn', ArcSlice> {
};

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

/**
* @internal
* @hidden
*/
update(mode: UpdateMode): void {
super.update(mode);
Expand All @@ -89,7 +89,7 @@ export class VennDiagramController extends DatasetController<'venn', ArcSlice> {
}

/**
* @internal
* @hidden
*/
updateElements(slices: ArcSlice[], start: number, count: number, mode: UpdateMode): void {
const xScale = this._cachedMeta.xScale as Scale & { left: number; right: number };
Expand Down Expand Up @@ -133,7 +133,7 @@ export class VennDiagramController extends DatasetController<'venn', ArcSlice> {
}

/**
* @internal
* @hidden
*/
draw(): void {
const meta = this._cachedMeta;
Expand Down
18 changes: 9 additions & 9 deletions src/elements/ArcSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ export class ArcSlice extends Element<IArcSliceProps, IArcSliceOptions> implemen
static readonly id = 'arcSlice';

/**
* @internal
* @hidden
*/
static readonly defaults = /* #__PURE__ */ { ...BarElement.defaults, backgroundColor: '#efefef' };

/**
* @internal
* @hidden
*/
static readonly defaultRoutes = /* #__PURE__ */ {
borderColor: 'borderColor',
};

/**
* @internal
* @hidden
*/
inRange(mouseX: number, mouseY: number): boolean {
const props = this.getProps(['arcs', 'refs', 'sets']);
Expand Down Expand Up @@ -93,44 +93,44 @@ export class ArcSlice extends Element<IArcSliceProps, IArcSliceOptions> implemen
}

/**
* @internal
* @hidden
*/
inXRange(mouseX: number): boolean {
return this.inRange(mouseX, Number.NaN);
}

/**
* @internal
* @hidden
*/
inYRange(mouseY: number): boolean {
return this.inRange(Number.NaN, mouseY);
}

/**
* @internal
* @hidden
*/
getCenterPoint(): { x: number; y: number } {
const arc = this.getProps(['text']);
return arc.text;
}

/**
* @internal
* @hidden
*/
tooltipPosition(): { x: number; y: number } {
return this.getCenterPoint();
}

/**
* @internal
* @hidden
*/
// eslint-disable-next-line class-methods-use-this
hasValue(): boolean {
return true;
}

/**
* @internal
* @hidden
*/
draw(ctx: CanvasRenderingContext2D): void {
ctx.save();
Expand Down
Loading

0 comments on commit 2c3391c

Please sign in to comment.