(v, ax)
| 654 | } |
| 655 | |
| 656 | function applyAutorangeMaxOptions(v, ax) { |
| 657 | var autorangeoptions = ax.autorangeoptions; |
| 658 | |
| 659 | if( |
| 660 | autorangeoptions && |
| 661 | autorangeoptions.maxallowed !== undefined && |
| 662 | hasValidMinAndMax(ax, autorangeoptions.minallowed, autorangeoptions.maxallowed) |
| 663 | ) { |
| 664 | return autorangeoptions.maxallowed; |
| 665 | } |
| 666 | |
| 667 | if( |
| 668 | autorangeoptions && |
| 669 | autorangeoptions.clipmax !== undefined && |
| 670 | hasValidMinAndMax(ax, autorangeoptions.clipmin, autorangeoptions.clipmax) |
| 671 | ) { |
| 672 | return Math.min(v, ax.d2l(autorangeoptions.clipmax)); |
| 673 | } |
| 674 | |
| 675 | return v; |
| 676 | } |
| 677 | |
| 678 | function hasValidMinAndMax(ax, min, max) { |
| 679 | // in case both min and max are defined, ensure min < max |
no test coverage detected
searching dependent graphs…