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
7cad3c89
Commit
7cad3c89
authored
Jan 07, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hcooper-hover-order'
parents
f5565d48
bcdddfe4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
public/app/plugins/panels/graph/graph.tooltip.js
+9
-3
No files found.
public/app/plugins/panels/graph/graph.tooltip.js
View file @
7cad3c89
...
@@ -79,9 +79,9 @@ function ($) {
...
@@ -79,9 +79,9 @@ function ($) {
// Stacked series can increase its length on each new stacked serie if null points found,
// Stacked series can increase its length on each new stacked serie if null points found,
// to speed the index search we begin always on the last found hoverIndex.
// to speed the index search we begin always on the last found hoverIndex.
var
newhoverIndex
=
this
.
findHoverIndexFromDataPoints
(
pos
.
x
,
series
,
hoverIndex
);
var
newhoverIndex
=
this
.
findHoverIndexFromDataPoints
(
pos
.
x
,
series
,
hoverIndex
);
results
.
push
({
value
:
value
,
hoverIndex
:
newhoverIndex
});
results
.
push
({
value
:
value
,
hoverIndex
:
newhoverIndex
,
color
:
series
.
color
,
label
:
series
.
label
});
}
else
{
}
else
{
results
.
push
({
value
:
value
,
hoverIndex
:
hoverIndex
});
results
.
push
({
value
:
value
,
hoverIndex
:
hoverIndex
,
color
:
series
.
color
,
label
:
series
.
label
});
}
}
}
}
...
@@ -126,6 +126,8 @@ function ($) {
...
@@ -126,6 +126,8 @@ function ($) {
relativeTime
=
dashboard
.
getRelativeTime
(
seriesHoverInfo
.
time
);
relativeTime
=
dashboard
.
getRelativeTime
(
seriesHoverInfo
.
time
);
absoluteTime
=
dashboard
.
formatDate
(
seriesHoverInfo
.
time
);
absoluteTime
=
dashboard
.
formatDate
(
seriesHoverInfo
.
time
);
seriesHoverInfo
.
sort
(
byToolTipValue
);
for
(
i
=
0
;
i
<
seriesHoverInfo
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
seriesHoverInfo
.
length
;
i
++
)
{
hoverInfo
=
seriesHoverInfo
[
i
];
hoverInfo
=
seriesHoverInfo
[
i
];
...
@@ -138,7 +140,7 @@ function ($) {
...
@@ -138,7 +140,7 @@ function ($) {
value
=
series
.
formatValue
(
hoverInfo
.
value
);
value
=
series
.
formatValue
(
hoverInfo
.
value
);
seriesHtml
+=
'<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">'
;
seriesHtml
+=
'<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">'
;
seriesHtml
+=
'<i class="fa fa-minus" style="color:'
+
series
.
color
+
';"></i> '
+
series
.
label
+
':</div>'
;
seriesHtml
+=
'<i class="fa fa-minus" style="color:'
+
hoverInfo
.
color
+
';"></i> '
+
hoverInfo
.
label
+
':</div>'
;
seriesHtml
+=
'<div class="graph-tooltip-value">'
+
value
+
'</div></div>'
;
seriesHtml
+=
'<div class="graph-tooltip-value">'
+
value
+
'</div></div>'
;
plot
.
highlight
(
i
,
hoverInfo
.
hoverIndex
);
plot
.
highlight
(
i
,
hoverInfo
.
hoverIndex
);
}
}
...
@@ -174,5 +176,9 @@ function ($) {
...
@@ -174,5 +176,9 @@ function ($) {
});
});
}
}
function
byToolTipValue
(
a
,
b
)
{
return
parseFloat
(
b
.
value
)
-
parseFloat
(
a
.
value
);
}
return
GraphTooltip
;
return
GraphTooltip
;
});
});
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