C3: Tooltips and Mouse events not triggering on pie chart

Created on 20 Apr 2018  路  8Comments  路  Source: c3js/c3

Tooltips and Mouse hover and click events aren't working on pie charts.

For example, the official pie chart example from docs doesn't show any console logs from mouse events:
http://c3js.org/samples/chart_pie.html

  • C3 version: 0.5.3
  • D3 version: 4.13.0
  • Browser: Chrome 66.0.3359.81
  • OS: Mac OS X

Most helpful comment

Adding this CSS/Sass fixed the mouse events and tooltips:

g.c3-chart {
  g.c3-event-rects {
    rect.c3-event-rect {
      pointer-events: none;
    }
  }
}

All 8 comments

Adding this CSS/Sass fixed the mouse events and tooltips:

g.c3-chart {
  g.c3-event-rects {
    rect.c3-event-rect {
      pointer-events: none;
    }
  }
}

Can we create a PR with this fix, if it works?

Adding this css breaks tooltips on bar chart.

Adding this css breaks tooltips on bar chart.

Yea, a better solution is needed to work for all c3 charts.

As @kvcrawford has suggested, the issue is .c3-event-rects getting rendered as last element. His PR should fix this issue for all the charts. PR got approved. Not sure when its going to be merged.

I would like to see this fixed.
Add the bug label to this issue?

@kt3k Good to see the commit! When do you expect to release a new version?

Hello @1Jesper1
We've just published the fix as v0.6.4! Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aishwaryak picture aishwaryak  路  4Comments

ivarkallejarv picture ivarkallejarv  路  3Comments

zachallia picture zachallia  路  3Comments

jstone-ponderosa picture jstone-ponderosa  路  3Comments

u119102 picture u119102  路  3Comments