多个图表(堆叠的条形图和线条),线条不居中

时间:2014-06-27 09:49:40

标签: javascript html dhtmlx

我创建了一个堆积条+折线图。问题是我的订单项不在堆积条的中心位置:

有没有办法将这个中心放在堆积的栏上?

这是我的代码:

<head>
    <script src="/LIB/JS/dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
    <script src="/LIB/JS/dhtmlxSuite/dhtmlxChart/codebase/dhtmlxchart.js" type="text/javascript"></script>
    <link rel="STYLESHEET" type="text/css" href="/LIB/JS/dhtmlxSuite/dhtmlxChart/codebase/dhtmlxchart_debug.css">
</head>
<body>
    <script>
        var chart;
        window.onload = function() {
            chart = new dhtmlXChart({
                view:"stackedBar",
                container:"chart1",
                value:"#FTENat#",
                width:50,
                xAxis:{template:"01/0#Maand#/#Jaar#"},
                yAxis:{start:27000,step:500,end:37000},
                color:"#0070C0"
            });
            chart.addSeries({value:"#FTEInterNat#",color:"#00B0F0"});
            chart.addSeries({value:"#FTEDelta#",color:"#00B050"});
            chart.addSeries({value:"#INDMilVmg#",color:"#92D050"});
            chart.addSeries({value:"#INDMilAfw#",color:"#C3D69B"});     
            chart.addSeries({value:"#INDMilVOP#",color:"#D9D9D9"});
            chart.addSeries({value:"#INDMilOE#",color:"#BFBFBF"});
            chart.addSeries({value:"#INDMilOB#",color:"#7F7F7F"});
            chart.addSeries({view:"line",item:{radius:5,type:"square",color:"#000000"},line:{color:"#000000",width:2},value:"#PostenF1#"});
            chart.load("http://10.80.85.118/LRF/XMLWeb/ProcessDescriptor/descriptor/L1/HRB/HRB_Foto_Grafiek.xml",function(){},"xml");
        }
    </script>
    <div id="chart1" style="width:75%;height:75%;float:right;font-family:sans-serif;"></div>
</body>

1 个答案:

答案 0 :(得分:0)

显然当前版本的dhtmlxchart有一个错误导致第二个图表未正确勾画的输出。这应该在下次更新中修复。