GithubHelp home page GithubHelp logo

Comments (7)

esbullington avatar esbullington commented on July 16, 2024

This is an excellent point. We can set the viewBox and let the chart user set the parent component's width and height. That should work well.

Only possible issue is IE9+. Seems like I remember some cross-browser issues with viewBox that have made me just use resize events in the past.

Either way, I'll definitely expose it to the user.

from react-d3.

jxnblk avatar jxnblk commented on July 16, 2024

Great, thanks! 💥

At least for my use-case with internal tools, we only support Chrome and Firefox, so I could definitely use this.

from react-d3.

jmuel avatar jmuel commented on July 16, 2024

Has there been progress on this? If there hasn't is there anything I can do to help?

from react-d3.

esbullington avatar esbullington commented on July 16, 2024

Yes, it's been merged to master with the 0.3 branch, but not yet published to NPM. I've been quite sick for several weeks with a bad case of the flu, and I'm just now catching up on stuff.

Anyway, if you're using the Github repo, you can set the SVG viewBox string on any of the Cartesian-coordinate charts (ie, scatter, line, and candle charts at this point). Not well tested, so let me know if you have any problems. That would actually be a big help.

I hope to have 0.3 published to NPM in the next few days after I test out some of the new features.

from react-d3.

jmuel avatar jmuel commented on July 16, 2024

Thanks. I'll probably wait for the npm release but if I get bored I'll play around with the current branch.

from react-d3.

yang-wei avatar yang-wei commented on July 16, 2024

@jmuel We forget to refer to this issue when we solved this. But I suppose https://github.com/esbullington/react-d3/blob/master/src%2Fcommon%2Fcharts%2FBasicChart.jsx#L11

from react-d3.

jmuel avatar jmuel commented on July 16, 2024

Thanks, that looks like it should do it.

from react-d3.

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.