(gd, opts, zrange)
| 806 | |
| 807 | // mocks our axis |
| 808 | function mockAxis(gd, opts, zrange) { |
| 809 | var fullLayout = gd._fullLayout; |
| 810 | |
| 811 | var axisIn = Lib.extendFlat({ |
| 812 | type: 'linear', |
| 813 | ticks: 'outside', |
| 814 | range: zrange, |
| 815 | showline: true |
| 816 | }, opts); |
| 817 | |
| 818 | var axisOut = { |
| 819 | type: 'linear', |
| 820 | _id: 'x' + opts._id |
| 821 | }; |
| 822 | |
| 823 | var axisOptions = { |
| 824 | letter: 'x', |
| 825 | font: fullLayout.font, |
| 826 | noAutotickangles: true, |
| 827 | noHover: true, |
| 828 | noTickson: true |
| 829 | }; |
| 830 | |
| 831 | function coerce(attr, dflt) { |
| 832 | return Lib.coerce(axisIn, axisOut, axisLayoutAttrs, attr, dflt); |
| 833 | } |
| 834 | |
| 835 | handleAxisDefaults(axisIn, axisOut, coerce, axisOptions, fullLayout); |
| 836 | handleAxisPositionDefaults(axisIn, axisOut, coerce, axisOptions); |
| 837 | |
| 838 | return axisOut; |
| 839 | } |
| 840 | |
| 841 | function fitTextInsideBox(textBB, width, height) { |
| 842 | // compute scaling ratio to have text fit within specified width and height |
no test coverage detected
searching dependent graphs…