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
2f78f46a
Commit
2f78f46a
authored
Dec 03, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for add/remove labels
parent
b4d5ddd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
public/app/viz/Gauge.tsx
+3
-2
public/vendor/flot/jquery.flot.gauge.js
+1
-0
No files found.
public/app/viz/Gauge.tsx
View file @
2f78f46a
...
...
@@ -57,7 +57,8 @@ export class Gauge extends PureComponent<Props> {
const
fontColor
=
config
.
bootData
.
user
.
lightTheme
?
'rgb(38,38,38)'
:
'rgb(230,230,230)'
;
const
fontScale
=
parseInt
(
'80'
,
10
)
/
100
;
const
fontSize
=
Math
.
min
(
dimension
/
5
,
100
)
*
fontScale
;
const
gaugeWidth
=
Math
.
min
(
dimension
/
6
,
60
);
const
gaugeWidthReduceRatio
=
showThresholdLabels
?
1.5
:
1
;
const
gaugeWidth
=
Math
.
min
(
dimension
/
6
,
60
)
/
gaugeWidthReduceRatio
;
const
thresholdMarkersWidth
=
gaugeWidth
/
5
;
const
thresholdLabelFontSize
=
fontSize
/
2.5
;
...
...
@@ -115,7 +116,7 @@ export class Gauge extends PureComponent<Props> {
let
value
:
string
|
number
=
'N/A'
;
if
(
timeSeries
.
length
)
{
value
=
timeSeries
[
0
].
stats
.
avg
;
value
=
timeSeries
[
0
].
stats
[
stat
]
;
}
const
plotSeries
=
{
...
...
public/vendor/flot/jquery.flot.gauge.js
View file @
2f78f46a
...
...
@@ -588,6 +588,7 @@
if
(
!
exists
)
{
span
=
$
(
"<span></span>"
)
span
.
attr
(
"id"
,
id
);
span
.
attr
(
"class"
,
"flot-temp-elem"
);
placeholder
.
append
(
span
);
}
...
...
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