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;
}
}
- Declan Walsh asked 2 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 2 years ago
- You must login to post comments
Hi Andrew,
Excellent. I’ll give it a shot. Thankyou!
- Declan Walsh answered 2 years ago
- You must login to post comments
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.
- Declan Walsh answered 2 years ago
-
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 login to post comments
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.
- Declan Walsh answered 2 years ago
- You must login to post comments
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.
- Declan Walsh answered 2 years ago
- last edited 2 years ago
- You must login to post comments
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
- Lex answered 2 years ago
- You must login to post comments
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.
- Declan Walsh answered 2 years ago
-
Thanks Declan, I think we need to see the code now and we can investigate & solve the issue. Best regards, Andrew
-
Yup. Sorry I haven’t had time to put a sample together yet. I will asap though.
- You must login to post comments
Please login first to submit.