[Bug] Graph on cartesian2d is misplaced after setOption from a graph on the default (view) coordinate system
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
調査の方向性
原因は GraphView.render にあります。ビュー座標系の変換は、系列が独自の View 座標系を持つ場合にのみ mainGroup へ適用されるため、再利用されたビューでは古い変換が残ってしまいます。まずそのブランチと、描画の間でグループがどのようにリセットされるかを読んでください。notMerge: true 付きの setOption の後で cartesian2d のグラフが、cartesian オプションで直接作成したチャートと同じように軸に揃っていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 67.8k
- フォーク
- 19.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/echarts のほかの issue
-
en pending
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Bug] chord `lineStyle.color: 'gradient'` uses the previous layout after resize or setOption対応中かも @yqtian-se が今日担当しました。 オープンen pending
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/echarts#21854 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] String formatter templates only replace the first occurrence of `{a}`/`{b}`/`{c}`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンen pending
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
apache/echarts#21843 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Inverse axis collapses the grid with outerBoundsContain when a tick is near the axis edge対応中かも @schizophrenicmaniac が 3 日前に担当しました。 オープンen pending
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/echarts#21839 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
en pending
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/echarts#21813 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cursor/community-plugins#583 ·
メンテナーはふだん 1 日以内に返信
-
afk-ok importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
enorm-labs/event-junkie#5404 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Wavvon/Wavvon-clients#493 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
answerLoops/answerLoops#679 ·
メンテナーはふだん 1 日以内に返信