[Feature request]: change height sizing policy of plotly htmlwidget to 100%
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Can we change the default widget height sizing policy set in as_widget to 100%. Right now it is 400px and this makes it hard to make a plot to fill its container along the height.
For example, I am hoping to use the following simplified example to change my plot to height 5in. It does not work (for me), because the style of the resulting htmlwidget is set to the default "400px"
tags$div(style="width: 100%; height: 5in",
plot_ly(x=1, y=1, type="scatter", mode="markers")
)
The following on the other hand does the job.
tags$div(style="width: 100%; height: 5in",
plot_ly(x=1, y=1, type="scatter", mode="markers") %T>% {
.$sizingPolicy$defaultHeight<-"100%"
}
)
It seems to me that a default height of "100%", like the default for width, makes more sense (allowing for the container to control the size) than the arbitrary "400px" used right now.
I really would like to control the height of my plots in a R markdown html document and this was the only solution I could come up with: R plotly seems to deal fine with "px" units, but setting inches and % did not work. Perhaps I am missing something...
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
as_widget エントリーポイントから始め、デフォルトの sizingPolicy の height がどのように割り当てられるかを調べます。5in のコンテナを使って tags$div の例を再現し、デフォルトの height が 100% の場合に widget がコンテナの height を使用することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100