Skip to content

Commit

Permalink
Rename some local variables in computeExtraDefaultMargins
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Grunau committed Jul 27, 2017
1 parent 19aead4 commit a71fccd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FSharp.Charting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1960,14 +1960,14 @@ namespace FSharp.Charting
| Charting.Docking.Bottom -> (0, 0, 0, margin)
| _ -> (0, 0, 0, 0)

let extraLegendMargins =
let extraMarginsForLegend =
match legendAndTitleSubCharts |> List.tryPick (fun ch -> ch.TryLegend) with
| None -> (0, 0, 0, 0)
| Some leg when leg.Enabled && not leg.IsDockedInsideChartArea ->
getSingleSideMargins leg.Docking DefaultExtraMarginForLegendIfPresent
| _ -> (0, 0, 0, 0)

let extraTitleMargins =
let extraMarginsForTitle =
match legendAndTitleSubCharts |> List.tryPick (fun ch -> ch.TryTitle) with
| None -> (0, 0, 0, 0)
| Some title when not title.IsDockedInsideChartArea ->
Expand All @@ -1977,7 +1977,7 @@ namespace FSharp.Charting
let pickMaxMargins (al, at, ar, ab) (bl, bt, br, bb) =
(max al bl, max at bt, max ar br, max ab bb)

[extraLegendMargins; extraTitleMargins]
[extraMarginsForLegend; extraMarginsForTitle]
|> List.fold pickMaxMargins margins

let rec layoutSubCharts (srcSubChart:GenericChart) (l, t, r, b) =
Expand Down

0 comments on commit a71fccd

Please sign in to comment.