I am developing an application which uses LightningChart Ultimate WPF.
I have a problem with drawing multiple images using AnnotationsXY. I need to render large numbers of images (eg 30k) but this results in very slow rendering and chart is not responsible.
Is there any solution for the chart to work smoothly?
There is a piece of code that i used to create Annotations
Code: Select all
AnnotationXY imageAnnotation = new AnnotationXY();
imageAnnotation.Style = AnnotationStyle.Rectangle;
imageAnnotation.LocationCoordinateSystem = CoordinateSystem.AxisValues;
imageAnnotation.Sizing = AnnotationXYSizing.ScreenCoordinates;
imageAnnotation.SizeScreenCoords.Width = 16;
imageAnnotation.SizeScreenCoords.Height = 16;
imageAnnotation.TextStyle.Visible = false;
imageAnnotation.BorderVisible = false;
imageAnnotation.LocationAxisValues.X = annotationCenterPosition;
imageAnnotation.LocationAxisValues.Y = yPositionImage;
imageAnnotation.Anchor.X = 0.5f;
imageAnnotation.Anchor.Y = 0.5f;
imageAnnotation.TextStyle.VerticalAlign = AlignmentVertical.Top;
imageAnnotation.RotateAngle = 0;
imageAnnotation.Fill.Bitmap.Image = toBitmapFrame(imageBytes);
imageAnnotation.Fill.Style = RectFillStyle.Bitmap;
imageAnnotation.Fill.Bitmap.Layout = BitmapFillLayout.Stretch;
imageAnnotation.Fill.Color = Colors.Transparent;
imageAnnotation.Fill.GradientFill = GradientFill.Solid;
imageAnnotation.Fill.GradientColor = Colors.Transparent;
imageAnnotation.Shadow.Visible = false;
imageAnnotation.MouseInteraction = false;
ImageAnnotations.Add(imageAnnotation);
There is a preview what I want to achieve. The first image have a max. zoom out and the second is slightly zoomed in. Even when chart is zoomed in and it displays only several images the performance is not good enough.
The upper chart in the images is a seperated chart control witch disabled axes only used to display images. The lower one display series in segments.
Thanks for Your help,
Best regards