config is not overwritting `ModeBarButtons` slot
Đang mở
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have noticed that after placing a ModeBarButtons configuration, it is not overwritten / updated downstream.
Reproducible example:
library(plotly)
#> Loading required package: ggplot2
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
# This plotly only has the `toImage` modeBarButton
plot1 <- plot_ly() %>%
config(displaylogo = FALSE) %>%
config(modeBarButtons = list(list("toImage")))
plot1$x$config$modeBarButtons
#> [[1]]
#> [[1]][[1]]
#> [1] "toImage"
# This plotly also has the `toImage` modeBarButton only
plot2 <- plot_ly() %>%
config(displaylogo = FALSE) %>%
config(modeBarButtons = list(list("toImage"))) %>%
config(modeBarButtons = list(list("zoom")))
plot2$x$config$modeBarButtons
#> [[1]]
#> [[1]][[1]]
#> [1] "toImage"
Created on 2022-11-29 with reprex v2.0.2
This holds true for config(modeBarButtonsToAdd ...)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ entry point config() và tái hiện hai ví dụ trong issue, so sánh plot1$x$config$modeBarButtons với plot2$x$config$modeBarButtons. Bản sửa được hoàn tất khi một cấu hình modeBarButtons được đặt sau cập nhật giá trị trước đó, và hành vi tương tự được xác minh cho modeBarButtonsToAdd.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- r
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100