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
68ad93f4
Unverified
Commit
68ad93f4
authored
May 14, 2019
by
Torkel Ödegaard
Committed by
GitHub
May 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gauge: Fix switching orientation issue when switching from BarGauge to Gauge (#17064)
parent
3df94c6f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
packages/grafana-ui/src/components/Gauge/Gauge.tsx
+1
-1
public/app/plugins/panel/gauge/GaugePanel.tsx
+3
-3
No files found.
packages/grafana-ui/src/components/Gauge/Gauge.tsx
View file @
68ad93f4
...
...
@@ -76,7 +76,7 @@ export class Gauge extends PureComponent<Props> {
);
const
gaugeWidthReduceRatio
=
showThresholdLabels
?
1.5
:
1
;
const
gaugeWidth
=
Math
.
min
(
dimension
/
5
,
40
)
/
gaugeWidthReduceRatio
;
const
gaugeWidth
=
Math
.
min
(
dimension
/
5
.5
,
40
)
/
gaugeWidthReduceRatio
;
const
thresholdMarkersWidth
=
gaugeWidth
/
5
;
const
fontSize
=
Math
.
min
(
dimension
/
5.5
,
100
)
*
(
value
.
text
!==
null
?
this
.
getFontScale
(
value
.
text
.
length
)
:
1
);
const
thresholdLabelFontSize
=
fontSize
/
2.5
;
...
...
public/app/plugins/panel/gauge/GaugePanel.tsx
View file @
68ad93f4
...
...
@@ -5,7 +5,7 @@ import React, { PureComponent } from 'react';
import
{
config
}
from
'app/core/config'
;
// Components
import
{
Gauge
,
FieldDisplay
,
getFieldDisplayValues
}
from
'@grafana/ui'
;
import
{
Gauge
,
FieldDisplay
,
getFieldDisplayValues
,
VizOrientation
}
from
'@grafana/ui'
;
// Types
import
{
GaugeOptions
}
from
'./types'
;
...
...
@@ -43,7 +43,7 @@ export class GaugePanel extends PureComponent<PanelProps<GaugeOptions>> {
};
render
()
{
const
{
height
,
width
,
options
,
data
,
renderCounter
}
=
this
.
props
;
const
{
height
,
width
,
data
,
renderCounter
}
=
this
.
props
;
return
(
<
VizRepeater
getValues=
{
this
.
getValues
}
...
...
@@ -52,7 +52,7 @@ export class GaugePanel extends PureComponent<PanelProps<GaugeOptions>> {
height=
{
height
}
source=
{
data
}
renderCounter=
{
renderCounter
}
orientation=
{
options
.
orientation
}
orientation=
{
VizOrientation
.
Auto
}
/>
);
}
...
...
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