We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import React, { useCallback, useEffect, useRef } from 'react'; import { useChartData } from './hooks'; import dayjs from 'dayjs'; import { Chart } from '@antv/g2'; const Home = () => { const chartDom = useRef(null); const chart = useRef(null); const [data, getData] = useChartData(10000); const initChart = useCallback(() => { if (chart?.current) { chart.current.changeData(data); } else { chart.current = new Chart({ container: 'main', theme: 'classic', }); chart.current .line() // 创建一个 Interval 标记 .data(data) // 绑定数据 .encode('x', 'xField') // 编码 x 通道 .encode('y', 'value'); // 编码 y 通道 chart.current .point() // 创建一个 Interval 标记 .data(data) // 绑定数据 .encode('x', 'xField') // 编码 x 通道 .encode('y', 'value'); // 渲染可视化 chart.current.render(); } }, [data]); useEffect(() => { initChart(); }, [initChart]); return ( <div> <div ref={chartDom} id="main" style={{ height: 500, width: '100%' }}></div> </div> ); };
export default Home;
npm test
The text was updated successfully, but these errors were encountered:
你好,能给给到一个复现 demo 吗
Sorry, something went wrong.
我们做一个性能报告出来,看看具体的性能极限在哪里,以及一些可行的解决方案。
长时间没有回应,关闭了。
hustcc
Aarebecca
pearmini
No branches or pull requests
export default Home;
Checklist
npm test
passesDescription of change
The text was updated successfully, but these errors were encountered: