File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,10 @@ function barChart(data) {
251251 . attr ( 'class' , 'd3-tip' )
252252 . offset ( [ - 10 , 0 ] )
253253 . html ( function ( d ) {
254- return "<strong>" + convertShortSummaryTimeToLongString ( d . total ) + "</strong>" ;
254+ if ( data . length > 9 )
255+ return "<strong><span class='red-label'>" + d . date + "</span></strong></br><strong>" + convertShortSummaryTimeToString ( d . total ) + "</strong>" ;
256+ else
257+ return "<strong>" + convertShortSummaryTimeToString ( d . total ) + "</strong>" ;
255258 } ) ;
256259
257260 svg . call ( tip ) ;
@@ -276,4 +279,7 @@ function barChart(data) {
276279 svg . append ( "g" )
277280 . attr ( "transform" , "translate(0," + height + ")" )
278281 . call ( d3 . axisBottom ( x ) ) ;
282+
283+ if ( data . length > 9 )
284+ document . querySelectorAll ( '#barChart g.tick ' ) . forEach ( element => { element . remove ( ) } ) ;
279285}
Original file line number Diff line number Diff line change 8787 top : 100% ;
8888 left : 0 ;
8989}
90+
91+ .red-label {
92+ color : red;
93+ }
You can’t perform that action at this time.
0 commit comments