@@ -631,34 +631,38 @@ function greaterOrEqual(v0, v1) { return v0 >= v1; }
631631
632632function applyAutorangeMinOptions ( v , ax ) {
633633 if (
634- ax . autorangemin !== undefined &&
635- hasValidMinAndMax ( ax , ax . autorangemin , ax . autorangemax )
634+ ax . autorangeoptions &&
635+ ax . autorangeoptions . minallowed !== undefined &&
636+ hasValidMinAndMax ( ax , ax . autorangeoptions . minallowed , ax . autorangeoptions . maxallowed )
636637 ) {
637- return ax . autorangemin ;
638+ return ax . autorangeoptions . minallowed ;
638639 }
639640
640641 if (
641- ax . autorangeclipmin !== undefined &&
642- hasValidMinAndMax ( ax , ax . autorangeclipmin , ax . autorangeclipmax )
642+ ax . autorangeoptions &&
643+ ax . autorangeoptions . clipmin !== undefined &&
644+ hasValidMinAndMax ( ax , ax . autorangeoptions . clipmin , ax . autorangeoptions . clipmax )
643645 ) {
644- return Math . max ( v , ax . d2l ( ax . autorangeclipmin ) ) ;
646+ return Math . max ( v , ax . d2l ( ax . autorangeoptions . clipmin ) ) ;
645647 }
646648 return v ;
647649}
648650
649651function applyAutorangeMaxOptions ( v , ax ) {
650652 if (
651- ax . autorangemax !== undefined &&
652- hasValidMinAndMax ( ax , ax . autorangemin , ax . autorangemax )
653+ ax . autorangeoptions &&
654+ ax . autorangeoptions . maxallowed !== undefined &&
655+ hasValidMinAndMax ( ax , ax . autorangeoptions . minallowed , ax . autorangeoptions . maxallowed )
653656 ) {
654- return ax . autorangemax ;
657+ return ax . autorangeoptions . maxallowed ;
655658 }
656659
657660 if (
658- ax . autorangeclipmax !== undefined &&
659- hasValidMinAndMax ( ax , ax . autorangeclipmin , ax . autorangeclipmax )
661+ ax . autorangeoptions &&
662+ ax . autorangeoptions . clipmax !== undefined &&
663+ hasValidMinAndMax ( ax , ax . autorangeoptions . clipmin , ax . autorangeoptions . clipmax )
660664 ) {
661- return Math . min ( v , ax . d2l ( ax . autorangeclipmax ) ) ;
665+ return Math . min ( v , ax . d2l ( ax . autorangeoptions . clipmax ) ) ;
662666 }
663667 return v ;
664668}
@@ -669,8 +673,8 @@ function hasValidMinAndMax(ax, min, max) {
669673 min !== undefined &&
670674 max !== undefined
671675 ) {
672- min = ax . d2l ( ax . autorangeclipmin ) ;
673- max = ax . d2l ( ax . autorangeclipmax ) ;
676+ min = ax . d2l ( ax . autorangeoptions . clipmin ) ;
677+ max = ax . d2l ( ax . autorangeoptions . clipmax ) ;
674678 return min < max ;
675679 }
676680 return true ;
@@ -679,12 +683,12 @@ function hasValidMinAndMax(ax, min, max) {
679683// this function should be (and is) called before reversing the range
680684// so range[0] is the minimum and range[1] is the maximum
681685function applyAutorangeOptions ( range , ax ) {
682- if ( ! ax ) return range ;
686+ if ( ! ax || ! ax . autorangeoptions ) return range ;
683687
684688 var min = range [ 0 ] ;
685689 var max = range [ 1 ] ;
686690
687- var include = ax . autorangeinclude ;
691+ var include = ax . autorangeoptions . include ;
688692 if ( include !== undefined ) {
689693 var lMin = ax . d2l ( min ) ;
690694 var lMax = ax . d2l ( max ) ;
0 commit comments