Open imnas opened 6 years ago
It's basically not pixel perfect right now, and the text is not vertically aligned, i'm using canvas+svg
Awesome charts, I'm totally digging it!
I also need to style the edge indicator or set the width to provide space for large prices (ie price of BTCUSD for example.)
@neosavvy I was able to get the price of Bitcoin to fit in the EdgeIndicator / MouseCoordinateY with some tweaking of the params.
MouseCooridnateY renders an EdgeIndicator, but it is slightly different from the EdgeIndicator. Note how in your screenshot that the EdgeIndicator (green) is taller than the MouseIndicatorY and the arrow is a little whacky as a result.
To make them both look the same, fix the wonky arrow, and display Bitcoin price readably:
<MouseCoordinateY
at="right" orient="right"
rectHeight={18} rectWidth={60}
displayFormat={format(">.2f")}
/>
<EdgeIndicator
itemType="last" orient="right" edgeAt="right"
strokeWidth={1} rectHeight={18} rectWidth={60}
displayFormat={format(">.2f")}
yAccessor={d => d.close} fill={d => d.close > d.open ? "#6BA583" : "#FF0000"}
/>
I'm trying to fix the padding, but there are no props that allow me to do that, thanks rrag!