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
0c6841bd
Commit
0c6841bd
authored
Apr 19, 2016
by
bergquist
Committed by
David Keijser
Apr 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(singlestat): adds support for fontsizes in gagues
parent
c455e501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
public/app/plugins/panel/singlestat/module.ts
+10
-2
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
0c6841bd
...
...
@@ -328,7 +328,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
value
:
{
color
:
panel
.
colorValue
?
getColorForValue
(
data
,
data
.
valueRounded
)
:
null
,
formatter
:
function
()
{
return
data
.
valueFormated
;
},
font
:
{
size
:
30
}
font
:
{
size
:
getGaugeFontSize
()
}
},
show
:
true
}
...
...
@@ -344,6 +344,15 @@ class SingleStatCtrl extends MetricsPanelCtrl {
$
.
plot
(
plotCanvas
,
[
plotSeries
],
options
);
}
function
getGaugeFontSize
()
{
if
(
panel
.
valueFontSize
)
{
var
num
=
parseInt
(
panel
.
valueFontSize
.
substring
(
0
,
panel
.
valueFontSize
.
length
-
1
));
return
30
*
(
num
/
100
);
}
else
{
return
30
;
}
}
function
addSparkline
()
{
var
width
=
elem
.
width
()
+
20
;
if
(
width
<
30
)
{
...
...
@@ -405,7 +414,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
function
render
()
{
if
(
!
ctrl
.
data
)
{
return
;
}
data
=
ctrl
.
data
;
setElementHeight
();
...
...
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