Merge pull request #15572 from grafana/gauge-minor-fix

Minor fix/polish to gauge panel and threshold editor
pull/15576/head
Torkel Ödegaard 6 years ago committed by GitHub
commit 72e269c8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/grafana-ui/src/components/Gauge/Gauge.tsx
  2. 2
      packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx

@ -115,9 +115,9 @@ export class Gauge extends PureComponent<Props> {
getFontScale(length: number): number {
if (length > 12) {
return FONT_SCALE - (length * 5) / 120;
return FONT_SCALE - (length * 5) / 110;
}
return FONT_SCALE - (length * 5) / 105;
return FONT_SCALE - (length * 5) / 100;
}
draw() {

@ -55,7 +55,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
const value = afterThresholdValue - (afterThresholdValue - beforeThresholdValue) / 2;
// Set a color
const color = colors.filter(c => !newThresholds.some(t => t.color === c))[0];
const color = colors.filter(c => !newThresholds.some(t => t.color === c))[1];
this.setState(
{

Loading…
Cancel
Save