mirror of
https://github.com/4cuck/nitter-status.git
synced 2026-10-27 00:57:39 +00:00
add annotations and color fixup
This commit is contained in:
1 parent
00bf7c701a
commit
5ccc610a59
1 file changed
+18
-1
@@ -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.";
|
||||
|
||||
Reference in new issue
Block a user