File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
dashboard2/src/components Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ const MetricGraph = ({ name } : { name: string }) => {
69
69
const draw = ( state : AppState ) => {
70
70
const { width, height } = canvas ;
71
71
const { buckets, minValue, maxValue } = state [ dataKey ] as MetricData ;
72
-
73
72
const range = maxValue - minValue ;
74
73
75
74
const ctx = canvas . getContext ( '2d' ) ! ;
@@ -87,6 +86,13 @@ const MetricGraph = ({ name } : { name: string }) => {
87
86
return ;
88
87
}
89
88
89
+ // Hour lines
90
+ const hourInterval = Math . round ( width / 24 ) ;
91
+ for ( let x = 0 ; x < 24 ; x += 3 ) {
92
+ ctx . fillStyle = ( x % 6 === 0 ) ? Theme . palette . grey5 : Theme . palette . grey2 ;
93
+ ctx . fillRect ( x * hourInterval , 0 , 1 , height ) ;
94
+ }
95
+
90
96
// Latest data
91
97
const points = buckets . length > width ? buckets . slice ( buckets . length - width ) : buckets ;
92
98
let minPoint : PlotPoint = { x : 0 , y : 0 , value : 0 } ;
You can’t perform that action at this time.
0 commit comments