-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
311 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+710 Bytes
(110%)
...st/components/area/__image_snapshots__/area-test-tsx-面积图-基础面积图-基础面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+798 Bytes
(110%)
...t/components/area/__image_snapshots__/area-test-tsx-面积图-基础面积图-带负值面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+587 Bytes
(100%)
...ents/area/__image_snapshots__/area-test-tsx-面积图-基础面积图-带负值面积图-x基线不为-0-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.34 KB
(110%)
.../components/area/__image_snapshots__/area-test-tsx-面积图-基础面积图-渐变填充面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.28 KB
(110%)
...components/area/__image_snapshots__/area-test-tsx-面积图-层叠面积图-区域图-存在空值-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.54 KB
(91%)
...st/components/area/__image_snapshots__/area-test-tsx-面积图-层叠面积图-层叠面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-227 Bytes
(98%)
...components/area/__image_snapshots__/area-test-tsx-面积图-层叠面积图-百分比层叠面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.5 KB
(89%)
...st/components/axis/__image_snapshots__/axis-test-tsx-axis-轴-label-回调-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.68 KB
(88%)
.../components/axis/__image_snapshots__/axis-test-tsx-axis-轴-label-回调参数-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.32 KB
...components/geometry/__image_snapshots__/adjust-test-tsx-adjust-dodge-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9 KB
.../geometry/__image_snapshots__/attr-test-tsx-geometry-attr-数据更新后也更新值域-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.49 KB
...geometry/__image_snapshots__/index-test-tsx-geometry-geometry-update-3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+835 Bytes
(110%)
...components/guide/__image_snapshots__/guide-test-tsx-guide-image-text-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+871 Bytes
(110%)
.../test/components/guide/__image_snapshots__/guide-test-tsx-guide-line-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+825 Bytes
(110%)
...test/components/guide/__image_snapshots__/guide-test-tsx-guide-point-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+863 Bytes
(110%)
...ents/guide/__image_snapshots__/guide-test-tsx-guide-使用min、max、median-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+897 Bytes
(110%)
...mponents/guide/__image_snapshots__/guide-test-tsx-guide-使用百分比字符串代表位置-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13 KB
...mponents/guide/__image_snapshots__/guide-test-tsx-guide-使用百分比字符串代表位置-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.1 KB
...components/guide/__image_snapshots__/guide-test-tsx-面积图-基础面积图-带负值面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.4 KB
...ts/guide/__image_snapshots__/guide-test-tsx-面积图-基础面积图-带负值面积图-x基线不为-0-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.1 KB
...omponents/guide/__image_snapshots__/guide-test-tsx-面积图-基础面积图-渐变填充面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.5 KB
...mponents/guide/__image_snapshots__/guide-test-tsx-面积图-层叠面积图-区域图-存在空值-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
.../components/guide/__image_snapshots__/guide-test-tsx-面积图-层叠面积图-层叠面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.7 KB
...mponents/guide/__image_snapshots__/guide-test-tsx-面积图-层叠面积图-百分比层叠面积图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9 KB
...components/interval/example/__image_snapshots__/pie-test-tsx-饼图-基础饼图-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+880 Bytes
(110%)
...est/components/line/__image_snapshots__/line-test-tsx-折线图-其他折线图-存在空值-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+645 Bytes
(110%)
...t/components/line/__image_snapshots__/line-test-tsx-折线图-其他折线图-连接空值数据-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-3.99 KB
(76%)
...st/components/line/__image_snapshots__/line-test-tsx-折线图-基础折线图-基础折线图-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+474 Bytes
(100%)
.../test/components/line/__image_snapshots__/line-test-tsx-折线图-基础折线图-带点-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+623 Bytes
(100%)
.../test/components/line/__image_snapshots__/line-test-tsx-折线图-基础折线图-曲线-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-2.41 KB
(86%)
...est/components/line/__image_snapshots__/line-test-tsx-折线图-对比折线图-折线锚点-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-250 Bytes
(98%)
...st/components/line/__image_snapshots__/line-test-tsx-折线图-对比折线图-虚实线对比-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+322 Bytes
(100%)
.../components/line/__image_snapshots__/radar-test-tsx-雷达图-面积雷达图-面积雷达图图-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+3 Bytes
(100%)
...ts/tooltip/__image_snapshots__/tooltip-test-tsx-tooltip-tooltip-默认展示-1-snap.png
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { jsx, Component, Canvas, Chart, Line, Axis } from '@antv/f2'; | ||
|
||
const context = document.getElementById('container').getContext('2d'); | ||
|
||
const data = [ | ||
{ | ||
time: new Date().getTime(), | ||
value: 12, | ||
}, | ||
]; | ||
|
||
// 添加数据,模拟数据,可以指定当前时间的偏移的秒 | ||
function getRecord() { | ||
return { | ||
time: new Date().getTime(), | ||
value: Math.random() * 2 + 10, | ||
}; | ||
} | ||
|
||
class DynamicLine extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
data, | ||
}; | ||
} | ||
|
||
didMount() { | ||
setInterval(() => { | ||
const { data } = this.state; | ||
const newData = [].concat(data); | ||
newData.push(getRecord()); | ||
this.setState({ data: newData }); | ||
}, 1000); | ||
} | ||
|
||
render() { | ||
const { data } = this.state; | ||
return ( | ||
<Chart | ||
data={data} | ||
scale={{ | ||
value: { | ||
min: 0, | ||
}, | ||
}} | ||
> | ||
<Axis field="value" /> | ||
<Axis field="time" type="timeCat" tickCount={5} mask="mm:ss" /> | ||
<Line x="time" y="value" /> | ||
</Chart> | ||
); | ||
} | ||
} | ||
const { props } = ( | ||
<Canvas context={context} pixelRatio={window.devicePixelRatio}> | ||
<DynamicLine /> | ||
</Canvas> | ||
); | ||
|
||
const canvas = new Canvas(props); | ||
canvas.render(); |
Oops, something went wrong.