HighChart:使用HC_YAXIS_MULTIPLES设置Yaxis Max和Min(Create_axis(create_axis)(
我有四个图表,每个图都可以比较案例计数,死亡和四种不同疾病之间的比例。我需要帮助设置Ymax& ymin 专门针对比例序列,使它们的y轴都是相同的&它们可以在视觉上可比性。 我需要将y tick设置为[0、30、60]。下面只是疾病图的一个代码示例,因为它们都与不同的数据帧相同。这是在R Markdown中使用高电量软件包。有没有办法在HC_ADD_Series中添加tickpositions?
highchart() %>%
hc_yAxis_multiples(create_axis(naxis = 3, lineWidth = 3, title = list(text = NULL))) %>%
hc_xAxis(categories = graph_data$Month) %>%
hc_add_series(data = graph_data$Value, name = "Cases", type = "area", color = '#50b7aa',yAxis = 0,dataLabels = list(enabled = F)) %>%
hc_add_series(data = graph_data1$Value, name = "Deaths", type = "area", color = '#919191', yAxis = 1,dataLabels = list(enabled = F)) %>%
hc_add_series(data = graph_data2$Proportion, name = "Proportion", type = "area", color = '#926f97', yAxis = 2)
” .net/qdy0t.png“ alt =”所有四个图的图片并排”>
I have four graphs that each compare the case counts, deaths, and the proportions between four different diseases over time. I am needing help setting the ymax & ymin specifically for the proportions series so that their y axes are all the same & they can be visually comparable. I need to set the y ticks at [0, 30, 60]. Below is just one code sample of a disease graph since they're all coded the same just with different data frames. This is in R markdown using the Highcharter package. Is there a way to add tickPositions within hc_add_series?
highchart() %>%
hc_yAxis_multiples(create_axis(naxis = 3, lineWidth = 3, title = list(text = NULL))) %>%
hc_xAxis(categories = graph_data$Month) %>%
hc_add_series(data = graph_data$Value, name = "Cases", type = "area", color = '#50b7aa',yAxis = 0,dataLabels = list(enabled = F)) %>%
hc_add_series(data = graph_data1$Value, name = "Deaths", type = "area", color = '#919191', yAxis = 1,dataLabels = list(enabled = F)) %>%
hc_add_series(data = graph_data2$Proportion, name = "Proportion", type = "area", color = '#926f97', yAxis = 2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论