don't calculate cumulative value if series overrides stack to false

This commit is contained in:
Mitsuhiro Tanda
2015-08-13 13:16:51 +09:00
parent 5aee981590
commit caccacf52b
2 changed files with 20 additions and 2 deletions

View File

@@ -73,8 +73,8 @@ define([
describeSharedTooltip("steppedLine false, stack true, individual false", function(ctx) {
ctx.setup(function() {
ctx.data = [
{ data: [[10, 15], [12, 20]], },
{ data: [[10, 2], [12, 3]], }
{ data: [[10, 15], [12, 20]], stack: true },
{ data: [[10, 2], [12, 3]], stack: true }
];
ctx.scope.panel.stack = true;
ctx.pos = { x: 11 };
@@ -86,6 +86,22 @@ define([
});
describeSharedTooltip("steppedLine false, stack true, individual false, series stack false", function(ctx) {
ctx.setup(function() {
ctx.data = [
{ data: [[10, 15], [12, 20]], stack: true },
{ data: [[10, 2], [12, 3]], stack: false }
];
ctx.scope.panel.stack = true;
ctx.pos = { x: 11 };
});
it('should not show stacked value', function() {
expect(ctx.results[1].value).to.be(2);
});
});
describeSharedTooltip("steppedLine false, stack true, individual true", function(ctx) {
ctx.setup(function() {
ctx.data = [