RhoInc/Webcharts

Add jitter/beeswarm option.

Opened this issue · 2 comments

    this.current_data.forEach(function(d){
      d.matches = chart.current_data.filter(function(f){
        return f.values.x == d.values.x & f.values.y == d.values.y
      })

      d.count = d.matches.length
      d.i = d.matches.indexOf(d)

      if(d.i < d.count/2){
        d.offsetx = (d.i - (d.count/4))
        d.offsety = 1
      }else{
        d.offsetx = (d.i - (3*d.count/4))
        d.offsety = 0
      }
    })

Thinking this would be a mark-specific setting, so adding the new plugin label

Agreed, point-specific.