NetXMS Support Forum

English Support => General Support => Topic started by: chris.petree on September 15, 2017, 12:44:22 AM

Title: Dashboard elements not displaying decimals.
Post by: chris.petree on September 15, 2017, 12:44:22 AM
I understand that the dashboard elements won't display partial numbers. I have some custom attributes that go to the 1/1,000,000 so... 11.111111
The problem is that it seems if the custom attribute is anything but a whole number, it displays it as 0. What is available in the script maybe or something else to cast the attribute as an integer instead of a float? Or is there something in the dashboard configuration that could make this even simpler?
Title: Re: Dashboard elements not displaying decimals.
Post by: Victor Kirhenshtein on September 19, 2017, 10:12:10 PM
Dashboard elements expected to show floating point numbers as well. What elements exactly do not show them? Can you share screenshots of dashboard element configuration and result?

Best regards,
Victor
Title: Re: Dashboard elements not displaying decimals.
Post by: chris.petree on September 20, 2017, 09:20:34 PM
Hey Victor, I was messing with it yesterday, and that was actually the primary reason it wasn't working. I had the DCI set as a string instead of a float. I also found the reference to all of the math related commands as well. Like format(variable, 1, 2); So if the variable was 34.5731 the result would be 34.57. Works great. Currently, I think I'm all set in this area. Thanks.