Pre loader

Tag: BasePointMarker

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

1 vote
19k views

Hello again!
I’m using new SciChart 3.2 Beta version. In the 3.1 version I had this code snippet to draw (only one) point marker:

protected override void DrawInternal(IRenderContext2D context, IEnumerable<Point> centers, IPen2D pen, IBrush2D brush)
        {
            var viewportRect = new Rect(new Point(0, 0), context.ViewportSize);

            float width = (float)Width;
            float height = (float)Height;
            Point lastPoint = new Point();
            var custBrush = context.CreateBrush(new SolidColorBrush(Colors.White));
            foreach (var center in centers)
            {
                if (IsInBounds(center, width, height, viewportRect))
                {
                    lastPoint=new Point(center.X,center.Y);
                }
            }
            context.FillRectangle(custBrush, new Point(lastPoint.X - 100, lastPoint.Y), new Point(lastPoint.X - 100 + NameToDisplay.Length * 4 * (FontSize / 8.0), lastPoint.Y + 20 * (FontSize / 8.0)), 0);
            context.DrawText(new Rect(lastPoint.X - 100, lastPoint.Y, NameToDisplay.Length * 4 * (FontSize / 8.0), 20 * (FontSize / 8.0)), FontColor, FontSize, NameToDisplay);
            custBrush.Dispose();
        }

But in new version all point markers are drawn only with this method :

protected override void DrawInternal(IRenderContext2D context, double x, double y, IPen2D pen, IBrush2D brush)
{....

How can I switch it to draw only by the method with centers (not with single point) , because I need to show only last visible point of renderable series ?
Thanks in advance!

  • Egor asked 9 years ago
  • last active 9 years ago
1 vote
16k views

Hello. I need to provide custom point marker with height and width based on my data, but trying to implement BasePointMarker I have the center points but not the original data to make the width and height based in my original binding. Is there a solution to do that? Thank you.

Tommy Garcia.

1 vote
14k views

Hello,
I’m using your package for price charting. And I need to put on one bar (or candlestick) several markers (for example several dots with different colours and sizes). Also sometimes I need to change size on some of these markers. Now I am doing this by putting CustomAnnotations. Is there a way to plot the same with for example XyScatterRenderableSeries to increase drawing speed?

Best regards,
Roman.

  • Roman asked 9 years ago
  • last active 9 years ago
0 votes
10k views

Hi,

I wonder if there is a way of modifying the Z-Index/render priority of individual points in a XyScatterRenderableSeries based on a value in the metadata.

I have a chart with tons of datapoints (anything between 100k -2M points) and they are plotted very close to each other in X/Y. I’m also using a custom pointmaker to color and resize the points based on a value in the metadata.

Even when using ResamplingMode.None, some points are automatically “optimized” away (not rendered). I’d like a way of setting a render priority based on a value in the metadata so the points with higher values are rendered on top of the ones of lower values. Or the ones with lower values are “optimized away” first. Can this be done?

Showing 4 results

Try SciChart Today

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

Start TrialCase Studies