(
xAxisScale: 'auto' | XScale | undefined,
{continuousX, xValues}: DomainState,
hasLinearAxisDefinition: boolean,
)
| 226 | : []; |
| 227 | |
| 228 | export const getResolvedXScale = ( |
| 229 | xAxisScale: 'auto' | XScale | undefined, |
| 230 | {continuousX, xValues}: DomainState, |
| 231 | hasLinearAxisDefinition: boolean, |
| 232 | ): XScale => |
| 233 | xAxisScale == CATEGORY || xAxisScale == LINEAR || xAxisScale == TIME |
| 234 | ? xAxisScale |
| 235 | : continuousX || (arrayIsEmpty(xValues) && hasLinearAxisDefinition) |
| 236 | ? LINEAR |
| 237 | : !arrayIsEmpty(xValues) && |
| 238 | arrayEvery( |
| 239 | xValues, |
| 240 | (xValue) => |
| 241 | isString(xValue) && |
| 242 | isFiniteNumber(normalizeTimeValue(xValue, MILLISECOND)), |
| 243 | ) |
| 244 | ? TIME |
| 245 | : CATEGORY; |
| 246 | |
| 247 | export const getXScaleDomain = ( |
| 248 | [xMin, xMax]: Bounds, |
no test coverage detected
searching dependent graphs…