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 votes
941 views

I have a chart which includes a RolloverModifier with Tooltip shown on MouseHover. This works very well, and RolloverModifer includes a nice HoverDelay property to determine how quickly the tooltip displays. Is there a way to get an event when the tooltip is actually displayed (or about to be displayed)? The normal FrameworkElement.TooltipOpening event does not fire in this situation.

Bill

0 votes
1k views

Hello,
I would like to allow user click on Legend and highlight the corresponding Series on the chart but I don’t know if this feature is supported or not.

I tried to add mouse events to the Legend Modified but it seems like mouse events are not triggered

This is the simple code that I am using

<s:LegendModifier x:Name="chlLegend" ShowLegend="True" LegendPlacement="Top" Orientation="Horizontal" MouseDown="chlLegend_MouseDown" ScrollViewer.HorizontalScrollBarVisibility="Auto" />

Before investigating more I would like to ask you if you have any hints which is the correct way to implement this behavior.
Is the LegendModifier suitable for this or should I override instead the Legend Control Template?

Thank you in advance for the support

0 votes
2k views

I’ve created a custom rollover modifier, the aim being it only moves when the mouse is down. Pretty simple, here’s the code I have:

class Histogram2DSlicer : RolloverModifier
{
    public Histogram2DSlicer() : base()
    {
        ReceiveHandledEvents = true;
    }

    public override void OnModifierMouseMove(ModifierMouseArgs e)
    {
        Console.WriteLine(e.MouseButtons);
        if (e.MouseButtons == MouseButtons.Left)
        {
            base.OnModifierMouseMove(e);
        }
    }
}

However, the ModifierMouseArgs e.MouseButtons is “None” at all times, is this a bug or do the Modifiers not receive button events?

Joe

  • Ken Hobbs asked 3 years ago
  • last active 3 years ago
0 votes
1k views

I have a ListBox containing ListBoxItems that are UserControls containing a SciChartSurface.

My user needs to be able to select an item in the ListBox. I find that if you click on the SciChartSurface, the item does not get selected. I had to click outside the SciChartSurface to select the ListBoxItem.

Is there an easy way to make SciChartSurface not consume the mouse event? The user will not be manipulating anything in the SciChartSurface so there is no need for it to handle any mouse events.

Thank you.

  • Kwokon Ng asked 3 years ago
  • last active 3 years ago
1 vote
4k views

I think what I’m looking for is some sort of DragCompleted type event.

I’ve already overridden the VerticalLineAnnotation in order to force the bar to only jump to existing coordinates. So what I want to do now is go off and get more data related to that coordinate value when the user has finished dragging the bar.

I haven’t got a lot of time to implement anything complex so for now I can get away with a button on a tool bar to press after the drag. Not very slick I know, but if there’s an easy way to do it then I’m keen to hear about it đŸ™‚

Thanks

0 votes
0 answers
4k views

Good day!
I have a problem with annotations. When I add them by double clicking on surface with this snippet of code:

private TextPointAnnotation LoadTextPointAnnotation(double x1, double y1)
        {
            var textPoint = new TextPointAnnotation
            {
                X1 = x1,
                Y1 = y1,
                ElementX2 = -10,
                ElementY2 = -5,
                ElementFontSize = 9,
                AnnotationName = "TXTAnnot" + _annotaionCount,
                ElementFontColor = Colors.Yellow,
                ElementWidth = 50,
                ElementHeight = 20,
                BorderBrush = new SolidColorBrush(Colors.Red),
                Background = new SolidColorBrush(Color.FromArgb(78, 255, 0, 0)),
                YAxisId = TextOfYAxis,
                IsHidden = !_isTextPointAnnotationsVisible,
                IsEditable = true,
                AnnotationCanvas = AnnotationCanvas.AboveChart,
                CanEditText = false
            };
            textPoint.ElementText = String.Format("{0}", textPoint.AnnotationName);
            textPoint.ContextMenu = BuildMenu(textPoint);
            textPoint.MouseMove += AnnotationMove;
            textPoint.MouseRightButtonDown += OnRightMouseAnnotationDown;
            textPoint.PreviewMouseLeftButtonDown += textPoint_PreviewMouseLeftButtonDown;
            textPoint.PreviewMouseMove += textPoint_PreviewMouseMove;
            AnnotationCollection.Add(textPoint);
            return textPoint;
        }

They are visible for mouse actions (for example, mouse move, mouse down and etc.)(Image 1)
But when I add them programmaticaly, for example in Loaded method- LoadTextPointAnnotation(100,200), they are not visible for mouse actions, that I’ve already mentioned above(Image 2).

What is the reason of strange behaviour?

Thanks in advance.

  • Egor asked 4 years ago
  • last active 4 years ago
1 vote
4k views

Hi there. I have many chartwindows each with price and volume panes. Each chart has own ViewModel instance as datacontext. I need cursor to be synchronized in each chart between price chart and volume chart.
If I write in xaml <s:ModifierGroup s:MouseManager.MouseEventGroup="xxx"> it synchronizes all cursors of all charts. So I’m trying to do the following:

<s:ModifierGroup s:MouseManager.MouseEventGroup="{Binding MyMouseGroup}">

In ViewModel (part of code from different blocks):

private string _myMouseGroup;
_myMouseGroup = Guid.NewGuid().ToString();
       public string MyMouseGroup
        { get { return _myMouseGroup; }  }

But it’s not worked, Cursors are not synchronized in one chart. I understand that MyMouseGroup should be not string type but dependency property though in Xaml I can use any string. But I don’t have enough programming knowledge to figure out how to do it. Please help with that MyMouseGroup property.

  • RTrade A asked 4 years ago
  • last active 3 years ago
Showing 7 results
This template supports the sidebar's widgets. Add one or use Full Width layout.