SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

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.

0
0

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

Version
4.2
  • You must to post comments
0
0

Hi there,

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!

Best regards,
Yuriy

  • bbmat
    Thank you @Yuriy, though I wonder how I would go about implementing this. “Annotations” of SciChartSurface is already data-bound to my view model and on the other hand my legend must be declared and defined within xaml.I know WPF allows “CompositeCollections” but this idea does not seem applicable here.Any ideas how to get around this issue?Thanks a lot.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.