Operations Dashboard - Value Conversion for CHARTS

2367
6
10-24-2018 10:42 AM
Status: Already Offered
deleted-user-8TVt6oc0ewsX
Occasional Contributor

The ability to apply a FACTOR (e.g. convert FEET to MILES) in an "Indicator" widget is VERY useful.  I would like to see the same capability added to SERIAL Charts and PIE Charts.  I want to sum length (feet) but report in MILES.  I currently can only show feet in charts.  Please add a "FACTOR" option to "Series" Labels.

Tags (1)
6 Comments
CodyHall

I agree, I'd like to see this ability added.

I'd like to convert gallons to liters before displaying on the chart. If I add access to the data structure I could make the change in the back-end, but sadly, I don't. I'm sure others are in the same position I am.

JayJohnsonWashoeCounty

Yes, this would be handy.  We have a COVID-19 dashboard and it would be useful to convert # of cases to # of cases per 100,000 on the fly, with out adding another field for this.

OlesyaPowers

We're working on getting our infrastructure stats into live dashboards for both internal and public use. Mostly everything is reported in miles. This would help immensely to be able to convert this on the fly. Adding another column to the data, that isn't going to be auto updated by the software isn't going to help us a whole lot in this case.

patrickb
Status changed to: Already Offered

The desired result (I believe) can be accomplished with data expressions. 

Some examples here.

 

CharlesHutchinson1

Agree this basic functionality would be very useful. Data expressions do the job to an extent but having to write code just to convert units is quite a big ask for users unfamiliar with Arcade. It also introduces constraints in other areas, for example (as far as I can tell) charts based on expressions do not respond to spatial filters.

HMarcks

This is marked as already available but it seems to only be available for the Gauge and Indicator NOT for Charts.  If any one actually knowns how to use a conversion factor for a pie chart please share the method.

Sorry, I missed the above comment regarding using Arcade to convert values.  It works but is a pain especially because the Globals are blank and I am sure a lot of people would not expect to have to do coding using the dashboard widgets.

Here is the code I used to get it done.  I am very new to this so I made notes in terms that I understand as of now.  Hopefully it helps others.

 

 

// GIS portal url from navigating to portal through browser
var portal = Portal('https://www.youraddress.arcgis.com/');


var fs = FeatureSetByPortalItem( 

// Hosted feature layer id from navigating to it through browser web address
    portal, 'xxxxxxxxxxxxxxx',

// layerID if sublayers are used also from web address
    xxxxxx,

// Field names of attributes you want returned for use
    ['Shape__Length','assettype'], 
    false
);

// Miles of main converted from feet grouped by main type
var fs_gp = GroupBy(fs, ['assettype'], [{name: 'Miles of Main', expression: 'Shape__Length*0.000189394', statistic: 'SUM' }]);

return fs_gp

 

 

Data available in chart after codeData available in chart after codeHaving to re-label because I couldn't figure out how to get the domain namesHaving to re-label because I couldn't figure out how to get the domain names