Table Unable to Become Invisible with 'updatemenus' Buttons
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
I love plotly.js, such a fantastic library. I have very little javascript knowledge and yet have accomplished quite a lot. Unfortunately, I have run into a problem with the layout/updatemenus buttons. I am trying to create a set of buttons that would allow a user to switch from a "Chart" mode to a "Table" mode. When the user clicks "Table", it successfully displays the table, as you can see from the included codepen. Unfortunately, once the table is set to visible, it will never leave the screen, no matter what you select. The table continues to obscure the chart after you select "Chart".
https://codepen.io/rar83/pen/OJVvXWW
If this is indeed a bug, could someone possibly point out an alternative way of doing this? Or it is quite possible I am just using the plotly.js badly.
I have included a portion of the relevant code to show how I am turning on/off visibility, just as the documentation shows.
var updatemenus=[
{
buttons: [
{
args: [{'visible': [true, true, true, true, false]},{'xaxis.visible': true, 'yaxis.visible': true, 'autosize': true}],
label: 'Chart',
method: 'update'
},
{
args: [{'visible': [false, false, false, false, true]},{'xaxis.visible': false, 'yaxis.visible': false, 'autosize': false, 'width': 500}],
label: 'Table',
method:'update'
}
],
direction: 'left',
pad: {'r': 5, 't': 5},
showactive: true,
type: 'buttons',
x: 0.01,
xanchor: 'left',
y: 1.1,
yanchor: 'middle',
font: {size: '30'}
}
]
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた CodePen と提供された layout/updatemenus 設定から始め、Chart ボタンと Table ボタンの method: 'update' 呼び出しと、それらの visible 配列を追跡します。両方の遷移を再現し、Chart を選択するとテーブルが削除され、グラフのレイアウトが復元されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100