From 88db9b66380222a692c8abb5aaa4139690a40563 Mon Sep 17 00:00:00 2001 From: Eric Hiller Date: Wed, 31 Jan 2024 06:51:09 -0600 Subject: [PATCH] Update PlotGen.cs Single decimal point in the case of `AxisType.Percent` --- src/PlotGitHubAction/PlotGen.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PlotGitHubAction/PlotGen.cs b/src/PlotGitHubAction/PlotGen.cs index 07d662a..240345b 100644 --- a/src/PlotGitHubAction/PlotGen.cs +++ b/src/PlotGitHubAction/PlotGen.cs @@ -105,7 +105,7 @@ private static void createPlot( string jsonString, string plotDefinitionsDir ) { */ Func? tickGen = config.YAxisType switch { - AxisType.Percent => static v => $"{v:p0}", + AxisType.Percent => static v => $"{v:p1}", AxisType.Numeric => static v => $"{v:n0}", _ => null }; @@ -124,8 +124,8 @@ private static void createPlot( string jsonString, string plotDefinitionsDir ) { plt.SetAxisLimits( bottom: 0 ); Log.Debug( $"YAxis min={plt.YAxis.Min}" ); Log.Debug( $"LeftAxis min={plt.LeftAxis.Min}" ); - // plt.Margins( horizontal: 0.05D, vertical: 0.0, apply: true ); // URGENT: restore? - plt.Margins( 0, 0 ); + plt.Margins( horizontal: 0.05D, vertical: 0.0, apply: true ); // URGENT: restore? + // plt.Margins( 0, 0 ); // URGENT: restore? foreach ( var axis in plt.XAxes ){ axis.FrameLineStyle.Color = new Color(0, 0, 0, 0); }