SplitSeries在R中的Packed Bubble Highchart中不起作用

时间:2019-05-21 14:11:46

标签: r highcharts

我需要在r(highchart)中有一个打包的气泡图。我没有分裂。 hc_plotOptions中的“ SplitSeries”不起作用。

你好!

我需要像这样的indexof在r中创建一个拆分的打包气泡图。

我写了一个代码,没有提供我想要的结果。特别是“ SplitSeries”不起作用。我没有分裂。

这是完整的代码:

value <- 50
highchart() %>%
  hc_chart(type = 'packedbubble') %>%
  hc_title(text = 'Steuerabzüge', align = 'center') %>%
  hc_tooltip(useHTML = T, pointFormat = '<b>{point.name}:</b> {point.description}') %>%
  hc_plotOptions(packedbubble = list(
    minSize = '20%',
    maxSize = '50%',
    zMin = 0,
    zMax = 1000,
    layoutAlgorithm = list(
      gravitationalConstant = 0.10,
      splitSeries = T,
      seriesInteraction = F,
      dragBetweenSeries = T,
      parentNodeLimit = T
    )
  )
  ) %>%
  hc_legend(enabled = T) %>%
  hc_exporting(enabled = T) %>%
  hc_add_series(name = 'Standardberufsauslagen', data = list(
    list(name = 'Fahrkostenabzug', 
         value = value, 
         description = 'Anweisungen'), 
    list(name = 'Fahrrad/Kleinmotorad',
         value = value,
         description = 'Anweisungen'), 
    list(name = 'Kosten für auswärtige Verpflegung', 
         value = value,
         description = 'Anweisungen'),
    list(name = 'Übrige Berufskosten', 
         value =value,
         description = 'Anweisungen'),
    list(name = 'Aus- und Weiterbildungskosten', 
         value = value,
         description = 'Anweisungen'),
    list(name = 'Auslagen für Nebenerwerb',
         value = value,
         description = 'Anweisungen')
  )
  ) %>%
  hc_add_series(name = 'Vorsorge', data = list(
    list(name = 'Einkauf in 2. Säule', 
         value = value,
         description = 'Anweisungen'),
    list(name = 'Einkauf in Säule 3a', 
         value = value,
         description = 'Anweisungen')
  )
  ) %>%
  hc_add_series(name = 'Vorsorge', data = list(
    list(name = 'Einkauf in 2. Säule', 
         value = value,
         description = 'Anweisungen'),
    list(name = 'Einkauf in Säule 3a', 
         value = value,
         description = 'Anweisungen')
  )
  )

1 个答案:

答案 0 :(得分:0)

这是不可能的,因为当前的highcharter使用Highcharts 7.0.1,但是从Highcharts 7.1.0版本开始存在嵌套的填充气泡。

在此处查看更改日志:https://www.highcharts.com/blog/changelog/#highcharts-v7.1.0

或此处的API:https://api.highcharts.com/highcharts/plotOptions.packedbubble.layoutAlgorithm.splitSeries

enter image description here