novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Transitions not configurable #353

Closed Prinzhorn closed 9 years ago

Prinzhorn commented 10 years ago

Given the "Group / Stacked Bar Chart" http://nvd3.org/livecode/#codemirrorNav

this is the default code

nv.addGraph(function() {
    var chart = nv.models.multiBarChart();

    chart.xAxis
        .tickFormat(d3.format(',f'));

    chart.yAxis
        .tickFormat(d3.format(',.1f'));

    d3.select('#chart svg')
        .datum(data())
      .transition().duration(500).call(chart);

    nv.utils.windowResize(chart.update);

    return chart;
});

changing it to

nv.addGraph(function() {
    var chart = nv.models.multiBarChart();

    chart.xAxis
        .tickFormat(d3.format(',f'));

    chart.yAxis
        .tickFormat(d3.format(',.1f'));

    d3.select('#chart svg')
        .datum(data())
      .transition().delay(0).duration(100).call(chart);

    nv.utils.windowResize(chart.update);

    return chart;
});

(note the delay and duration change) nothing changes. I want to get rid of the horizontal delay between each bar. I don't think my users want to wait a second every time the graph updates.

liquidpele commented 9 years ago

"transition" is an option now.