Pre loader

PointMarker Stroke Thickness Clipping

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
0

Hi,

I’m trying to add point markers to a scatter series that have transparent fill and coloured stroke. It works but the behavour of the stroke thickness isn’t quite as expected.

Any thickness about 1 starts to clip the square that the sprite is drawn in, making ellipses look square.

SquarePointMarker only seems to draw the stroke on the top and left sides.

TrianglePointMarker clips the stroke at the top and bottom.

I can’t seem to find any other properties that might change this. Padding seems to have no effect.

The following code gereates the point markers:

public static IPointMarker CreatePointMarker(PointMarkerTypes pointType, double size, double strokeThickness, Color fill, Color stroke)
        {
            // Square
            if (pointType == PointMarkerTypes.Square)
            {
                var square = new SquarePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return square;
            }

            // Triangle
            if (pointType == PointMarkerTypes.Triangle)
            {
                var triangle = new TrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return triangle;
            }

            // Inverse Triangle
            if (pointType == PointMarkerTypes.InverseTriangle)
            {
                var invTriangle = new InvertedTrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return invTriangle;
            }

            // X
            if (pointType == PointMarkerTypes.X)
            {
                var x = new XPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return x;
            }

            // Cross
            if (pointType == PointMarkerTypes.Cross)
            {
                var cross = new CrossPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return cross;
            }

            // Circle
            else
            {
                var circle = new EllipsePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return circle;
            }
        }
Version
.NET Core 3.1 v6.5.0
Images
  • You must to post comments
1
0

Good morning Declan

The good news is this is a known bug which has been fixed in our latest nightly build.

Can you try out version 6.6.0.26559. This can be installed via NuGet from this private feed:
https://www.myget.org/feed/abtsoftware-bleeding-edge/package/nuget/SciChart

PM> Install-Package SciChart -Version 6.6.0.26559 -Source https://www.myget.org/F/abtsoftware-bleeding-edge/api/v3/index.json

Instructions for setting up the feed are also found in Getting Nightly Builds with Nuget.

Best regards,
Andrew

  • You must to post comments
1
0

Hi Andrew,

Excellent. I’ll give it a shot. Thankyou!

  • You must to post comments
1
0

Hi Andrew,

Assuming I’ve done this correct it still doesn’t work.

My packages are now showing as version 6.6.0.26559 and in the output directory they’re the same. Problem still exists though.

  • Andrew Burnett-Thompson
    Hi Declan, any chance you can send us code to reproduce? Is there anything special about your setup, such as DPI on the monitor?
  • You must to post comments
1
0

Hi Andrew,

I’ve found the problem.

I’m using meta data and a custom palette provider.

If I create a point that has a transparent stroke initially, then in the palette provider I set the stroke to coloured, the point renders as above. If I initialise it with a non transparent stroke, it works fine.

Strange as in both cases the stroke thickness is not being changed. If the stroke is transparent it’s like it’s not being accounted for in space.

The only issue I’m having now is that if I draw a small cross (height & width = 6, stroke = 1) it is off centre. See attached picture.

Images
  • You must to post comments
1
0

Hi Again,

There’s definitely some bugs with this version.

My rollover templates are randomly not appearing or showing data. One works on initial chart load, then if I change screens and go back they’re gone. My scatter plot rollover marker is blank now. All this worked fine yesterday.

Is there a stable release that has the point marker fix?

Update:
I rolled back to 6.6.0.26505 which I believe is the official release. Point markers are drawing correctly which is good but the disappearing rollover markers are still a problem.

  • You must to post comments
1
0

Hi Declan,

Thank you for reporting this.
Could you please share a small sample project reproducing the issue for investigation on our side?
You can also create a support ticket, if you don’t wish to share the code in public, here:
https://support.scichart.com/index.php?/Tickets/Submit

With best regards,
Lex

  • You must to post comments
1
0

Hi Lex,

The rollover marker labels disappearing was because the TextBlock.Foreground was bound to a stroke colour that was now transparent. that one was my fault.

I rolled back to 6.5.1 and the vertical slice rollover markers stay visible however they don’t move when you move the slice, they get stuck at their initial drawn position.

Rolled back to 6.5.0 and they’re fine again.

I’ll try and put something together over the next few days to try replicate it.

  • Andrew Burnett-Thompson
    Thanks Declan, I think we need to see the code now and we can investigate & solve the issue. Best regards, Andrew
  • Declan Walsh
    Yup. Sorry I haven’t had time to put a sample together yet. I will asap though.
  • You must to post comments
Showing 7 results
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