how might i handle the labelComponent
property in this example using reagent?
<VictoryBar
data={sampleData}
labels={({ datum }) => datum.y}
style={{ labels: { fill: "white" } }}
labelComponent={<VictoryLabel dy={30}/>}
/>
i get an error when i do the following, which makes sense, but i'm not sure how to resolve it
[:> VictoryBar {:labelComponent [:> VictoryLabel {:dy 30]}]
react.development.js:221 Warning: Failed prop type: Invalid prop `labelComponent` of type `array` supplied to `VictoryBar`, expected a single ReactElement.
It's described literally in the discussion above your post. :)
You need as-element
or rectify-component
.
ha, what are the odds. thanks @p-himik