Browse Source

fix

merge-requests/1/merge
rozetko 4 years ago
parent
commit
5839d06584
  1. 2
      dist/index.js
  2. 5
      src/index.ts

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

5
src/index.ts

@ -44,8 +44,7 @@ const DEFAULT_GAUGE_OPTIONS: GaugeOptions = {
defaultColor: 'red', defaultColor: 'red',
stat: Stat.CURRENT, stat: Stat.CURRENT,
innerRadius: DEFAULT_INNER_RADIUS, innerRadius: DEFAULT_INNER_RADIUS,
outerRadius: DEFAULT_OUTER_RADIUS, outerRadius: DEFAULT_OUTER_RADIUS
valueFormatter: val => val.toString()
}; };
export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions> { export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions> {
@ -206,7 +205,7 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions
} }
private get _valueText(): string { private get _valueText(): string {
if(this.options.valueFormatter) { if(this.options.valueFormatter === undefined) {
console.log('valueFormatter function is not specified, rendering raw value'); console.log('valueFormatter function is not specified, rendering raw value');
return this.aggregatedValue.toString(); return this.aggregatedValue.toString();
} }

Loading…
Cancel
Save