Closed gerardo-contijoch closed 1 year ago
We already have the field to store a hovered marker id
These ids can be provided via optional fileld
Probably we can add an additional optional field id
in PriceLineOptions
and rename the field hoveredMarkerId
to hoveredObjectId
so we can provide not only a marker id but a custom price line id too
I like @kirchet suggestion, it leaves place for future expansion.
I have a project where I need to be able to react to clicks on pricelines.
I know I can add a new priceline and setup several of its options but I need to be able to remove it when the user clicks on it.
Also I would like to be able to change the cursor or show a floating pane when the user hovers over a priceline so the user can see information about that price. Obviously, the code for the floating pane would be custom code, not something integrated in the library.
I guess this could be achieved if
MouseEventParams
interface is updated with a propertyhoveredPriceLine
. This way simply by callingchart.subscribeClick(param)
andchart.subscribeCrosshairMove(param)
we could implement the required logic.