shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs

Home Page:https://shutterstock.github.io/rickshaw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Render HoverDetail for only one series

andrewcsmith opened this issue · comments

I have an extra renderer for different data series that I would like to be purely cosmetic (a best-fit line), and so I would like for the HoverDetail to show up on only a single series. Here's the (non-working) code that I have:

class Hover extends Rickshaw.Graph.HoverDetail {
  constructor(args) {
    args.graph.series.forEach((s) => {
      if (s.renderer != 'rubricplot') {
        s.disabled = true
      }
    })
    super(args)
  }
}

This results in no hover tooltip at all. If I use the basic Rickshaw.Graph.HoverDetail instead of my Hover subclass, it will try to give the details at the (purely cosmetic) endpoints of the best-fit line as well as the actual datapoints. How would you suggest that I fix this? Thank you.