victory
victory copied to clipboard
VictoryBrushContainer handleComponent renders but doesn't drag
When a handleComponent svg is defined, the handle does not drag on page load. Dragging above or below the handle it drags the edge of the brush as it should but dragging the handle itself it doesn't. The handle becomes dragable after the brush is moved or dragged some other way so this issue is only on initial load.
Affects current version. Issue can be replicated by pasting the following code in the editable docs page at https://formidable.com/open-source/victory/docs/victory-brush-container/
<VictoryChart
containerComponent={
<VictoryBrushContainer
brushDimension="x"
brushDomain={{x: [0.1, 0.3]}}
handleWidth={12}
handleComponent={
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<rect width="10" height="10" fill='black'/>
</svg>
}
/>
}
>
<VictoryLine />
</VictoryChart>
The handle should be dragable on page load and with any subsequent interaction.
Or, could this be an issue with the example provided for the handle? I tried a few svgs and all had the problem described, although they all rendered fine.