Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
caccacf5
Commit
caccacf5
authored
Aug 13, 2015
by
Mitsuhiro Tanda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't calculate cumulative value if series overrides stack to false
parent
5aee9815
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
public/app/panels/graph/graph.tooltip.js
+2
-0
public/test/specs/graph-tooltip-specs.js
+18
-2
No files found.
public/app/panels/graph/graph.tooltip.js
View file @
caccacf5
...
...
@@ -58,6 +58,8 @@ function ($) {
if
(
scope
.
panel
.
stack
)
{
if
(
scope
.
panel
.
tooltip
.
value_type
===
'individual'
)
{
value
=
series
.
data
[
hoverIndex
][
1
];
}
else
if
(
!
series
.
stack
)
{
value
=
series
.
data
[
hoverIndex
][
1
];
}
else
{
last_value
+=
series
.
data
[
hoverIndex
][
1
];
value
=
last_value
;
...
...
public/test/specs/graph-tooltip-specs.js
View file @
caccacf5
...
...
@@ -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
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment