[Bug] chord `lineStyle.color: 'gradient'` uses the previous layout after resize or setOption
Los mantenedores suelen responder en 1 día
@yqtian-se ya está trabajando en esto.
Desde el 22/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- data-visualization
Línea de trabajo
El reportero rastrea el error hasta ChordEdge.updateData, donde applyEdgeFill() se ejecuta antes de graphic.updateProps(el, { shape }), por lo que el degradado se construye a partir del el.shape anterior. Empieza ahí y comprueba si el degradado se calcula a partir de la nueva forma. Reproduce con el fragmento: cambia un valor de enlace y confirma que el degradado se mueve con la cinta en una sola llamada a setOption. Se considera terminado cuando el degradado coincide con un gráfico recién creado tras una única actualización o redimensionado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
6.1.0 (also current master 34f4d927e)
Link to Minimal Reproduction
option = {
animation: false,
series: [{
type: 'chord',
data: [{ name: 'A' }, { name: 'B' }, { name: 'C' }],
lineStyle: { color: 'gradient', opacity: 0.9 },
links: [
{ source: 'A', target: 'B', value: 40 },
{ source: 'B', target: 'C', value: 20 },
{ source: 'A', target: 'C', value: 10 }
]
}]
};
// 1 s: change the data. Ribbons get their new shape, but the gradients are computed from the old shape.
setTimeout(() => {
option.series[0].links[0].value = 2;
option.series[0].links[2].value = 60;
myChart.setOption(option);
}, 1000);
// 3 s: call setOption again with the SAME option. Nothing changes, yet the gradients jump to the correct position.
setTimeout(() => myChart.setOption(option), 3000);
Steps to Reproduce
- Create the chord chart above with
lineStyle.color: 'gradient'. - Update the data so the layout changes (resizing the chart triggers it too).
- Compare with a chart created directly with the final size or data.
- Calling
setOptionagain with the same option makes the gradients jump to the correct position.
Current Behavior
The ribbons have the new shape, but the source→target gradient is still positioned for the old shape. The colour transition is
offset from the ribbons. Each update uses the shape from one layout earlier.
Expected Behavior
The gradient follows the current ribbon shape, as in a fresh chart.
Environment
- OS: any (also reproduced with the SVG renderer in Node.js SSR)
- Browser: any
- Framework: none
Any additional comments?
Cause: in ChordEdge.updateData, for an existing element applyEdgeFill() runs before graphic.updateProps(el, { shape }).
applyEdgeFill builds the LinearGradient from el.shape, which still holds the old shape. 'source' and 'target' colours are not
affected. I can send a PR.
- Lenguaje dominante
- TypeScript
- Estrellas
- 67.8k
- 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
-
en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
[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
apache/echarts#21843 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug] Inverse axis collapses the grid with outerBoundsContain when a tick is near the axis edgePosiblemente ocupada @schizophrenicmaniac la tomó hace 3 días. Abiertoen pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/echarts#21839 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
en pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/echarts#21813 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/echarts
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
cursor/community-plugins#583 ·
Los mantenedores suelen responder en 1 día
-
afk-ok importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
enorm-labs/event-junkie#5404 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Wavvon/Wavvon-clients#493 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
answerLoops/answerLoops#679 ·
Los mantenedores suelen responder en 1 día