Skip to content

#2050 Added Marker Line Style for Line Series #2051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

KeithBrio
Copy link

@KeithBrio KeithBrio commented Nov 15, 2023

Add the ability to set the Marker Line Style for Line Series charts.

lineSeries.MarkerLineStyle = LineStyle.Dot;

image

Been sitting on my hard drive for the last couple of years and figured I should push it up.

Copy link
Contributor

@VisualMelon VisualMelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution! There are quite a few issues here, but in principle I think the idea is good. Main issues (only marked up a single instance of each with a specific comment):

  • Need to use this. notation when accessing members
  • dashArray isn't used in most of the render contexts
  • Some changes to the csprojs that I think shouldn't be there
  • This should have its own example rather than modifying the existing on for MarkerType (makes it easier for people to find the example and feature, and keeps the example code for the given feature simpler)

I've not run this yet to check the behaviour etc. but will do so when I have more time: obviously it will only work with WPF at the moment.


If you don't have time to fix these issues (which presumably have never affected you) then let us know and I'll try to do all the boring bits that are left over.

@@ -338,7 +338,7 @@ public void DrawRectangle(OxyRect rectangle, OxyColor fill, OxyColor stroke, dou
}

/// <inheritdoc/>
public void DrawRectangles(IList<OxyRect> rectangles, OxyColor fill, OxyColor stroke, double thickness, EdgeRenderingMode edgeRenderingMode)
public void DrawRectangles(IList<OxyRect> rectangles, OxyColor fill, OxyColor stroke, double thickness, EdgeRenderingMode edgeRenderingMode, double[] dashArray = null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused parameter (issue throughout file)

Copy link
Author

@KeithBrio KeithBrio Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VisualMelon What would your expectation to solve this be here to solve this?

Add a new specific method on IRenderContext and use it appropriately in calling classes?

As I noted initially, I hacked into these changes for my personal project years ago, and not familiar with the architecture or the design philosophy, so any direction is greatly appreciated.

@KeithBrio
Copy link
Author

KeithBrio commented Nov 15, 2023

All valid comments; I will make some amendments and push tonight.

@VisualMelon
Copy link
Contributor

Looks like GraphicsRenderContext also needs refitting (seems to be the cause of the CI failures https://github.com/oxyplot/oxyplot/actions/runs/6871073720/job/18698916339?pr=2051#step:4:743 )

@KeithBrio KeithBrio force-pushed the feature/2050-ability-to-set-marker-line-style-on-line-series branch from 92488e2 to 013b5af Compare November 15, 2023 23:07
@@ -269,6 +269,7 @@ public static void DrawMultilineText(this IRenderContext rc, ScreenPoint point,
/// <param name="stroke">The stroke color.</param>
/// <param name="strokeThickness">The stroke thickness.</param>
/// <param name="edgeRenderingMode">The edge rendering mode.</param>
/// <param name="dashArray"></param>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏ missing comment.

@@ -32,7 +32,8 @@ public interface IRenderContext
/// <param name="stroke">The stroke color. If set to <c>OxyColors.Undefined</c>, the extents will not be stroked.</param>
/// <param name="thickness">The thickness (in device independent units, 1/96 inch).</param>
/// <param name="edgeRenderingMode">The edge rendering mode.</param>
void DrawEllipse(OxyRect extents, OxyColor fill, OxyColor stroke, double thickness, EdgeRenderingMode edgeRenderingMode);
/// <param name="dashArray"></param>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏ missing comment.

@@ -42,10 +43,11 @@ public interface IRenderContext
/// <param name="stroke">The stroke color. If set to <c>OxyColors.Undefined</c>, the ellipses will not be stroked.</param>
/// <param name="thickness">The stroke thickness (in device independent units, 1/96 inch).</param>
/// <param name="edgeRenderingMode">The edge rendering mode.</param>
/// <param name="dashArray"></param>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏ missing comment.

@@ -133,7 +135,8 @@ public interface IRenderContext
/// <param name="stroke">The stroke color. If set to <c>OxyColors.Undefined</c>, the rectangle will not be stroked.</param>
/// <param name="thickness">The stroke thickness (in device independent units, 1/96 inch).</param>
/// <param name="edgeRenderingMode">The edge rendering mode.</param>
void DrawRectangle(OxyRect rectangle, OxyColor fill, OxyColor stroke, double thickness, EdgeRenderingMode edgeRenderingMode);
/// <param name="dashArray"></param>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏ missing comment.

@@ -143,10 +146,11 @@ public interface IRenderContext
/// <param name="stroke">The stroke color. If set to <c>OxyColors.Undefined</c>, the extents will not be stroked.</param>
/// <param name="thickness">The stroke thickness (in device independent units, 1/96 inch).</param>
/// <param name="edgeRenderingMode">The edge rendering mode.</param>
/// <param name="dashArray"></param>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏ missing comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy