File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ const AxisPainterMethods = {
304304
305305 /** @summary Produce axis ticks */
306306 produceTicks ( ndiv , ndiv2 ) {
307- if ( ! this . noticksopt ) {
307+ if ( ! this . noticksopt && ! this . exact_ticks ) {
308308 const total = ndiv * ( ndiv2 || 1 ) ;
309309
310310 if ( this . log )
@@ -577,14 +577,18 @@ class TAxisPainter extends ObjectPainter {
577577 else
578578 this . gr = this . func ;
579579
580- delete this . format ; // remove formatting func
580+ delete this . format ; // remove formatting func
581581
582582 let ndiv = 508 ;
583583 if ( this . is_gaxis )
584584 ndiv = axis . fNdiv ;
585585 else if ( axis )
586- ndiv = axis . fNdivisions ? Math . max ( axis . fNdivisions , 4 ) : 0 ;
586+ ndiv = axis . fNdivisions ;
587587
588+ this . exact_ticks = ndiv < 0 ;
589+ if ( this . exact_ticks )
590+ ndiv = Math . abs ( ndiv ) ;
591+ ndiv = Math . max ( ndiv , 4 ) ;
588592 this . nticks = ndiv % 100 ;
589593 this . nticks2 = ( ndiv % 10000 - this . nticks ) / 100 ;
590594 this . nticks3 = Math . floor ( ndiv / 10000 ) ;
You can’t perform that action at this time.
0 commit comments