question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query: Can this be used with ReactJS?

See original GitHub issue

I tried to use the import , which seems to work but i am having difficulty displaying the data

I tried to use the following in componentDidMount()

const data = [
      ['Inquiries', 5000],
      ['Applicants', 2500],
      ['Admits', 500],
      ['Deposits', 200],
  ];
  const options = {
      block: {
          dynamicHeight: true,
          minHeight: 15,
      },
  };

  const chart = new D3Funnel('#funnel');
  chart.draw(data, options);

But no luck, is not working. Is this have to be defined solely inside <scripts> tag?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lucaskellercommented, Feb 14, 2019

I used refs:

  constructor(props) {
    super(props)
    this.funnelRef = React.createRef()
  }
<div ref={this.funnelRef} id="funnel" style={{ height: 400 }} />
const chart = new D3Funnel(this.funnelRef.current)
chart.draw(data, options)
1reaction
15520528commented, Jul 3, 2019

I used refs:

  constructor(props) {
    super(props)
    this.funnelRef = React.createRef()
  }
<div ref={this.funnelRef} id="funnel" style={{ height: 400 }} />
const chart = new D3Funnel(this.funnelRef.current)
chart.draw(data, options)
tks you
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started with React-Query for Data Fetching and State ...
Using React Query, we can fetch, cache, and update data in React-based applications in a simple and declarative manner without mutating the ...
Read more >
React Query - A practical example. - DEV Community ‍ ‍
If you want to fetch data to be used in the app, it can be done very easily. React Query provides us the...
Read more >
Getting Started With useQuery (React Query) - Medium
React Query is a library that gives ReactJS the state management ability for ... This is a simple explanation of how we can...
Read more >
Getting started with React Query - Hasura
React Query is a data management library for React, as the name implies. It handles all the major use-cases one would expect for...
Read more >
How and Why You Should Use React Query - Bits and Pieces
Simplify data fetching with react-query's custom hooks. · Data is shared across all app instance and can be changed by other people ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found