Skip to content
Snippets Groups Projects
Commit 2a9c099c authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#5 - add a little spacing so that the max y value is not cut because the...

#5 - add a little spacing so that the max y value is not cut because the y-axis is exactly on the same value
parent e51951b0
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ class SensorLineChartTile(Tile):
}
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
MAX_Y_AXIS_SPACING = 2
def __init__(self, uniqueName: str, settings: Dict, intervalInSeconds: int):
super().__init__(uniqueName, settings, intervalInSeconds)
......@@ -92,7 +93,7 @@ class SensorLineChartTile(Tile):
cacheKey = f'{pageName}_{self._uniqueName}_minMax'
minMaxData = storageLeafService.get_data(cacheKey, self._intervalInSeconds, minMaxSettings)
LOGGER.debug(f'Received min/max: {minMaxData} for sensorIDs: {self._settings["sensorIDsForMinMax"]}')
return min(0, minMaxData['min']), minMaxData['max']
return min(0, minMaxData['min']), minMaxData['max'] + self.MAX_Y_AXIS_SPACING
def __prepare_measurement_data(self, measurements: List[Dict]) -> Tuple[List[str], List[str]]:
x = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment