(specifier)
| 110036 | } |
| 110037 | |
| 110038 | function variablePrecision(specifier) { |
| 110039 | var s = (0, _d3Format.formatSpecifier)(specifier || ','); |
| 110040 | |
| 110041 | if (s.precision == null) { |
| 110042 | s.precision = 12; |
| 110043 | |
| 110044 | switch (s.type) { |
| 110045 | case '%': |
| 110046 | s.precision -= 2; |
| 110047 | break; |
| 110048 | |
| 110049 | case 'e': |
| 110050 | s.precision -= 1; |
| 110051 | break; |
| 110052 | } |
| 110053 | |
| 110054 | return trimZeroes((0, _d3Format.format)(s), // number format |
| 110055 | (0, _d3Format.format)('.1f')(1)[1] // decimal point character |
| 110056 | ); |
| 110057 | } else { |
| 110058 | return (0, _d3Format.format)(s); |
| 110059 | } |
| 110060 | } |
| 110061 | |
| 110062 | function trimZeroes(format, decimalChar) { |
| 110063 | return function (x) { |
no test coverage detected