Angular nvd3情节线几乎看不见

时间:2016-02-24 12:43:26

标签: angularjs nvd3.js angularjs-nvd3-directives angular-nvd3

我正在使用带角度指令的nvd3来绘制一些数据。它过去工作正常,但是现在我注意到plot消失了,或者说减少到非常细的线。数据即将进入,图表正在显示,但几乎看不到。如何让它恢复正常?

以下是html中的内容:

    <nvd3 options="options" data="data"></nvd3>

以下是javascript中的选项:

    $scope.options = {
        chart: {
            type: 'lineChart',
            height: 200,
            margin : {
                top: 20,
                right: 80,
                bottom: 40,
                left: 80
            },
            color: d3.scale.category10().range(),
            x: function(d){ return d.timestamp; },
            y: function(d){ return d.avg_voltage; },
            useInteractiveGuideline: true,
            duration: 0,
            xScale: d3.time.scale.utc(),
            xAxis: {
                axisLabel: 'Time',
                rotateLabels: 0,
                tickFormat: function (d) {return d3.time.format('%X')(new Date(d))},
                showMaxMin: false,
            },
            yAxis: {
                axisLabel: 'Voltage (v)',
                tickFormat: function(d){return d3.format('.04f')(d);}
            }
        }
    };

这里还有我的所有javascript依赖项,以防它们出现问题:

"dependencies": {
    "angular": "^1.4.0",
    "bootstrap": "^3.3.6",
    "angular-animate": "^1.4.0",
    "angular-cookies": "^1.4.0",
    "angular-resource": "^1.4.0",
    "angular-route": "^1.4.0",
    "angular-sanitize": "^1.4.0",
    "angular-touch": "^1.4.0",
    "d3": "~3.5.8",
    "n3-line-chart": "~2.0.3",
    "angular-nvd3": "~1.0.5",
    "angular-ui-bootstrap": "~1.1.2",
    "font-awesome": "fontawesome#~4.5.0",
    "angular-bootstrap": "~1.1.2"
}

由于

0 个答案:

没有答案