0

How to do scrolling along the x axis with Angular nvd3?

I find this http://blog.scottlogic.com/2014/09/19/interactive.html and http://bl.ocks.org/stepheneb/1182434 but it is too difficult

It doesn't work

xAxis: {
                scale: d3.scale.linear()
                        .range([0, innerwidth])
                        .domain([d3.min(d3, function (d) {
                                return d3.min(d.x);
                            }),
                            d3.max(d3, function (d) {
                                return d3.max(d.x);
                            })]),
                tickFormat: function (d) {
                    return d3.format(',f')(d);
                }
            }

Or make in without time

xAxis: {
        scale: d3.time.scale().domain([beginDate, endDate]), // <-- explicitly set time scale
        tickFormat: function(d) {
            return $filter('date')(d, 'mediumDate');
        }
yzavyalo
  • 18
  • 4

0 Answers0