plotly / plotly/angular-plotly.js
Issue with Legend Not Adjusting when dynamically adding a new y-axis.
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 242
- フォーク
- 81
- 平均マージ
- 8時間 48分
- マージ済み PR(30日)
- 18
説明
Hi, I am currently facing issues adjusting the legend of a plot when a new trace with a new y-axis is added to the plot.
Somehow the legend seems to be overlayed on the newly added y-axis title.
This is my current code set-up:
Angular Template:
<plotly-plot #plotlygraph [style]="{position: 'relative', width: '100%', height: '100%'}"
[useResizeHandler]="true"></plotly-plot>
Angular Component:
// Initial Layout
layout = {
title: 'Anomaly Plot',
autosize: true,
xaxis: {
autorange: true,
type: 'date',
title: { text: 'DateTime' },
},
yaxis: {
autorange: true,
type: 'linear',
title: { text: '°C' },
},
};
// Add new trace with a new y-axis
layout[yaxis2] = {
autorange: true,
type: 'linear',
side: 'right',
title: { text: 'mA' },
};
According to this example here the legend seems to have been adjusted automatically without any further configuration.
Is there a configuration am missing? if not, how can I achieve adjusting the label not to overlay the newly added y-axis?

コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue に示されている Angular テンプレートとコンポーネントレイアウトから始め、リンクされている CodePen の例と動的な y 軸の追加を比較します。追加した yaxis2 を使ってプロットを再現し、関連する legend または layout の設定を特定します。完了条件は、凡例が新しく追加した y 軸のタイトルと重ならなくなることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100