Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: fix the issue of className miss in react-vchart\n\n",
"type": "none",
"packageName": "@visactor/vchart"
}
],
"packageName": "@visactor/vchart",
"email": "lixuef1313@163.com"
}
3 changes: 2 additions & 1 deletion packages/react-vchart/src/charts/BaseChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export interface BaseChartProps
DimensionEventProps,
HierarchyEventProps,
ChartLifeCycleEventProps,
IReactTooltipProps {
IReactTooltipProps,
ContainerProps {
vchartConstructor?: IVChartConstructor;
/** @deprecated 请使用 vchartConstructor */
vchartConstrouctor?: IVChartConstructor;
Expand Down
5 changes: 3 additions & 2 deletions packages/react-vchart/src/containers/withContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { StringOrNumber } from '@visactor/vchart';
import React, { useRef, useState, useLayoutEffect } from 'react';

export interface ContainerProps {
style?: React.CSSProperties;
className?: string;
width?: number | string;
height?: number | string;
id?: string;
id?: StringOrNumber;
}

export default function withContainer<P extends ContainerProps>(
Expand All @@ -25,7 +26,7 @@ export default function withContainer<P extends ContainerProps>(
return (
<div
ref={container}
id={id}
id={id?.toString()}
className={className}
style={{
position: 'relative',
Expand Down
Loading