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
- JiaRong Kang asked 8 years ago
- You must login to post comments
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?
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
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
- JiaRong Kang answered 8 years ago
- last edited 8 years ago
-
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 login to post comments
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
- JiaRong Kang answered 8 years ago
- You must login to post comments
Please login first to submit.