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!

0
0

Hi :

When I used BasePointMarker to draw what I need, I found that if I use a mount of points , program’s performance will be bad when I pan or zoom in/out the view.
Is it usual? I follow the example ,Custom point marker.

Fig 1 : With Point Marker
Fig 2 : No Point Marker

Best regards,
Xuan

Images
  • You must to post comments
0
0

No it’s not usual. We have an example here using Custom PointMarkers with 1,000,000 points

Please see our related FAQ Faster Performance Scatter Charting as well as Insane WPF Scatter Chart performance with Parallel Rendering.

Have you profiled your code to find out where is the bottleneck?

  • You must to post comments
0
0

Hi Andrew:

Thanks for your answer!

I have tried the method that you said. There is a problem. In my code ,context.DrawText() method cause exception popup “The calling thread must be STA, because many UI components require this”.
Using context.DrawEllipse() is correct,but context.DrawText() is not . Is there difference between DrawText and DrawEllipse?

public override void Draw(IRenderContext2D context, IEnumerable<Point> centers)
    {
        var fill = context.CreateBrush(Fill);
        var stroke = context.CreatePen(Stroke, AntiAliasing, (float)StrokeThickness);
        Action<Point> drawOp = (center) =>
        {
            var drawrect = new Rect(center, new Size(35, 40));
            //context.DrawEllipse(stroke, fill, center, _width, _height);
            context.DrawText(drawrect, fill.Color, 1, "0");
        };
        Parallel.ForEach(centers, drawOp);
    }

Here is my code.

Best regards,
Xuan

  • Andrew
    DrawText is not supported in a multi-threaded environment. Only draw lines and only HighSpeedRenderSurface.What I did by showing you this article was that it is possible to draw 1,000,000 points scatter and I suggested you profile your code to find the bottleneck.
  • You must to post comments
0
0

Hi Andrew :

I found that my program in the Scichart v3.6 performance is good. In SciChart V4.0.3 performance is going down. After that,I try the sample that you provided.At the same code in V4.0.3,I found that Fps is 1~3. In V3.6 Fps can keep at 10 to 12. Low FPS cause my app performance worse. I hope some method to solve this problem.

Best regards,
Xuan

Images
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.