Skip to main content
Nintex Community Menu Bar
Question

Chart Averages

  • July 9, 2024
  • 8 replies
  • 11 views

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.


Forum|alt.badge.img+17
  • Nintex Employee
  • 3766 replies
  • July 9, 2024

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


Forum|alt.badge.img+17
  • Nintex Employee
  • 3766 replies
  • July 9, 2024

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


Forum|alt.badge.img+6
  • Nintex Employee
  • 402 replies
  • July 9, 2024

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:

    


Forum|alt.badge.img+3
  • Author
  • 14 replies
  • July 9, 2024

Thanks for all the replies. Problem solved!


Forum|alt.badge.img+2
  • 5 replies
  • July 9, 2024

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


Forum|alt.badge.img+6
  • Nintex Employee
  • 402 replies
  • July 9, 2024

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! 


Forum|alt.badge.img+2
  • 5 replies
  • July 9, 2024

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 :)