Pre loader

Line sharpness and built-in crosshairs

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

Is there any way to improve the sharpness of lines for the plots? As seen on the two attachments the original plot is crisp and clear, whereas the SciChart version have jagged edges (at least for the default FastMountainRenderableSeries).

Also, is there a built in crosshair (x,y) tracking that displays both horizontal and vertical lines and has the option to track only when a specific mouse button is down?

I’m loving how the chart renders data FAAST, but just need more info for evaluation.

Thanks!

Thanks!

Images
  • You must to post comments
0
0

Hello, and thanks for your enquiry!!

Ok – so the drawing engine in SciChart uses a high-speed, low quality software rasterizer. As you’ve noted it is very fast, but also sometimes comes out a bit jagged. You can try playing with StrokeThickness, SeriesColor (supports transparency), AreaColor (supports transparency), AntiAlias properties on FastLineMountainSeries to try to improve this.

In SciChart 2.0 (currently in development, due for release Q2 2013) we are building a number of renderer plugins. One is a high-quality software rasterizer, which yields significantly higher quality and without too much of a penalty in speed. It also works on Silverlight as well as WPF.

We are also building a DirectX rasterizer so drawing commands can be sent to the GPU, maintaining high quality and speed. I attach three screenshots so you can see the difference in quality between these three drawing engines. Note these have been built (or are in development now), but won’t be released until Q2 2013 (Existing license holders in their 1-year support period will get v2.0 update for free).

For your second question, yes the Chart Modifiers are extremely customizable! The class CursorModifier may be overridden so that its behaviour is changed. Please try this code (include as a class file and as a modifier in your SciChartSurface.ChartModifier or ModifierGroup).

  public class OnlyMouseDownCursorModifier : CursorModifier
    {
        private bool _isMouseDown;

        public override void OnModifierMouseDown(ModifierMouseArgs e)
        {
            base.OnModifierMouseDown(e);
            _isMouseDown = true;
            //Debug.WriteLine("Mouse down!");
        }

        public override void OnModifierMouseUp(ModifierMouseArgs e)
        {
            base.OnModifierMouseUp(e);
            _isMouseDown = false;
            //Debug.WriteLine("MouseUp!");

            // Hack! Really we want to call CursorModifier.ClearAll()
            // on mouseup, but the method is private (not protected), so we can call
            // OnParentSurfaceMouseLeave instead, which forces the cursor
            // to be cleared on mouse-up
            base.OnParentSurfaceMouseLeave();
        }

        public override void OnModifierMouseMove(ModifierMouseArgs e)
        {
            if (_isMouseDown)
            {
                //Debug.WriteLine("Moving (Base)!");
                base.OnModifierMouseMove(e);
            }
        }
    }

To include a modifier, simply use this code like this in Xaml:

<s:SciChartSurface>
   <!-- Axis, Dataset, RenderableSeries omitted for brevity -->
   <s:SciChartSurface.ChartModifier>
      <s:CursorModifier/>
   </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

We also have loads of examples which cover different modifier usage, combinations of modifiers and their properties.

Hope this helps!
Andrew

Images
  • xeven77
    Great news! I'll try out the CursorModifier and we're eagerly waiting for the DirectX/HQ version. Have a couple of large projects lined up already. :)
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies