javascript - Hide bubble in nvd3 bubble chart -
i using nvd3 bubble chart. want hide bubble contains size:0;
i have 2 data :-
var data = []; data.push({key: 'male(yes)', values: []}); data['0'].values.push({ x: 1 , y: 1 , size: 0 }); data.push({key: 'male(no)', values: []}); data['1'].values.push({ x: -1 , y: -1 , size: 20 });
i don't want show bubble has size:0;.
how can hide bubble?
you can applying css style (visibility:hidden/display:none/opacity:0) individual data point. 1 way of doing select svg objects of type point - depending on names used , filter them according size, apply new style them.
svg.selectall("#yourname svg") .filter(function (l) { return l.size== 0; })[0].foreach(function (d){ d.style("visibility","hidden") })
Comments
Post a Comment