Commit ae20a768 authored by 陈帅's avatar 陈帅

fix g2 type error

parent 23854283
...@@ -28,6 +28,9 @@ export interface MiniAreaProps { ...@@ -28,6 +28,9 @@ export interface MiniAreaProps {
}[]; }[];
} }
// g2 4.0 发布之前只能这样先修一下了
const FixTypeAxis: any = Axis;
const MiniArea: React.FC<MiniAreaProps> = props => { const MiniArea: React.FC<MiniAreaProps> = props => {
const { const {
height = 1, height = 1,
...@@ -79,22 +82,22 @@ const MiniArea: React.FC<MiniAreaProps> = props => { ...@@ -79,22 +82,22 @@ const MiniArea: React.FC<MiniAreaProps> = props => {
data={data} data={data}
padding={padding} padding={padding}
> >
<Axis <FixTypeAxis
key="axis-x" key="axis-x"
name="x" name="x"
label={undefined} label={false}
line={undefined} line={false}
tickLine={undefined} tickLine={false}
grid={undefined} grid={false}
{...xAxis} {...xAxis}
/> />
<Axis <FixTypeAxis
key="axis-y" key="axis-y"
name="y" name="y"
label={undefined} label={false}
line={undefined} line={false}
tickLine={undefined} tickLine={false}
grid={undefined} grid={false}
{...yAxis} {...yAxis}
/> />
<Tooltip showTitle={false} crosshairs={false} /> <Tooltip showTitle={false} crosshairs={false} />
......
...@@ -27,6 +27,8 @@ export interface MiniAreaProps { ...@@ -27,6 +27,8 @@ export interface MiniAreaProps {
y: number; y: number;
}[]; }[];
} }
// g2 4.0 发布之前只能这样先修一下了
const FixTypeAxis: any = Axis;
const MiniArea: React.FC<MiniAreaProps> = props => { const MiniArea: React.FC<MiniAreaProps> = props => {
const { const {
...@@ -79,22 +81,22 @@ const MiniArea: React.FC<MiniAreaProps> = props => { ...@@ -79,22 +81,22 @@ const MiniArea: React.FC<MiniAreaProps> = props => {
data={data} data={data}
padding={padding} padding={padding}
> >
<Axis <FixTypeAxis
key="axis-x" key="axis-x"
name="x" name="x"
label={null} label={false}
line={null} line={false}
tickLine={null} tickLine={false}
grid={null} grid={false}
{...xAxis} {...xAxis}
/> />
<Axis <FixTypeAxis
key="axis-y" key="axis-y"
name="y" name="y"
label={null} label={false}
line={null} line={false}
tickLine={null} tickLine={false}
grid={null} grid={false}
{...yAxis} {...yAxis}
/> />
<Tooltip showTitle={false} crosshairs={false} /> <Tooltip showTitle={false} crosshairs={false} />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment