diff --git a/packages/coordinates/src/MouseCoordinateX.tsx b/packages/coordinates/src/MouseCoordinateX.tsx index 9a35b5dcf..2597d8ce5 100644 --- a/packages/coordinates/src/MouseCoordinateX.tsx +++ b/packages/coordinates/src/MouseCoordinateX.tsx @@ -68,7 +68,7 @@ export class MouseCoordinateX extends React.Component { private readonly drawOnCanvas = (ctx: CanvasRenderingContext2D, moreProps) => { const props = this.helper(this.props, moreProps); if (isNotDefined(props)) { - return null; + return; } drawOnCanvas(ctx, props); diff --git a/packages/coordinates/src/MouseCoordinateY.tsx b/packages/coordinates/src/MouseCoordinateY.tsx index e085a6290..da797fce5 100644 --- a/packages/coordinates/src/MouseCoordinateY.tsx +++ b/packages/coordinates/src/MouseCoordinateY.tsx @@ -54,7 +54,7 @@ export class MouseCoordinateY extends React.Component { private readonly drawOnCanvas = (ctx: CanvasRenderingContext2D, moreProps) => { const props = this.helper(this.props, moreProps); if (isNotDefined(props)) { - return null; + return; } drawOnCanvas(ctx, props); diff --git a/packages/core/src/ChartCanvas.tsx b/packages/core/src/ChartCanvas.tsx index f5836aa16..78c9225e4 100644 --- a/packages/core/src/ChartCanvas.tsx +++ b/packages/core/src/ChartCanvas.tsx @@ -429,14 +429,12 @@ export class ChartCanvas extends React.Component { - const current = this.canvasContainerRef.current; - if (current !== null) { - return current.getCanvasContexts(); - } + return this.canvasContainerRef.current?.getCanvasContexts(); }; public generateSubscriptionId = () => { this.lastSubscriptionId++; + return this.lastSubscriptionId; }; diff --git a/packages/interactive/src/components/HoverTextNearMouse.tsx b/packages/interactive/src/components/HoverTextNearMouse.tsx index b00de63fc..6cb8340a5 100644 --- a/packages/interactive/src/components/HoverTextNearMouse.tsx +++ b/packages/interactive/src/components/HoverTextNearMouse.tsx @@ -90,6 +90,8 @@ export class HoverTextNearMouse extends React.Component ); } + + return null; }; private readonly getBgHeight = () => { diff --git a/packages/series/src/StraightLine.tsx b/packages/series/src/StraightLine.tsx index ff745191c..0aa83cc2c 100644 --- a/packages/series/src/StraightLine.tsx +++ b/packages/series/src/StraightLine.tsx @@ -11,7 +11,7 @@ interface StraightLineProps { readonly type?: "vertical" | "horizontal"; readonly strokeStyle?: string | CanvasGradient | CanvasPattern; readonly lineWidth?: number; - readonly lineDash?: strokeDashTypes | Iterable | number[]; + readonly lineDash?: strokeDashTypes | number[]; readonly yValue?: number; readonly xValue?: number; } diff --git a/packages/tooltip/src/HoverTooltip.tsx b/packages/tooltip/src/HoverTooltip.tsx index 6800c30ee..1f7235ef2 100644 --- a/packages/tooltip/src/HoverTooltip.tsx +++ b/packages/tooltip/src/HoverTooltip.tsx @@ -222,7 +222,7 @@ export class HoverTooltip extends React.Component { private readonly drawOnCanvas = (ctx: CanvasRenderingContext2D, moreProps) => { const pointer = this.helper(ctx, moreProps); if (pointer === undefined) { - return null; + return; } const { height } = moreProps;