-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
Description
When I try to orient a legend, YAnchorPosition works as I expect but XAnchorPosition does not seem to have an effect.
Repro steps
#r "nuget: Plotly.NET"
open Plotly.NET
let xs = [1.0 .. 4]
let y1 = xs |> List.map (fun x -> x * 2.0)
let y2 = xs |> List.map (fun x -> x * 3.0)These charts look the same to me:
// left
[Chart.Line (xs, y1); Chart.Line (xs, y2)]
|> Chart.combine
|> Chart.withTitle("Left")
|> Chart.withLegendStyle(Orientation=StyleParam.Orientation.Horizontal,
X=0,
XAnchor=StyleParam.XAnchorPosition.Left)
|> Chart.show
// right
[Chart.Line (xs, y1); Chart.Line (xs, y2)]
|> Chart.combine
|> Chart.withTitle("Right")
|> Chart.withLegendStyle(Orientation=StyleParam.Orientation.Horizontal,
X=0,
XAnchor=StyleParam.XAnchorPosition.Right)
|> Chart.showExpected behavior
I expect the left chart to be as it is but I expect the right chart's legend to be right-aligned at x=0.
Actual behavior
the legend positions are the same.
Related information
- Operating system Windows 11
- .NET 6,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

