[Bug] chord `lineStyle.color: 'gradient'` uses the previous layout after resize or setOption
メンテナーはふだん 1 日以内に返信
@yqtian-se がすでに取り組んでいます。
2026年11月22日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
報告者はバグを ChordEdge.updateData まで追跡しています。そこでは graphic.updateProps(el, { shape }) より前に applyEdgeFill() が実行されるため、グラデーションが古い el.shape から作られています。まずそこから始めて、グラデーションが新しい形状から計算されているかを確認してください。スニペットで再現します。リンクの値を変更し、1 回の setOption 呼び出しでグラデーションがリボンと一緒に動くことを確認してください。単一の更新またはリサイズの後で、グラデーションが新規作成したチャートと一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- 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 日以内に返信
-
en pending
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 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 日以内に返信