Comments (4)
My impression of how this might work is:
- Outside of components, get resize event.
- Set corresponding width and height of chartLayout
- Call chartLayout again on existing selection.
- The chart and related components resize.
chartLayout would need some modifications:
- In the returned chartLayout function, in selection.each, adding the structural chart elements should be done with the d3 enter update exit pattern (only appending to enter() selections).
- Need to either be able to register component instances (and the selections on which they have been called) with chartLayout. Then chartLayout can redraw the components.
- Or, the components listen for chartLayout's resize, (using d3 events?) and redraw themselves (not sure how this would work, as the components don't know which elements they have been drawn on.
This might help: http://eyeseast.github.io/visible-data/2013/08/28/responsive-charts-with-d3/
from d3fc.
Thanks @tlsim for the ideas. I must admits is beyond my personal D3 capabilities. It's a tricky topic, so perhaps worth discussing on Friday? I'd love to know who this works!
from d3fc.
Definitely worth discussing (unfortunately I'm not here tomorrow), and will probably take a while to get right, but the prospect of getting responsive and zoomable charts for free by using our components is exciting!
from d3fc.
See #188
from d3fc.
Related Issues (20)
- Nextjs transpilation error. HOT 4
- Solved! Zoom / Pan a streaming chart with code example HOT 1
- How to add axes and grid to webgl-candlesticks example? HOT 1
- Is it compatible with d3.js v7.6.1?
- ES module version
- Drawing seriesWebGlLine for big values doesn't draw correctly, seriesCanvasLine is fine HOT 1
- Is a node version bump in the works?
- Migrate to GH actions HOT 2
- Label Rotate start too late, after they start overlapping HOT 1
- Line series points the side of bar series instead of in the middle bar series. HOT 3
- Error with Sveltkit HOT 2
- on click and hover event in series-webgl-bar HOT 2
- GitHub releases are not working HOT 1
- Problems with integrating d3fc charts as a webcomponent in React application (Shadow DOM)
- We've been experiencing intermittent build failures
- Modernise libraries
- Separate the current CI build job into lint, build, and test
- Add linting requirement to documentation
- Make master stable
- Discontinuous scale on inverted domain HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3fc.