Hi All,
Trying to compose a popup with a linechart. Using the samples I managed to produce a chart Not really happy with the result...
Below is my code and a screenshot of my popup containing a ArcGis-Pro chart (picture as attachement) and the arcade media chart. I'd like to alter the arcade-chart so it looks more like the Pro-chart.
Specific questions:
A Can I add x-axes labels?
B Can I style the grapg line?
var relsel = OrderBy(FeatureSetByRelationshipName($feature,"FeatureVerticesToP_v4", ['*']),"POINT_M");
var firstR = First(relsel)
var chartValues = {}
var chartNames = []
for (var f in relsel) {
chartValues[Text(f.POINT_M, '#,#')] = f.POINT_Z
Push(chartNames, Text(f.POINT_M, '#,#'))
}
return {
type: 'media',
title : 'TestChart',
description : 'Chart showing crossection of the walk that day',
attributes : chartValues, // replace this dictionary with your own key-value pairs,
mediaInfos: [{
type : 'linechart', //linechart | barchart | piechart | columnchart
//title : '',
//caption : '',
altText : 'profile graph showing crossection of the days walk', //altText will be read by screen readers
value : {
fields: chartNames, // choose what attributes to use in the chart
//normalizeField : '', // the name of the attribute to normalize by or value
}
}]
}
I had the same problem with the axes labelling. A quick and dirty workaround was to add css to your application...
To add a y axis label use: