From bf8ddcb73830d4103907a4290df07f80d08ada7b Mon Sep 17 00:00:00 2001 From: Eveldee Date: Mon, 22 Apr 2019 17:27:34 +0200 Subject: [PATCH] Fix value format on charts --- .../PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs index 70d71dc..2a87f02 100644 --- a/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs +++ b/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs @@ -148,15 +148,15 @@ namespace PlantBox.Client.Forms.Plant { case CaptorType.Humidity: values = historicEntries.Humidities; - valueSpecifier = "%"; + valueSpecifier = "{0:F1} %"; break; case CaptorType.Luminosity: values = historicEntries.Luminosities; - valueSpecifier = "lux"; + valueSpecifier = "{0:F0} lux"; break; case CaptorType.Temperature: values = historicEntries.Temperatures; - valueSpecifier = "°C"; + valueSpecifier = "{0:F1} °C"; break; default: throw new InvalidOperationException(); @@ -174,7 +174,7 @@ namespace PlantBox.Client.Forms.Plant entries[index] = new Entry((float)value.Value) { Label = value.Date.ToString(labelFormat), - ValueLabel = $"{value.Value} {valueSpecifier}", + ValueLabel = string.Format(valueSpecifier, value.Value), Color = colors[index] };