javascript - Multiple charts (stacked bar and line), line is not centered -
i have created stacked bar + line chart. problem line-items not centered on stacked bar:
is there way center on stacked bar?
this code:
<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>
apparently current version of dhtmlxchart has bug causes output second chart isn't outlined properly. should fixed in next update.
Comments
Post a Comment