-
Notifications
You must be signed in to change notification settings - Fork 982
Closed
Description
I think the bug is here (it always assumes values are positive):
ScottPlot/src/ScottPlot4/ScottPlot/Plottable/BarSeries.cs
Lines 49 to 71 in 4008bdf
| private RectangleF GetPixelRect(PlotDimensions dims, Bar bar) | |
| { | |
| if (bar.IsVertical) | |
| { | |
| float left = dims.GetPixelX(bar.Position - bar.Thickness / 2); | |
| float right = dims.GetPixelX(bar.Position + bar.Thickness / 2); | |
| float bottom = dims.GetPixelY(bar.ValueBase); | |
| float top = dims.GetPixelY(bar.Value); | |
| float width = right - left; | |
| float height = bottom - top; | |
| return new RectangleF(left, top, width, height); | |
| } | |
| else | |
| { | |
| float left = dims.GetPixelX(bar.ValueBase); | |
| float right = dims.GetPixelX(bar.Value); | |
| float top = dims.GetPixelY(bar.Position + bar.Thickness / 2); | |
| float bottom = dims.GetPixelY(bar.Position - bar.Thickness / 2); | |
| float width = right - left; | |
| float height = bottom - top; | |
| return new RectangleF(left, top, width, height); | |
| } | |
| } |
Spillover from #2145
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels