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
972be885
Commit
972be885
authored
May 17, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: singlestat gauge sizing issue when panel is very wide, fixes #7773
parent
fc146fe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
public/app/plugins/panel/singlestat/module.ts
+2
-2
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
972be885
...
@@ -412,6 +412,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -412,6 +412,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
addGauge
()
{
function
addGauge
()
{
var
width
=
elem
.
width
();
var
width
=
elem
.
width
();
var
height
=
elem
.
height
();
var
height
=
elem
.
height
();
var
dimension
=
Math
.
min
(
width
,
height
);
ctrl
.
invalidGaugeRange
=
false
;
ctrl
.
invalidGaugeRange
=
false
;
if
(
panel
.
gauge
.
minValue
>
panel
.
gauge
.
maxValue
)
{
if
(
panel
.
gauge
.
minValue
>
panel
.
gauge
.
maxValue
)
{
...
@@ -425,7 +426,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -425,7 +426,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
margin
:
'auto'
,
margin
:
'auto'
,
position
:
'relative'
,
position
:
'relative'
,
height
:
(
height
*
0.9
)
+
'px'
,
height
:
(
height
*
0.9
)
+
'px'
,
width
:
width
+
'px'
width
:
dimension
+
'px'
};
};
plotCanvas
.
css
(
plotCss
);
plotCanvas
.
css
(
plotCss
);
...
@@ -447,7 +448,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -447,7 +448,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
:
'rgb(38,38,38)'
;
:
'rgb(38,38,38)'
;
var
fontScale
=
parseInt
(
panel
.
valueFontSize
)
/
100
;
var
fontScale
=
parseInt
(
panel
.
valueFontSize
)
/
100
;
var
dimension
=
Math
.
min
(
width
,
height
);
var
fontSize
=
Math
.
min
(
dimension
/
5
,
100
)
*
fontScale
;
var
fontSize
=
Math
.
min
(
dimension
/
5
,
100
)
*
fontScale
;
var
gaugeWidth
=
Math
.
min
(
dimension
/
6
,
60
);
var
gaugeWidth
=
Math
.
min
(
dimension
/
6
,
60
);
var
thresholdMarkersWidth
=
gaugeWidth
/
5
;
var
thresholdMarkersWidth
=
gaugeWidth
/
5
;
...
...
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