Reputation: 475
Hi I'm using the TeeChart for HTML5 and would like to know how to draw stacked and normal series in a one chart. I need to have two series stacked and third one unstacked (normal). I tried to set the stacked property for particular series. But it it doesn't work for me - all series are stacked...
<!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>
Upvotes: 0
Views: 205
Reputation: 5039
In other TeeChart versions, like in TeeChart VCL, you have the option to set Stack Groups.
I've added this feature to the public tracker for TeeChart HTML/Javascript:
http://bugs.teechart.net/show_bug.cgi?id=1159
Upvotes: 1