Remove obsolete/unactionable warnings
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ả
On Windows 10 (version 21H2, build 19044.3448) using RStudio 2023.06.1, when I run the following code
library(ggplot2)
library(plotly)
gplt <- ggplot(iris) + geom_point(aes(x= Sepal.Length, y = Sepal.Width))
gplt |> toWebGL()
I get the following warnings:
Warning messages:
1: 'scattergl' objects don't have these attributes: 'hoveron'
Valid attributes include:
'connectgaps', 'customdata', 'customdatasrc', 'dx', 'dy', 'error_x', 'error_y', 'fill', 'fillcolor', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'legendgroup', 'legendgrouptitle', 'legendrank', 'line', 'marker', 'meta', 'metasrc', 'mode', 'name', 'opacity', 'selected', 'selectedpoints', 'showlegend', 'stream', 'text', 'textfont', 'textposition', 'textpositionsrc', 'textsrc', 'texttemplate', 'texttemplatesrc', 'transforms', 'type', 'uid', 'uirevision', 'unselected', 'visible', 'x', 'x0', 'xaxis', 'xcalendar', 'xhoverformat', 'xperiod', 'xperiod0', 'xperiodalignment', 'xsrc', 'y', 'y0', 'yaxis', 'ycalendar', 'yhoverformat', 'yperiod', 'yperiod0', 'yperiodalignment', 'ysrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'
2: 'scattergl' trace types don't currently render in RStudio on Windows. Open in another web browser (IE, Chrome, Firefox, etc).
-
The second warning is outdated. The plot renders fine on the viewer panel and I successfully can zoom and interact with it. I suggest removing it.
-
The first warning was reported back in 2019 on #1582. It is useless to me (and I guess most users) since it is not clear what can we do to avoid it. It is also weird because it happens on a simple plotly use-case. I am using this function, but it would be nice if it could be addressed:
library(ggplot2)
library(plotly)
workaround_hoveron_warning <- function(p) {
p$x$data <- lapply(p$x$data, function(item) {
item$hoveron <- NULL
item
})
p
}
gplt <- ggplot(iris) + geom_point(aes(x= Sepal.Length, y = Sepal.Width))
gplt |> toWebGL() |> workaround_hoveron_warning()
Questions
- Would a PR removing the RStudio on Windows warning be acceptable?
- Is there a better approach for avoiding the
hoveronwarning?
Thanks!
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ừ đường dẫn toWebGL() và phần mã phát ra cảnh báo scattergl về hoveron cùng các cảnh báo Windows/RStudio; issue không nêu tên tệp mã nguồn hoặc bài kiểm thử nào. Tái hiện ví dụ ggplot2/plotly được cung cấp trên thiết lập đã nêu, sau đó xác minh rằng cảnh báo lỗi thời đã biến mất và hành vi của cảnh báo còn lại đã được xử lý.
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ó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 35/100