Skip to content
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

How can I change touchOverlay line color #212

Open
erdemildiz opened this issue Jul 5, 2022 · 2 comments
Open

How can I change touchOverlay line color #212

erdemildiz opened this issue Jul 5, 2022 · 2 comments

Comments

@erdemildiz
Copy link

Hello, I can change infobox style with below codes

BarChartStyle(
            infoBoxPlacement: .floating,
            infoBoxValueFont: .system(size: 12),
            infoBoxBackgroundColour: .red,
            infoBoxBorderColour: .blue,
            infoBoxBorderStyle: .init(lineWidth: 5),
            xAxisLabelFont: .system(size: 10),
            xAxisLabelsFrom: .dataPoint(rotation: .degrees(-45)),
            yAxisGridStyle: gridStyle,
            yAxisLabelPosition: .leading,
            yAxisLabelFont: .system(size: 10),
            baseline: .zero,
            topLine: .maximumValue)

but I can't change touchoverlay color. Is there any way to change this color?

Simulator Screen Shot - iPhone 13 mini - 2022-07-05 at 13 52 52

@erdemildiz
Copy link
Author

@willdale Could you help me?

@tsudan
Copy link

tsudan commented Jul 12, 2023

the BarChartStyle has a property markerType which will accept the MarkerType enum where we can set the color of the marker as well as its stroke style.

BarChartStyle (
    ...
    markerType: .vertical(colour: .red, style: StrokeStyle()),
    ...
)

The followings are different values for markerType

public enum BarMarkerType: MarkerType {

    /// No overlay markers.
    case none

    /// Vertical line from top to bottom.
    case vertical(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())

    /// Full width and height of view intersecting at a specified point.
    case full(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())

    /// From bottom and leading edges meeting at a specified point.
    case bottomLeading(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())

    /// From bottom and trailing edges meeting at a specified point.
    case bottomTrailing(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())

    /// From top and leading edges meeting at a specified point.
    case topLeading(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())

    /// From top and trailing edges meeting at a specified point.
    case topTrailing(colour: Color = Color.primary, style: StrokeStyle = StrokeStyle())
}

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

No branches or pull requests

2 participants