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 }) => {
6969 const draw = ( state : AppState ) => {
7070 const { width, height } = canvas ;
7171 const { buckets, minValue, maxValue } = state [ dataKey ] as MetricData ;
72-
7372 const range = maxValue - minValue ;
7473
7574 const ctx = canvas . getContext ( '2d' ) ! ;
@@ -87,6 +86,13 @@ const MetricGraph = ({ name } : { name: string }) => {
8786 return ;
8887 }
8988
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+
9096 // Latest data
9197 const points = buckets . length > width ? buckets . slice ( buckets . length - width ) : buckets ;
9298 let minPoint : PlotPoint = { x : 0 , y : 0 , value : 0 } ;
You can’t perform that action at this time.
0 commit comments