Highcharts - toggle table properly upon drilldown item

时间:2017-12-18 08:30:58

标签: javascript html highcharts

In my Web application I am displaying some tabular data upon drilldown of a bar chart, and upon drillup the related table should be disappeared.

If you may, please check the fiddle here, upon clicking the items individually the toggle is working fine, but when I drilldown multiple bar charts at once, not all of them are acting as expected.

val transformedRDD = processedMessages
  // notice that we will have Rdd[(String, Message)] or PairRdd after this flatMap
  .flatMap(message => message.isProcessed match {
    case true => Some((message.id, message))
    case false => None
  })
  // after this reduction we will have latest message for each id
  .reduceByKey((m1: Message, m2: Message) => m1.version >= m2.version match {
    case true => m1
    case false => m2
  })
  // now we just want to keep message
  .map({ case (id, message) => message })

The fiddle is only a reproducible example, my application would contain about 6 to 8 of those bar charts, can anyone take a look and correct me where I am doing wrong.

Thank you.

1 个答案:

答案 0 :(得分:1)

如果您没有注意到您正在使用存储表切换状态的单个变量,则这可能适用于仅存在一个向下钻取源的情况,但您有多个向下钻取实例,因此存在问题。 / p>

检查这个小提琴here,我可以提出的一个简单的解决方案是保持特定表的状态切换为唯一变量,你应该很好。

var tableToggle15Sp;
var tableToggle15Fa;

如有任何疑虑,请与我联系。感谢任何反馈。