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
4ce88ee7
Commit
4ce88ee7
authored
Dec 09, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix legend
parent
931ad9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/app/panels/histogram/module.html
+4
-4
src/app/panels/histogram/module.js
+6
-1
No files found.
src/app/panels/histogram/module.html
View file @
4ce88ee7
...
...
@@ -43,11 +43,11 @@
<!--<a class='small' ng-click='zoom(0.5)'><i class='icon-zoom-in'></i> Zoom In</a>-->
<a
class=
'small'
ng-click=
'zoom(2)'
><i
class=
'icon-zoom-out'
></i>
Zoom Out
</a>
|
&
nbsp
</span>
<span
ng-show=
"panel.legend"
ng-repeat=
'series in
data
'
class=
"histogram-legend"
>
<i
class=
'icon-circle'
ng-style=
"{color: series.
info.
color}"
></i>
<span
ng-show=
"panel.legend"
ng-repeat=
'series in
legend
'
class=
"histogram-legend"
>
<i
class=
'icon-circle'
ng-style=
"{color: series.color}"
></i>
<span
class=
'small histogram-legend-item'
>
<span
ng-if=
"panel.show_query"
>
{{series.
info.alias || series.info
.query}}
</span>
<span
ng-if=
"!panel.show_query"
>
{{series.
info.
alias}}
</span>
<span
ng-if=
"panel.show_query"
>
{{series.
alias || series
.query}}
</span>
<span
ng-if=
"!panel.show_query"
>
{{series.alias}}
</span>
<span
ng-show=
"panel.legend_counts"
>
({{series.hits}})
</span>
</span>
</span>
...
...
src/app/panels/histogram/module.js
View file @
4ce88ee7
...
...
@@ -380,6 +380,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
results
.
then
(
function
(
results
)
{
$scope
.
panelMeta
.
loading
=
false
;
if
(
segment
===
0
)
{
$scope
.
legend
=
[];
$scope
.
hits
=
0
;
data
=
[];
$scope
.
annotations
=
[];
...
...
@@ -423,6 +424,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
hits
+=
entry
.
count
;
// The series level hits counter
$scope
.
hits
+=
entry
.
count
;
// Entire dataset level hits counter
});
$scope
.
legend
[
i
]
=
q
;
data
[
i
]
=
{
info
:
q
,
time_series
:
time_series
,
...
...
@@ -530,7 +534,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
});
// Receive render events
scope
.
$on
(
'render'
,
function
(
event
,
data
){
scope
.
$on
(
'render'
,
function
(
event
,
d
){
data
=
d
||
data
;
render_panel
(
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