File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 249249 scales : {
250250 y : {
251251 beginAtZero : true ,
252- max : 20 ,
253252 ticks : {
254- stepSize : 5 ,
253+ stepSize : 250 ,
255254 callback : function ( value ) {
256- return value % 5 === 0 ? value : '' ;
255+ return value % 250 === 0 ? value : '' ;
257256 } ,
258257 color : 'white' ,
259258 } ,
360359 ] ;
361360 charts . goRuntime . update ( ) ;
362361
362+ const maxTxValue = Math . max (
363+ metrics . tx_submit_count ,
364+ metrics . tx_submit_fail_count
365+ ) ;
366+
367+ const txMaxScale = Math . ceil ( maxTxValue / 100 ) * 100 + 500 ; //buffer of 500
368+
369+ charts . tx . options . scales . y . max = txMaxScale ;
370+ console . log ( 'txMaxScale' , txMaxScale ) ;
363371 charts . tx . data . datasets [ 0 ] . data = [
364372 metrics . tx_submit_count ,
365373 metrics . tx_submit_fail_count ,
366374 ] ;
367-
368375 charts . tx . update ( ) ;
369376 }
370377
You can’t perform that action at this time.
0 commit comments