(traceIn, traceOut, defaultColor, layout, coerce)
| 11 | var isTypedArraySpec = require('../../lib/array').isTypedArraySpec; |
| 12 | |
| 13 | function handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { |
| 14 | coerce('line.shape'); |
| 15 | coerce('line.hovertemplate'); |
| 16 | coerce('line.hovertemplatefallback'); |
| 17 | |
| 18 | var lineColor = coerce('line.color', layout.colorway[0]); |
| 19 | if (hasColorscale(traceIn, 'line') && Lib.isArrayOrTypedArray(lineColor)) { |
| 20 | if (lineColor.length) { |
| 21 | coerce('line.colorscale'); |
| 22 | colorscaleDefaults(traceIn, traceOut, layout, coerce, { prefix: 'line.', cLetter: 'c' }); |
| 23 | return lineColor.length; |
| 24 | } else { |
| 25 | traceOut.line.color = defaultColor; |
| 26 | } |
| 27 | } |
| 28 | return Infinity; |
| 29 | } |
| 30 | |
| 31 | function dimensionDefaults(dimensionIn, dimensionOut) { |
| 32 | function coerce(attr, dflt) { |
no test coverage detected
searching dependent graphs…