GithubHelp home page GithubHelp logo

Comments (5)

xiaohuoni avatar xiaohuoni commented on July 19, 2024
const chartRef = useRef<ChartProp>(null);

from ant-design-charts.

zhangyu1818 avatar zhangyu1818 commented on July 19, 2024
const chartRef = useRef<ChartProp>(null);

ChartProp是哪里导出的呢,我只找到了图表的xxxConfig

from ant-design-charts.

lxfu1 avatar lxfu1 commented on July 19, 2024

chartRef 就是 React 的ref , 参考: https://charts.ant.design/guide#%E8%8E%B7%E5%8F%96-chart-%E5%AE%9E%E4%BE%8B

from ant-design-charts.

zhangyu1818 avatar zhangyu1818 commented on July 19, 2024

chartRef 就是 React 的ref , 参考: https://charts.ant.design/guide#%E8%8E%B7%E5%8F%96-chart-%E5%AE%9E%E4%BE%8B

  const statisticsPlot = useRef();
  statisticsPlot.current?.changeData(statistics);
  // TS2339: Property 'changeData' does not exist on type 'never'.

我在ant design pro里使用,如果不标识useRef的类型不是会报错吗
想知道有没有类似userRef<G2plotBar>()这样的定义,现在我是用infer取的config里的chartRef定义

from ant-design-charts.

xiaohuoni avatar xiaohuoni commented on July 19, 2024
const chartRef = useRef<ChartProp>(null);

ChartProp是哪里导出的呢,我只找到了图表的xxxConfig

AreaConfig 就是 Prop 直接应该没有问题,我写的只是伪代码

from ant-design-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.