您好我正在使用TeeChart for HTML5,并想知道如何在一个图表中绘制堆叠和正常系列。我需要堆叠两个系列,第三个系列未堆叠(正常)。我尝试为特定系列设置堆叠属性。但它对我来说并不起作用 - 所有系列都堆叠在一起......
<!DOCTYPE html>
<html>
<head>
<script src="http://www.steema.com/files/public/teechart/html5/v2014.07.31.1.7/src/teechart.js" type="text/javascript"></script>
<script src="http://www.steema.com/files/public/teechart/html5/v2014.07.31.1.7/src/teechart-extras.js" type="text/javascript"></script>
<script type="text/javascript">
var Chart1;
function draw() {
Chart1 = new Tee.Chart("canvas");
Chart1.addSeries(new Tee.Line([1, 2, 3]));
Chart1.addSeries(new Tee.Line([1, 2, 3]));
Chart1.addSeries(new Tee.Line([4, 4, 4]));
Chart1.axes.left.title.text = "Y";
Chart1.title.text = "Stacked Lines";
Chart1.title.format.font.style = "18px Verdana";
Chart1.series.items[0].stacked = true;
Chart1.series.items[1].stacked = true;
Chart1.series.items[2].stacked = false;
Chart1.draw();
}
</script>
</head>
<body onload="draw()">
<canvas id="canvas" width="600" height="400">
This browser does not seem to support HTML5 Canvas.
</canvas>
</body>
</html>
&#13;
答案 0 :(得分:1)
在其他TeeChart版本中,例如在TeeChart VCL中,您可以选择设置堆栈组。
我已将此功能添加到TeeChart HTML / Javascript的公共跟踪器中:
http://bugs.teechart.net/show_bug.cgi?id=1159