[Bug] Graph on cartesian2d is misplaced after setOption from a graph on the default (view) coordinate system
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
- Área
- data-visualization
Línea de trabajo
La causa está indicada en GraphView.render: la transformación del sistema de coordenadas View se aplica a mainGroup solo cuando la serie tiene su propio sistema de coordenadas View, por lo que una View reutilizada conserva la transformación anterior. Empieza leyendo esa rama y cómo se restablece el grupo entre renderizados. Está terminado cuando el gráfico cartesian2d, tras setOption con notMerge: true, se alinea con los ejes igual que un gráfico creado directamente con la opción cartesian.
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
const viewGraph = {
series: [{
type: 'graph', layout: 'none', symbolSize: 20,
data: [{ name: 'p', x: 0, y: 0 }, { name: 'q', x: 1000, y: 10 }],
links: [{ source: 'p', target: 'q' }]
}]
};
const cartesianGraph = {
xAxis: { type: 'category', boundaryGap: false, data: ['a', 'b', 'c'] },
yAxis: { type: 'value' },
series: [{
type: 'graph', layout: 'none', coordinateSystem: 'cartesian2d', symbolSize: 20,
data: [10, 30, 20],
links: [{ source: 0, target: 1 }, { source: 1, target: 2 }]
}]
};
option = viewGraph;
// After 1 s, switch to the cartesian graph. Its nodes don't line up with the axes:
setTimeout(() => myChart.setOption(cartesianGraph, { notMerge: true }), 1000);
Steps to Reproduce
- Render a graph series on its default
viewcoordinate system (layout: 'none'with x/y). setOptionan option whose graph series is oncartesian2d(withnotMerge: truehere; withroam: trueorfalsealike).
Current Behavior
The nodes and edges of the cartesian graph are scaled and translated by the transform of the previous view graph, so they do not
line up with the axes.
Expected Behavior
The graph is placed on the grid exactly as in a chart created directly with the cartesian option.
Environment
- OS: any (also reproduced with the SVG renderer in Node.js SSR)
- Browser: any
- Framework: none
Any additional comments?
Cause: GraphView.render applies the view coordinate system's transform to its main group only when the series has its own View
coordinate system (if (ownCoordSys) applyViewCoordSysTransToElement(mainGroup, ...)). When the reused view later renders a graph on
an external coordinate system, the old transform is never reset. 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
-
[Bug] chord `lineStyle.color: 'gradient'` uses the previous layout after resize or setOptionPosiblemente ocupada @yqtian-se la tomó hoy. Abiertoen pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/echarts#21854 · 2 comentarios ·
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