cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Correct method syntax for creating a gauge showing as a percentage

mega-seagate
Contributor

We are trying to create a report containing a 'gauge' using the Mega Report Studio.  We can create the gauge successfully, but now wish to modify the parameter to be a 'percentage' and not just a 'count'. 

 

 

Here is the contents of the method that we are currently using.  What would be the correct syntax for showing the the percentage?

 

'MegaContext(Fields,Types)

'---
'Compute
' You must return an object (collection, object, text, value...) to display
'---
'You can access header elements in a collection:
' config.headers.item(i)
'---
'You can optionnally set:
' config.color = "[RGB hexadecimal color]"
' config.currency = [true|false|a currency]
' config.percentage = [true|false]
' config.drilldown = [object collection]
' config.image = [true|false]
'---
'Input is a collection with the following functions:
' count()
' item(...)
' avg(oAtt)
' max(oAtt)
' min(oAtt)
' sum(oAtt)
'---

Function Compute(input,config)
 Compute=input.count
End Function

0 Replies