I'm trying to create a line chart using nvd3 using the following code
nv.addGraph(function ()
{
chart = nv.models.lineChart()
.x(function(d) { return d[0]; })
.y(function(d) { return d[1]; })
.showXAxis(true)
.showYAxis(true)
.useInteractiveGuideline(true);
chart.xAxis //Chart x-axis settings
.axisLabel('Time (ms)')
.tickFormat(function(d) {
var format = '%H:%M';
d = new Date(d);
return d3.time.format(format)(d);
}).tickValues(null);
d3.select('#macCountGraph svg')
.datum(graphData)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
The above code is creating the graph as required but it is filling the graph as shown in the image below
Also, it not showing the grid lines, x-axis, y-axis and no tooltip is shown onmouseover.
I looked inside the generated svg and found this
<g class=" nv-group nv-series-0" style="stroke-opacity: 1; stroke-width: 1.5; fill: rgb(31, 119, 180); stroke: rgb(31, 119, 180); fill-opacity: 0.5;">
The above element has a fill-opacity set to 0.5. If I change it to 0 in firebug, the fill color is removed.
Tried to do it using javascript as shown below
d3.selectAll("svg .nv-groups > nv-group")
.transition()
.style("fill-opacity", 0);
But no luck.
Any ideas on how to solve this?
