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
838d78ce
Commit
838d78ce
authored
Aug 30, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #450 from rashidkpc/tooltip
Tooltip stacked values separation option
parents
cd919a3e
603f66ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
panels/histogram/editor.html
+9
-1
panels/histogram/module.js
+10
-1
No files found.
panels/histogram/editor.html
View file @
838d78ce
...
...
@@ -15,8 +15,8 @@
<label
class=
"small"
>
Note
</label><small>
In
<strong>
{{panel.mode}}
</strong>
mode the configured field
<strong>
must
</strong>
be a numeric type
</small>
</div>
</div>
<div
class=
"row-fluid"
style=
"margin-bottom:10px;"
>
<h5>
Chart Settings
</h5>
<div
class=
"row-fluid"
style=
"margin-bottom:10px;"
>
<div
class=
"span1"
>
<label
class=
"small"
>
Bars
</label><input
type=
"checkbox"
ng-model=
"panel.bars"
ng-checked=
"panel.bars"
></div>
<div
class=
"span1"
>
<label
class=
"small"
>
Lines
</label><input
type=
"checkbox"
ng-model=
"panel.lines"
ng-checked=
"panel.lines"
></div>
<div
class=
"span1"
>
<label
class=
"small"
>
Points
</label><input
type=
"checkbox"
ng-model=
"panel.points"
ng-checked=
"panel.points"
></div>
...
...
@@ -59,3 +59,10 @@
<label
class=
"small"
>
Use Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)
</label>
</div>
</div>
<h5>
Tooltip Settings
</h5>
<div
class=
"row-fluid"
style=
"margin-bottom:10px;"
>
<div
class=
"span3"
>
<label
class=
"small"
>
Stacked Values
<i
class=
"icon-question-sign"
bs-tooltip=
"'How should the values in stacked charts to be calculated?'"
></i></label>
<select
class=
"input-medium"
ng-model=
"panel.tooltip.value_type"
ng-options=
"f for f in ['cumulative','individual']"
></select>
</div>
</div>
\ No newline at end of file
panels/histogram/module.js
View file @
838d78ce
...
...
@@ -72,6 +72,9 @@ angular.module('kibana.histogram', [])
'y-axis'
:
true
,
percentage
:
false
,
interactive
:
true
,
tooltip
:
{
value_type
:
'cumulative'
}
};
_
.
defaults
(
$scope
.
panel
,
_d
);
...
...
@@ -426,11 +429,17 @@ angular.module('kibana.histogram', [])
var
$tooltip
=
$
(
'<div>'
);
elem
.
bind
(
"plothover"
,
function
(
event
,
pos
,
item
)
{
var
value
;
if
(
item
)
{
if
(
scope
.
panel
.
stack
&&
scope
.
panel
.
tooltip
.
value_type
===
'individual'
)
{
value
=
item
.
datapoint
[
1
]
-
item
.
datapoint
[
2
];
}
else
{
value
=
item
.
datapoint
[
1
];
}
$tooltip
.
html
(
kbn
.
query_color_dot
(
item
.
series
.
color
,
15
)
+
' '
+
item
.
datapoint
[
1
].
toFixed
(
0
)
+
" @ "
+
value
+
" @ "
+
moment
(
item
.
datapoint
[
0
]).
format
(
'MM/DD HH:mm:ss'
)
)
.
place_tt
(
pos
.
pageX
,
pos
.
pageY
);
...
...
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