Pre loader

What happened to AxisLabelTemplate on CursorModifer?

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

0
0

Hi folks,

I have this code in an old app:

                            <s:CursorModifier x:Name="MainCursor" ShowAxisLabels="True" ShowTooltip="False"
                                            ReceiveHandledEvents="True" LineOverlayStyle="{x:Null}">
                            <s:CursorModifier.AxisLabelTemplate>
                                <!-- This empty template hides Themes cursor labels -->
                                <ControlTemplate TargetType="s:TemplatableControl" />
                            </s:CursorModifier.AxisLabelTemplate>
                        </s:CursorModifier>

This used to work. But unfortunately, this produces the following error after upgrading (I’m not on WPF v8):
Property ‘AxisLabelTemplate’ does not support values of type ‘ControlTemplate’.

I need this feature because I want to display data from the CursorModifier in a corner of my plot, but not in the built-in axis labels. Setting ShowAxisLabels to False evidently prevents the data from being generated, so I need ShowAxisLabels to be True. The empty AxisLabelTemplate above worked to hide the axis labels, but not this code produces the error above. What can I do?

Version
WPF v8
  • Lex
    • Lex
    • 6 months ago
    Hi George, Thank you for contacting us. I’m forwarding your inquiry to our team for further discussion and will get back to you as soon as I have an update. Kind regards, Lex S., MSEE SciChart Technical Support Engineer
  • yefchak
    Hi, OK… I think instead I should just tell you what I’m trying to do. I have this cursor modifier: Setting ShowAxisLabels causes vertical and horizontal lines to follow the cursor as it moves, and of course it shows the axis labels corresponding to the cursor position. What I want is JUST the lines, WITHOUT the axis lables. In a very old version of SciChart, setting the empty control template as follows caused the axis labels to disapper. How can I achieve the same effect in v 8?
  • yefchak
    p.s. I should explain more fully… When the lines are visible, I’m able to display the x- and y -axis values in a separate control that is data-bound to the cursor’s AxisInfo. But if I set ShowAxisLabels to False, this databind doesn’t happen (or rather, I assume, that data it’s bound to no longer exists).
  • yefchak
    Any thoughts on this? I still have no way to remove the moving axis labels implemented with ShowAxisLabels without killing the databinding to another control. As I mentioned at the beginning of this thread, I was able to do this in a much older version of SciChart.
  • yefchak
    Is anyone here? I still need a resolution to this issue. Thanks.
  • You must to post comments
0
0

Hi George,

I hope this message finds you well.
I’m sorry for the delayed response.

​We reviewed your inquiry.
It looks like you are updating your project from an outdated SciChart version.
Could you please tell which SicChart version you have been using so far?

In the current SciChart v8, the AxisLabelTemplate is a DataTemplate, not a ControlTemplate. Please try using it instead and let us know if this helps.

Kind regards,
Lex S., MSEE
SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.