Skip to main content
Nintex Community Menu Bar
Question

Chart Averages

  • Jul 9, 2024 5:09 PM UTC
  • 8 replies
  • 29 views
  • Translate All

Forum|alt.badge.img+3

Is there any way to restrict the number of decimal points the Average aggregate function uses?



I am getting a huge number of decimal places in my chart. Not causing any functional problems, but doesn’t look the best!

Thanks in advance.

This topic has been closed for replies.

8 replies

Forum|alt.badge.img+20

Yup. A snippet for this.

var chart = arguments[0], chart.tooltip.formatter = function () { return this.x + '(AVG): ' + Math.round(this.y) ; }; 

Put the snippet name here.

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 6:07 PM UTC

Thanks Pat.  Looks like you are digging into the HiCharts API pretty hard… 

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 6:07 PM UTC

And this:  J told me at lunch that this issue will be fixed in our next release… 

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • Jul 9, 2024 6:07 PM UTC

Sam,

Pat’s snippet will work, but try setting chart.tooltip.valueDecimals if you want to keep the rest of the formatting at the default, but limit the number of decimals.

I do want to mention that making our tooltips a little smarter when it comes to the number of decimal places will be included in our next patch release. Basically, Skuid will automatically limit the number of decimal places shown in the tooltip to whatever your value field’s metadata specifies. If none is specified for your value field, the tooltip will display as it did before.

Also, if you want to make those bars a little wider, try turning Stacking on:

    

Translate

Forum|alt.badge.img+3
  • Author
  • Jul 9, 2024 6:07 PM UTC

Thanks for all the replies. Problem solved!

Translate

Forum|alt.badge.img+2
  • Jul 9, 2024 6:07 PM UTC

This script throws an error as of today looks like you can’t access tooltip any more? 

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • Jul 9, 2024 6:07 PM UTC

Is this in reference to your other post? If so, I just wanted to close the loop on this thread for anyone who might come across it. Thanks! 

Translate

Forum|alt.badge.img+2
  • Jul 9, 2024 6:07 PM UTC

Yep it is, thanks 🙂 Apologies for the cross posting, was doing the same thing as the solution here now no longer works. Checking out the solution provided on the other thread now :) 

Translate