Hello,
I am wanting to place a floating button at the top right corner of my chart. What are some effective methods to do this within scichart?
Thank you,
Preston
- preston truong asked 3 weeks ago
- last edited 3 weeks ago
- You must login to post comments
Hello, this depends on whether you want to position the button based on the data coordinate space of the chart and whether you would like to use a UI framework for the button implementation.
If you don’t need to bind to coordinates, a simple solution would be to just place the button above the chart with CSS via absolute position or CSS grid features.
Otherwise, there is an example of how to place controls within an SVG annotation via foreignObject https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/CustomerExamples/Annotations
Alternatively, for example, you can do the positioning by subscribing to the render event and performing calculations based on sciChartSurface.seriesViewRect dimensions.
Also, FYI, at the moment we are working on HTMLAnnotation – a feature which should allow placing an arbitrary HTML and elements within the chart with ease.
It would also greatly simplify this when working with UI frameworks.
We are planning to deliver it in the scope of the next major release.
- Jim Risen answered 2 weeks ago
- You must login to post comments
Please login first to submit.