Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shinydashboard中如何展示REmap?DT::dataTableOutput一起用显示空白? #29

Open
maliang1202 opened this issue Nov 24, 2017 · 9 comments

Comments

@maliang1202
Copy link

maliang1202 commented Nov 24, 2017

你好,请问:

UI:
tabItems(
tabItem(tabName = "wifi_01_company",
tabsetPanel(type = "tabs",
#height = "100%", width = "100%",
tabPanel("行为轨迹",
icon = icon("tag"),
#REmapOutput("track_train"),
hr(),
#DT::dataTableOutput('tab_hot_train'),
hr()
),

Server:
output$track_train <- renderREmap(
remapB(
center = BJU,
zoom = 9,
color = "grassgreen",
markLineData = markLine_data,
markPointData = markPointData,
markLineTheme = markLine_Control,
markPointTheme = markPointTheme,
geoData = gdata
))
在上述代码中无法显示地图,且影响界面的其它组件使用,请问如何解决呢?

代码在如下情况下能够正常展示地图:
body <- dashboardBody(
tabsetPanel(type = "tabs",
tabPanel("行为轨迹",icon = icon("tag"),
REmapOutput("track_train"),
hr()
#DT::dataTableOutput('tab_hot_train')
)))

@Lchiffon
Copy link
Owner

Lchiffon commented Dec 6, 2017

能给段可执行代码么? 后面说的那个应该是正常情况

@maliang1202
Copy link
Author

代码:https://github.com/maliang1202/Learn/blob/master/shinydashboard

@maliang1202
Copy link
Author

@Lchiffon 请专家帮忙看看,谢谢。

@Lchiffon
Copy link
Owner

Lchiffon commented Dec 6, 2017

和这个 rstudio/shinydashboard#251 类似?

@Lchiffon
Copy link
Owner

Lchiffon commented Dec 6, 2017

好像是一些和shinydashboard的冲突

@Lchiffon
Copy link
Owner

Lchiffon commented Dec 6, 2017

明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用

除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...

@maliang1202
Copy link
Author

@Lchiffon 非常感谢 👍

@englianhu
Copy link

englianhu commented Apr 2, 2022


echarts4r被RStudio幕后工作人员修改人为篡改,导致在rmarkdown无法正常显示~

明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用
除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...


这个REmap也一样,可否瞧瞧?怎么修正htmlwidgets呢?

(1) 提示信息~

prefer_conflicts('xxx$xxx', 'Echarts.js')
prefer_conflicts('xxx$xxx', 'adminLTE.js')

或者 (2)在htmlwidgets程序包函数中添加条件式调用~

if(xxx == 'echarts.js') { 
   xxxxx
} else if(xxx == 'adminLTE.js') {
   xxxxx
}
shinyWidgets.error.mp4

shinyWidgets::prettyRadioButtons也一样...


相关文章:

@englianhu
Copy link

englianhu commented Apr 10, 2022

明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用

除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...

如果是需要地图,可以通过MapBoxSimpleMapsOpenStreetMap 下载,不过韦经度得修改~

You can use the map_data function from the {ggplot2} package to pull data for maps at different levels (“usa,” “state,” “world,” “county”). The data you pull give locations of the borders of geographic polygons like states and counties. For example, you can get the polygon location data for U.S. states by running the following code

引用:Mastering Software Development in R - 4.3 Mapping

map_data 有许多地方的地方名称信息不完整,需要标签地点名称~

maps程序包或者Adding Data Points to world map in R有完整的数据~

参考文献

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants