GithubHelp home page GithubHelp logo

Comments (2)

esbullington avatar esbullington commented on August 15, 2024

Thanks for your comment.

Yes, this type of use case is exactly what I had in mind when I spoke of a second chart API using the DataSeries components that are now internal to multiple chart types. I'll export all the chart components before 0.2.0, including the DataSeries. And then you can use them exactly as they're now used internally to compose the core chart types. I'm also taking care to expose all the important variables inside each component as props, so you'll be able to access them, change them, and (in some cases) style them as you wish.

This is the beauty of React components.

The other way you can style these charts is to use CSS, including nth-child for selecting elements by index. If you see an SVG element that you'd like to style, and it doesn't have a hook, please feel free to submit an issue or PR adding a class to that element. I realize CSS won't hit 100% of use cases, but it should cover most of them.

At this time, I'd prefer not to add any additional complexity to the core chart components, since those are the ones that end users who just need a quick chart will use. So your option number 1) is not possible (plus, as you say, we'd fall deeper into overlapping concerns). If you're not happy with how much you can customize the charts once all their internal components are exported, and with CSS, then perhaps we could revisit the possibility of something akin to your proposal option 2) sometime after 0.3.

If you need this feature right now and CSS doesn't work, then I suggest forking the repo and adapting the piechart component to your needs directly.

from react-d3.

berrytj avatar berrytj commented on August 15, 2024

Okay, that makes sense. CSS is good enough. Thanks.

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.