Custom Data Point Units
-
Hi I am trying to add a data point with a unit kVA in mango 3.1.1 enterprise demo. It shows in the Unit drop down - kVA not recognized (in kVA at index 0). When I save the template, it shows Invalid unit: java.text.ParseException: kVA not recognized (in kVA at index 0). How do I create custom units?
-
Hi morris,
The units field is most useful if some kind of conversion is going to apply, otherwise it can feel a little restrictive. The unit you're attempting to use would be written
kV*A
orkA*V
etc. This came up with kWh, which was entered and displayed kW*h, which was not ideal. It's really easy to add custom labels in the code, but we haven't exposed any means of creating a correlation likekVA = kV*A
for the sake of getting proper display and the conversion possibilities in the library (also automatic units for integrals).The other option is to use a suffix instead of a unit. The suffix field is just a string, so you can write whatever you like into it and, if your textrenderer is set up not to use the unit as the suffix, it will be displayed after the value.
-
Ok, got it. I just set the Text Renderer as I just need to suffix the text .