mhemesath/r2d3

No color support for nvd3

Closed this issue · 4 comments

I am trying to figure out if I can make nvd3 work using r2d3, So far I managed to display chart in IE8 but color is not getting rendered any Idea? Here is my code:

nv.addGraph(function() {
var width = 500,
height = 500;

var chart = nv.models.pieChart()
    .x(function(d) { return d.key })
    .y(function(d) { return d.y })
    //.showLabels(false)
    .values(function(d) { return d })
    .color(d3.scale.category10().range())
    .width(width)
    .height(height);

  d3.select("#testr2")
      .append("svg")
      .datum([testdata])
      .transition().duration(1200)
      .attr('width', width)
      .attr('height', height)
      .call(chart);

chart.dispatch.on('stateChange', function(e) { nv.log('New State:', JSON.stringify(e)); });

return chart;

});

Okay I managed to fix it myself , adding color information in pie model.

I'm sorry I haven't been any help. I've been extremely busy the last month.

Is it possible for you to explain how you managed to make nvd3 work with ie8. I tried using r2d3 with nvd3 on ie8 without success.

@AnshumanRavi
Hi, can you provide an working example with r2d3 and nvd3 for IE8?

many thanks in advance!