C3: non clickable legend

Created on 8 Jul 2014  路  7Comments  路  Source: c3js/c3

Hello,

Is it possible to have non clickable legends ?

thanks

question resolved maybe

Most helpful comment

@mathiasbanda default behaviour is:
legend.item.onclick = function (id) { chart.toggle(id); }

All 7 comments

Hi, now you can disable click by legend.item.onclick = function () {}. Could you try this?

Hi,

I can't get this to work. Can you provide a working example ?

thanks

Have a look at this example: http://jsfiddle.net/C89z4/1/

great! thanks.

Thanks guys this is helpful. My further question is how do I get to call the default behavior before or after my custom function in legend.item.onclick = function () {doCustomEvent(); doDefault()}

@mathiasbanda default behaviour is:
legend.item.onclick = function (id) { chart.toggle(id); }

My workaround was basically a cheat, I will do it properly now. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aishwaryak picture aishwaryak  路  4Comments

seubert picture seubert  路  3Comments

Kreozot picture Kreozot  路  3Comments

mwho picture mwho  路  3Comments

DieterSpringer picture DieterSpringer  路  4Comments