[Bug] Regression in 6.x: dataZoom slider showDataShadow renders nothing when the shadow-source series has a single data point on a time axis (NaN from zero-width extent)
@iamankushpandit ya está trabajando en esto.
Desde el 18/6/2026.
- #21658 de @jesco-absolut — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- data-visualization
Línea de trabajo
Empieza en SliderZoomView._renderDataShadow y reproduce el problema con el CodePen enlazado o con la opción de eje temporal de un solo punto. Compara el comportamiento de 6.x con 5.6.0, centrándote en la extensión de ancho cero y en la guarda de paso existente. Se considera terminado cuando la sombra de datos se renderiza sin coordenadas NaN para una fuente de un solo punto y sigue gestionando correctamente varias series.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
Affected: 6.0.0 and 6.1.0 (latest). Regression — works in 5.x (tested 5.3.2 and 5.6.0). Introduced in 6.0.0 (the time-axis dataShadow positioning; first present in 6.0.0-beta.1).
Link to Minimal Reproduction
Steps to Reproduce
- xAxis: { type: 'time' }, dataZoom: [{ type: 'slider', showDataShadow: true }].
- Give the shadow-source series a SINGLE data point.
- The slider shadow is empty/missing.
Minimal option (the slider shadow vanishes on 6.x; renders on 5.x):
option = {
xAxis: { type: 'time' },
yAxis: { type: 'value' },
dataZoom: [{ type: 'slider', showDataShadow: true }],
series: [{ type: 'line', data: [['2025-07-01', 285]] }]
};
Real-world variant: with multiple series, the first eligible series is
chosen as the shadow source, so a single-point first series breaks the
shadow even when later series are dense.
Current Behavior
In SliderZoomView._renderDataShadow (6.x), the time-axis branch computes:
normalizationConstant = size[0] / (thisDataExtent[1] - thisDataExtent[0]);
thisCoord = isTimeAxis ? (value - thisDataExtent[0]) * normalizationConstant : thisCoord + step;
For a single-point series the x-extent has zero width, so
normalizationConstant = Infinity and thisCoord = 0 * Infinity = NaN. The
shadow polygon receives a NaN vertex and does not render.
Measured shadow polygon on 6.1.0: points [[size,0],[0,0],[NaN,15]] (hasNaN=true).
On 5.3.2/5.6.0 the same option yields finite, step-based points (hasNaN=false).
Note the adjacent step path WAS guarded against divide-by-zero
(Math.max(1, data.count() - 1)); the new time-axis division was not.
Expected Behavior
A single-point (zero-width-extent) shadow source should render the same way
it did in 5.x (no NaN), or fall back gracefully — not erase the shadow.
Fix: guard the time-axis normalization when (thisDataExtent[1] -
thisDataExtent[0]) === 0 (e.g. fall back to the step-based coordinate or
clamp to 0), mirroring the existing Math.max guard on step.
Happy to PR this.
Environment
- OS: macOS 15
- Browser: Chrome 126
- Framework: Angular
Any additional comments?
This is distinct from the timeline component — the issue is specifically
in the dataZoom-slider shadow source-series selection.
The slider's data shadow is empty on 6.x. Switch the CDN to echarts/5.6.0 and the shadow appears — same option.
- Lenguaje dominante
- TypeScript
- Estrellas
- 67.7k
- Forks
- 19.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/echarts
-
[Bug] String formatter templates only replace the first occurrence of `{a}`/`{b}`/`{c}`Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoen pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
[Bug] Inverse axis collapses the grid with outerBoundsContain when a tick is near the axis edgePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoen pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
[Bug] The zoom cursor in the toolbox area is incorrectPosiblemente ocupada @waterWang la tomó hace 98 días. Abiertobug en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Todos los issues de apache/echarts
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
pollen-robotics/reachy-mini-desktop-app#341 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mike-north/AgentMonitors#648 ·
Los mantenedores suelen responder en 1 día
-
Position: a popup placed again from between two layout steps lands a fraction of a pixel offAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vercel-labs/ui#700 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días