SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
i currently place my custom (templated) legend inside the Scichartsurface (via xaml).
How can I offer the feature to drag the legend with the mouse to any location on the surface? Please note that I also use mouse movements and clicks for several chart modifiers so most likely I would have to check whether the mouse is hovering over the legend when a left mouse click event is raised?
Could you please get me started with some ideas or thoughts as I am not sure how to approach this issue.
Thanks for your question. I would suggest placing your custom legend in a CustomAnnotation, which can be moved inside a SciChartSurface. You will need to declare the legend explicitly, not via a LegendModifier:
<SciChart:SciChartSurface.Annotations> <SciChart:CustomAnnotation CoordinateMode="Relative" X1="0" Y1="0" IsEditable="True"> <SciChart:CustomAnnotation.Content> <SciChart:SciChartLegend .../> </SciChart:CustomAnnotation.Content> </SciChart:CustomAnnotation> </SciChart:SciChartSurface.Annotations>
You can find more info about the SciChartLegend control in our FAQ.
Hope this helps!
Please login first to submit.