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

1 vote
0 answers
51 views

I’m trying to create a spectrum viewer with your library. One important feature is a cursor supporting both automatic mode and manual mode. In automatic mode, it stays at the maximum value. In manual mode, it moves with finger panning. It’s close to the SCICursorModifier with the cross lines, but it should always stay on the plot even without touch. Also it should reside on real data points instead of anywhere in between like the SCIRolloverModifier instead of the SCICursorModifier.

Could you give me some advices about how to achieve it? Thanks.

EDIT: after reading more of your documents, I believe HorizontalLineAnnotation and VerticalLineAnnotation are the way to go. I have already added them as the automatic mode cursor. For the manual mode, I still need your help to achieve either:
1) a callback function for the VerticalLineAnnotation drag event, so that I could move both lines to the corresponding data point
or
2) a custom ZoomPanModifier to allow me to distinguish one point or two points touch: one point panning to move the whole plot and two points panning to determine the new cursor location and redraw the two annotations there

EDIT2: I was able to create a custom VerticalLineAnnotation class to handle the panning event. There is one more question left. Right now in order to update the verticallineannotation and horizontallineannotation on the graph, I remove them from sciChartSurface.annotations, change x/y locations and add them back. Is there a redraw or refresh or update function to call directly?

Thanks

  • Haoran Xie asked 2 weeks ago
  • last active 1 week ago
0 votes
865 views

Greeting, I want to do a custom cursor, something just like the image, but with candles (a candlestick chart) , and I wanna see all the info (Date, open, close, high, low). Is there any example of it?

0 votes
860 views

hi, I wanted to display the cursor information (x, y value)on the text annotation like the following. I can only find the example of displaying as tooltip, but is it possible to show with the text annotation? Thank you!

  • may lym asked 12 months ago
  • last active 12 months ago
1 vote
2k views

Hi.

I am evaluating the SciChart control – so far it looks very promising.

I have a FastHeatMapRenderableSeries that is analyzed and a FastLineRenderableSeries line is drawn through the chart.

The user needs to be able to correct the analysis, and this is done by “drawing” in the heatmap.

As far as I could tell, the ChartModifierBase gives med the necessary hooks to track the user’s mouse movements – but I would like to give some visual feedback by changing the cursor, for instance to Cursors.Pen (Cursors from the Microsoft namespace)

Is this possible? I would want to enable drawing when user presses Ctrl, the disable it when user releases Ctrl…

1 vote
3k views

Hi,

I am trying out SciChart, and so far I am impressed about the performance and capabilities.

For my application I need to have a cursor showing the X and Y values of the current data point. The RolloverModifier seems to be a good start, but at some points i need other behaviour:

  1. I need the cursor to only move when the mouse button is down. So
    you can zoom/pan the graph, with the cursor remaining on the same
    data point.
  2. I need the cursor to move to the next/previous data
    point on a keypress (Keys.Left and Keys.Right).

The exapmle “Custom ChartModifiers – Part 2 – Custom ZoomPanModifier and Zooming on KeyPress” seems to be a good start, where the OnAttached() method of a SimpleZoomInOutModifier class, derived from ChartModifierBase, is overridden to get access to keypress events:

    public override void OnAttached()
    {
        base.OnAttached();
        var scichart = ((SciChartSurface)ParentSurface);

        var mainWindow = FindLogicalParent(scichart);

        mainWindow.PreviewKeyDown -= SciChart_PreviewKeyDown;
        mainWindow.PreviewKeyDown += SciChart_PreviewKeyDown;
    }

    private T FindLogicalParent(SciChartSurface scichart) where T:class
    {
        var parent = (FrameworkElement)scichart.Parent;
        while (parent != null)
        {
            var candidate = parent as T;
            if (candidate != null) return candidate;

            parent = (FrameworkElement)parent.Parent;
        }

        return null;
    }

But the function FindLogicalParent() gives compiler errors, and in the downloaded code for this exaple application, this method isn’t even there… the method OnAttached() in the downloaded code is:

    public override void OnAttached()
    {
        base.OnAttached();
        var scichart = ((SciChartSurface)ParentSurface);

        scichart.PreviewKeyDown -= SciChart_PreviewKeyDown;
        scichart.PreviewKeyDown += SciChart_PreviewKeyDown;
    }

But this code doesn’t work. The SciChart_PreviewKeyDown eventhandler is never called.

How to move forward?

Showing 5 results
This template supports the sidebar's widgets. Add one or use Full Width layout.