diff --git a/server/static/history.js b/server/static/history.js index 5c1b63f..6e71ca3 100644 --- a/server/static/history.js +++ b/server/static/history.js @@ -15,7 +15,8 @@ async function loadGraph() { rangeSelectorPlotFillColor: 'MediumSlateBlue', rangeSelectorPlotFillGradientColor: 'rgba(123, 104, 238, 0)', colorValue: 0.9, - fillAlpha: 0.4 + fillAlpha: 0.4, + colors: ['#008000', '#ffa500'], /*rollPeriod: 14, showRoller: true, customBars: true, @@ -27,6 +28,22 @@ async function loadGraph() { fillAlpha: 0.4*/ } ); + g.ready(function() { + g.setAnnotations([ + { + series: "Temperature", + x: "2023-05-18", + shortText: "G", + text: "First API Change" + }, + { + series: "Temperature", + x: "2024-01-24", + shortText: "D", + text: "API Shutdown" + } + ]); + }); } catch (error) { console.error('Failed to fetch data:', error); graphDiv.textContent = "Failed to load data.";