Search code examples
javascriptcssc3

C3.js show tooltip from button click


I am using C3.js to graph some data. I want to be able to show the tooltip for the last data point series from a button click or even by default once the chart has rendered. Is there anyway to do this? Their documentation has a section for tooltip.show but there is no documentation for it.

missing documentation


Solution

  • The simpliest syntax is this:

    chart.tooltip.show({x: 5});
    

    jsFiddle demo

    Is this is what you want?