用于JavaScript的Teechart;回收右侧未使用的空间



Using TeeChart for HTML5/Javascript;我正在尝试找到一种方法,使图表区域扩展到没有右轴的图表右侧的未使用空间。设置右轴 visible='false' 不起作用。

<html>
<head>
<script type="text/javascript" src="http://www.bankdynamics.com/teechart/src/teechart.js"></script>
<script type="text/javascript">
function DrawCharts()
{
var Chart1=new Tee.Chart(document.getElementById("ChartCanvas1"));
Chart1.addSeries(new Tee.Bar([0,0,0,0]) );
Chart1.addSeries(new Tee.Bar([0,0,0,0]) );
Chart1.title.visible=false;
Chart1.legend.visible=false;
Chart1.axes.left.visible=false;
Chart1.axes.right.visible=false;
Chart1.axes.bottom.visible=false;
Chart1.axes.top.visible=false;
Chart1.palette.colors[0] = "#626200";
Chart1.palette.colors[1] = "#800040";
Chart1.palette.colors[2] = "#00a8a8";
Chart1.palette.colors[3] = "#8080c0";
Chart1.panel.transparent=true;
var OutFlowsSeries = Chart1.series.items[0];
var  InFlowsSeries = Chart1.series.items[1];
OutFlowsSeries.marks.style="label";
 InFlowsSeries.marks.style="label";
OutFlowsSeries.colorEach="yes";
 InFlowsSeries.colorEach="yes";
 InFlowsSeries.data.values[0] =  2;
OutFlowsSeries.data.values[0] = -2;
 InFlowsSeries.data.values[1] =  1;
OutFlowsSeries.data.values[1] = -1;
 InFlowsSeries.data.values[2] =  4;
OutFlowsSeries.data.values[2] = -4;
 InFlowsSeries.data.values[3] =  3;
OutFlowsSeries.data.values[3] = -3;
Chart1.draw();
}
</script>
</head>
<body onLoad="DrawCharts();">
<canvas id="ChartCanvas1" width="700" height="200" style="border:1px solid black;">
(This browser does not support HTML5 Canvas feature)
</canvas>
</body>
</html>

我们刚刚修复了这个问题。请写信给"steema dot com的信息",要求新的js。

此外,请注意,还有另一个设置可以控制每个图表边缘的百分比空间,可以设置为零:

var m=Chart1.panel.margins;m.left=m.right=m.top=m.bottom=0;

斯蒂玛支持团队。

相关内容

  • 没有找到相关文章

最新更新