Discrete axis fails to remove "interior" categories in response to filter interactions
還沒有人認領這個 Issue。
- 主要語言
- R
- 星號
- 2.7k
- 分支
- 641
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I am using the example from the plotly page to generate a bar plot. I am also using plotly devel version 4.3.4. Here is the code:
library(plotly)
df <- data.frame(x = as.factor(LETTERS[1:5]),
y = sample(10:20, size = 5))
# First change factor levels
df$x <- factor(df$x, levels = c("C", "B", "A", "D", "E"))
# Plot
p <- ggplot(df, aes(x, y, fill = x)) +
geom_bar(stat = "identity") +
ggtitle("Bar Chart with changed factor levels")
ggplotly(p)
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotly_4.3.4 ggplot2_2.1.0 BiocInstaller_1.23.6
On the plot.ly page, when I click on one of the bars in the middle (blue/green) the plot gets autoscaled and the placeholders disappear. But when I generate the plot using the code in R and click on the middle bars, the placeholders are still there.
Here I have clicked A to remove that bar but as you can see the placeholder remains:
When I click on the bars at either end, the plot auto-adjusts and placeholders are removed. How can I remove the placeholders when clicking one of the middle bars?
Thanks!
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先使用 plotly 4.3.4 和重新排序的因子層級執行提供的 R 範例,然後重現 issue 中描述的中間柱篩選互動。將其與連結的 ggplot2 長條圖範例進行比較;篩選後內部類別消失,或離散軸一致地重新縮放,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- r
- 領域
- data-visualization
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100