Charts 角度nvd3图表-散点和直线在同一图形中

Charts 角度nvd3图表-散点和直线在同一图形中,charts,line,scatter,angular-nvd3,Charts,Line,Scatter,Angular Nvd3,我想创建一个包含点和线的图表,如下图所示 我尝试过使用“线条”+“条形图”类型的multichart,它似乎很有效。 但当我指定“散射”+“线”时,不会显示散射数据 有可能使用角度nvd3进行此操作吗 非常感谢你的帮助 这是我的密码: var app = angular.module('plunker', ['nvd3']); app.controller('MainCtrl', function($scope) { $scope.options = { chart: {

我想创建一个包含点和线的图表,如下图所示

我尝试过使用“线条”+“条形图”类型的multichart,它似乎很有效。 但当我指定“散射”+“线”时,不会显示散射数据

有可能使用角度nvd3进行此操作吗

非常感谢你的帮助

这是我的密码:

var app = angular.module('plunker', ['nvd3']);

app.controller('MainCtrl', function($scope) {
 $scope.options = {
    chart: {
        type: 'multiChart',
        height: 450,
        margin : {
            top: 30,
            right: 60,
            bottom: 50,
            left: 70
        },
        color: d3.scale.category10().range(),
        //useInteractiveGuideline: true,
        transitionDuration: 500,
        xAxis: {
            tickFormat: function(d){
                return d3.format(',f')(d);
            }
        },
        yAxis: {
            tickFormat: function(d){
                return d3.format('.02f')(d);
            }
        }
    }
};    

$scope.data = [
    {
        key: 'X',
        type: 'scatter',
        values: [
            { x: 1, y: 125, size: Math.random(), shape: 'circle' },
            { x: 2, y: 125, size: Math.random(), shape: 'circle' },
            { x: 3, y: 140, size: Math.random(), shape: 'circle' }
        ],
        yAxis: 1
    },
    {
        key: 'Y',
        type: 'bar',
        values: [
            {x:1, y:109, label:'C2.1'},
            {x:2, y:102, label:'C2.2'},
            {x:3, y:105, label:'C2.3'}
        ],
        yAxis: 1
    },
    {
        key: 'Z',
        type: 'line',
        values: [
            { x: 1, y: 115 },
            { x: 2, y: 120 },
            { x: 3, y: 130 }
        ],
        yAxis: 1
    }
];
});

您的代码正确,可能是您使用的
Angular-nvd3
si版本不正确 这是一张工作票