Comments (5)
Indeed there's no easy way to do this now. Yes, you'd need to use those methods to set up the correct scales for the series children on your SVG.
One reason we're taking control of the SVG is to be able to handle mouse events within the SVG element.
We might need to revisit this later to allow others to easily use Series components in their own SVG components, perhaps through exposing a higher order component that does these cloning/scale calculations and provide the relevant scales to the wrapped component.
Also, propTypes for LineSeries are documented via AbstractSeries right now: https://github.com/uber-common/react-vis/blob/master/src/lib/plot/series/abstract-series.js#L35
from react-vis.
Thanks for the helpful answer. Will try to investigate the higher order component or another approach, but it sounds like it may be a bit wide-scoping for a simple PR. Feel free to close this or tag as feature request
or something in the mean time.
from react-vis.
Please do share your findings! I'll leave this open for discussion and so that others are aware of the issue. Thanks for opening the issue.
I was thinking the higher order component approach would be great to also extract out some of the logic that's deep inside XYPlot.
from react-vis.
I think another approach would be to enable an svg only mode on XYPlot. That way we can still scale our series and run all of our handlers, but serve up an embeddable svg.
This would also enable us to be super slick and deeply nest our components! For instance, imagine I wanted to layout a small multiple of pie charts, and I wanted it to be pure SVG. (So that i could crowbar it out and drop it into sketch say). Example API
<XYPlot ....>
<RadialChart xPosition={10} yPosition={10} data={myData}/>
<RadialChart xPosition={10} yPosition={20} data={myData2}/>
...
</XYplot>
from react-vis.
We have no plan to do that for now but feel free to submit a PR.
from react-vis.
Related Issues (20)
- Arc series graph moving around HOT 1
- FlexibleXYPlot Warning: componentWillReceiveProps has been renamed, and is not recommended for use
- npm ERR! peer react@"15.3.0 - 16.x" from [email protected] with NPM 7 or above install HOT 10
- X-Axis shows rgb values instead of actual label
- Stroke color in CSS
- Is this project abandoned? HOT 3
- Some heat map box does not show tooltip on react-vis.
- How to make this library work with non ES6 app?
- Position labels in radial charts HOT 3
- Option to replace react-motion with other animcation libraries
- Warning: componentWillReceiveProps has been renamed, and is not recommended for use. HOT 1
- Unable to show separate tooltips for area series and custom svg series
- Security Vulnerability in d3-color HOT 1
- Proposal: Archive this repository HOT 9
- Unable To Resolve Module In 1.11.11 HOT 9
- Cannot read properties of null (reading 'offsetHeight')
- Easy way to reduce transitive dependencies
- HeatmapSeries is breaking after upgrading to version 1.12.1 HOT 3
- How to apply stroke only on the top of AreaSeries
- React 18 support HOT 3
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 react-vis.