I am using nvd3 line plus bar chart and am trying to change the size of the circles in the line chart. (Each circle with a different radius on the line chart)
To make the points visible on the line chart, I used the following CSS code -
#test-plot .nv-linePlusBar .nv-point
{
fill: #ff5f00;
fill-opacity: 0.6;
}
I am calling the addRadius method after the chart is drawn.
function addRadius() {
for (var i = 0; i < plotdata[0].values.length ; i++) {
var rad = parseFloat(plotdata[0].values[i].r);
$('#test-plot .nv-point-' + i).attr('r', rad);
}
}
setTimeout(addRadius, 500);
This code worked for older version of nvd3 but not version 1.8.1 or higher.
I saw some solutions here but they do not work for the latest versions of nvd3.
Triy with the following CSS:
and change the selector in the addRadius() function:
Check this snippet:
Fiddle: http://jsfiddle.net/beaver71/cr8ejg0n/