-
Notifications
You must be signed in to change notification settings - Fork 39
Description
With the top level chart component - I issued a PR the other week which we merged in to pass down label's to the Axis components, but it seems that there are more properties to pass down too, such as padding.
I was wondering if the way that properties are passed down also needs to be a bit smarter about how it overrides properties on a component. If you want 2 Yaxis components for example (left&right), then you would not be able to do:
<LineChart ....>
....
<YAxis yTickOrient='left' />
<YAxis yTickOrient='right' />
</LineChart>
Because the properties would be overridden by https://github.com/react-d3/react-d3-shape/blob/master/src/chart.jsx#L100-L123. Importantly, this also seems to affect completely custom child components too.
It should be possible to merge the properties of the children with the chart so that overridden properties are not lost. an Object.assign ought to be enough.
Are you happy to accept a PR for this?