Commit d7b4f800 authored by Yun Chen's avatar Yun Chen Committed by 陈帅

[BugFix] Fix chart data type and requirement

By watching TimelineChart Example:
[Charts Demo](https://pro.ant.design/components/Charts#scaffold-src-components-Charts-demo-mini-area)

```javascript
const chartData = [];
for (let i = 0; i < 20; i += 1) {
  chartData.push({
    x: (new Date().getTime()) + (1000 * 60 * 30 * i),
    y1: Math.floor(Math.random() * 100) + 1000,
    y2: Math.floor(Math.random() * 100) + 10,
  });
}
```

1. X-Axis (Timeline): The type should be like `number`.
2. Y-Axis (Value): The y2 may not be required if I just want to draw y1 only.
parent 53b49177
import * as React from 'react'; import * as React from 'react';
export interface ITimelineChartProps { export interface ITimelineChartProps {
data: Array<{ data: Array<{
x: string; x: number;
y1: string; y1: number;
y2: string; y2?: number;
}>; }>;
titleMap: { y1: string; y2: string }; titleMap: { y1: string; y2?: string };
padding?: [number, number, number, number]; padding?: [number, number, number, number];
height?: number; height?: number;
style?: React.CSSProperties; style?: React.CSSProperties;
......
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