kluverua/Chartjs-tsgauge

GaugeData Format

Opened this issue · 5 comments

Hello, very good your script. I am using it to report a certain temperature. However, how can I do to get gaugeLimits and gaugeData informed in the format, for example, 33˚C. I even tried to concatenate, for example, gaugeData: {
value: 33 + "˚C",
valueColor: "# ff7143"
},
but the functionality of the arrow (>) is no longer displayed

try use parameter markerFormatFn

Like this?

image

@robertowiest Yes, for your case use it like this:

options: {
      events: [ ],
      showMarkers: True,
      markerFormatFn =  n => n + '°';
}

It works for the markers, but not for the value.
The GaugeChartHelper.prototype.renderValueLabel function does not make use of marketFormatFn

Funciona para los marcadores, pero no para el valor.
La función no hace uso de GaugeChartHelper.prototype.renderValueLabel``marketFormatFn

i create a new commit with a new function for this
#17