Using Dashboards I'm trying to create a serial chart that shows total count of features within each layer with the layer name on x-axis and count on y-axis. The individual layers come from the same hosted feature layer which is why the itemId is the same for each layer
// Access organization's ArcGIS Online URL
var portal = Portal("https.blank.maps.arcgis.com");
// Access each layer item as a feature set from the portal
var waterLine = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var sanLine = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var roads = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var waterPoly = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var sanPoly = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var other = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var building = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var bridge = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var boardwalk = FeatureSetByPortalItem(portal, "51dc078a4b35479fb975114ca4abf546", 0, ["*"], false)
var totalCount = Count(waterLine) + Count(sanLine) + Count(roads) + Count(waterPoly) +
Count(sanPoly) + Count(other) + Count(building) + Count(bridge) + Count(boardwalk)
var Dict = {
fields: [{name: 'total', type: 'esriFieldTypeInteger'}],
geometryType: '',
features: [{attributes: {total: totalCount}}],
};
//Return dictionary cast as a feature set
return FeatureSet(Text(Dict));Any help would be much appreciated, I'm very new to Arcade.