Pre loader

Floating button on chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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

Version
3.5.711
  • You must to post comments
0
1

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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.