2
안녕하세요 모든 :Highchart 옵션 (포인트 '크기) - R 반짝
나는 반짝 라이브러리에서 제공하는 예제를 통해 훈련을 시도하는 새로운 사용자입니다. 하이 차트 옵션에 약간의 문제가 있습니다. 플롯은 포인트가있는 라인이며, 포인트의 크기를 제어하고 싶습니다. (이하 "highchart"라이브러리에서, 폴더 "데모"예를 사용) : 여기서
단순화 된 코드### 코드
library("shiny")
library("highcharter")
data(citytemp)
ui <- fluidPage(
h1("Highcharter Demo"),
fluidRow(
column(width = 4, class = "panel",
selectInput("type", label = "Type", width = "100%",
choices = c("line", "column", "bar", "spline")),
selectInput("stacked", label = "Stacked", width = "100%",
choices = c(FALSE, "normal", "percent")),
selectInput("theme", label = "Theme", width = "100%",
choices = c(FALSE, "fivethirtyeight", "economist", "darkunica", "gridlight",
"sandsignika", "null", "handdrwran", "chalk")
)
),
column(width = 8,
highchartOutput("hcontainer",height = "500px")
)
)
)
server = function(input, output) {
output$hcontainer <- renderHighchart({
hc <- highcharts_demo() %>%
hc_rm_series("Berlin") %>%
hc_chart(type = "line") %>%
hc_plotOptions(area = list(
stacking = input$stacked,
lineColor = "#ffffff",
lineWidth = 1,
marker = list(
lineWidth = 1,
radius=10,
lineColor = "#ffffff"
)))%>%
hc_tooltip(pointFormat = '<span style="color:{series.color}">{series.name}</span>:
<b>{point.percentage:.1f}%</b> ({point.y:,.0f} millions)<br/>',
shared = TRUE)
hc
})
}
shinyApp(ui = ui, server = server)
의 START ## 코드 끝
나는 약간의 연구를했으며 "마커"와 옵션을 사용하여 크기를 제어 할 수 있다는 것을 알았습니다. 그러나 내 차트는이 기능과 완전히 독립적입니다. 마커에 대해 폭이 & 인 여러 값을 시도했지만 아무 것도 변경하지 않았습니다.
누군가 내가 잘못하고있는 것에 대해 조언 해 줄 수 있습니까? 도움을 주셔서 미리 감사드립니다.
Madzia
감사합니다! 완벽하게 작동합니다! :) (지연에 대한 미안, 나는 같은 날에 대답했다. 그러나 나의 대답이 고려되지 않았던 것처럼 보인다) – Madzia