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
efaf267d
Commit
efaf267d
authored
Apr 02, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrollbar: fix legend rendering issues
parent
77d2ee9a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
19 deletions
+11
-19
public/app/plugins/panel/graph/legend.ts
+6
-13
public/app/plugins/panel/graph/template.ts
+1
-3
public/sass/components/_panel_graph.scss
+4
-3
No files found.
public/app/plugins/panel/graph/legend.ts
View file @
efaf267d
...
...
@@ -238,8 +238,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
tbodyElem
.
append
(
tableHeaderElem
);
tbodyElem
.
append
(
seriesElements
);
elem
.
append
(
tbodyElem
);
tbodyElem
.
wrap
(
'<div class="graph-legend-content"></div>'
);
}
else
{
elem
.
append
(
seriesElements
);
elem
.
append
(
'<div class="graph-legend-content"></div>'
);
elem
.
find
(
'.graph-legend-content'
).
append
(
seriesElements
);
}
if
(
!
panel
.
legend
.
rightSide
||
(
panel
.
legend
.
rightSide
&&
legendWidth
!==
legendRightDefaultWidth
))
{
...
...
@@ -258,25 +260,16 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
</div>
`
;
let
scrollRoot
=
elem
.
parent
();
// let scroller = elem.find(':first-child').first();
let
scroller
=
elem
;
let
scrollRoot
=
elem
;
let
scroller
=
elem
.
find
(
'.graph-legend-content'
);
// clear existing scroll bar track to prevent duplication
elem
.
parent
()
.
find
(
'.baron__track'
)
.
remove
();
scrollRoot
.
find
(
'.baron__track'
).
remove
();
scrollRoot
.
addClass
(
scrollRootClass
);
$
(
scrollBarHTML
).
appendTo
(
scrollRoot
);
scroller
.
addClass
(
scrollerClass
);
// Fix .graph-legend-content max-height
// Couldn't find how to do it via CSS
const
legendHeight
=
scrollRoot
.
height
();
elem
.
css
(
'max-height'
,
legendHeight
);
let
scrollbarParams
=
{
root
:
scrollRoot
[
0
],
scroller
:
scroller
[
0
],
...
...
public/app/plugins/panel/graph/template.ts
View file @
efaf267d
...
...
@@ -3,9 +3,7 @@ var template = `
<div class="graph-panel__chart" grafana-graph ng-dblclick="ctrl.zoomOut()">
</div>
<div class="graph-legend">
<div class="graph-legend-content" graph-legend></div>
</div>
<div class="graph-legend" graph-legend></div>
</div>
`
;
...
...
public/sass/components/_panel_graph.scss
View file @
efaf267d
...
...
@@ -53,9 +53,11 @@
max-height
:
30%
;
margin
:
0
;
text-align
:
center
;
//
padding-top: 6px;
padding-top
:
6px
;
position
:
relative
;
height
:
100%
;
.popover-content
{
padding
:
0
;
}
...
...
@@ -63,7 +65,6 @@
.graph-legend-content
{
position
:
relative
;
padding-top
:
6px
;
}
.graph-legend-icon
{
...
...
@@ -129,9 +130,9 @@
.graph-legend-table
{
tbody
{
display
:
block
;
position
:
relative
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
height
:
100%
;
padding-bottom
:
1px
;
padding-right
:
5px
;
padding-left
:
5px
;
...
...
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