trend widget legend exponential format?

Find and share HowTos to various installations / configurations!
Search

Post Reply
3 posts • Page 1 of 1
dvribeira2
Posts: 2
Joined: Tue Jan 12, 2021 10:39 am

trend widget legend exponential format?

Post by dvribeira2 »

Hi all,

I'm trying to get a trend widget to display the legend values in exponential format [WinCC OA 3.16 P026], but it seems this is not possible. From the documentation, we can see that the function curveLegendFormat would have been meant for this, but the format parameter is described as
The format string, for example, "%6.2" (value with two decimal places).
This does not include the type. If you try to pass "%g" or "%e", it will keep the default value of "%6.2f" (as returned from getting the value of curveLegendFormat and as displayed in the trend legend). If you try to pass "%15.3e", it will set "%15.3f".

Assuming this is indeed a limitation of WinCC OA, has anyone come up with a work around for this?

Cheers!

User avatar
leoknipp
Posts: 2567
Joined: Tue Aug 24, 2010 7:28 pm

Re: trend widget legend exponential format?

Post by leoknipp »

I have tested it in 3.17 and I could not set an exponential format for the trend legend.
You can use the option to display the value in an alternative object. If you set the exponential format for this object, e.g. a text field, you can show the values in the expected format.

Best Regards
Leopold Knipp
Senior Support Specialist

dvribeira2
Posts: 2
Joined: Tue Jan 12, 2021 10:39 am

Re: trend widget legend exponential format?

Post by dvribeira2 »

Thanks for your reply. Yes it might imply a bit of work but it seems that we would need to create or own legend object and hide the trend one. Also and related to this, since the trendRulerPanel uses the format from the legend as given by the trend object, we will have to override this panel as well.

It would be nice if in future versions the %e and or %g formats were accepted for the trend, it would save quite some work.

Thanks again for your reply!

Post Reply
3 posts • Page 1 of 1