Esri / cedar

JavaScript Charts for ArcGIS
https://esri.github.io/cedar
257 stars 238 forks source link

export button #478

Closed zhengniu closed 3 years ago

zhengniu commented 3 years ago

@tomwayson

hi Tom,

Does JSON chart in ArcGIS Hub also support "Export"?

when I add below code to JSON Chart Configuration, the "Export" button does not show up on top right corner. However, it works in (https://esri.github.io/ember-cli-cedar/#/playground), when "enabled": false, the export button is hidden.

Thanks alot

zheng

`{ "type": "bar-horizontal", "export": { "enabled": true }, "datasets": [ { "name": "dataset1", "query": { "where": "City = 'Ottawa' and Street not like 'Hwy 7%'", "resultRecordCount": 100, "orderByFields": "Congestion_Score_sum_format DESC", "groupByFieldsForStatistics": "Street_City, City, Sum_Delay", "outStatistics": [ { "statisticType": "sum", "onStatisticField": "Cast(Congestion_Score as decimal(10,1))", "outStatisticFieldName": "Congestion_Score_sum" }, { "statisticType": "sum", "onStatisticField": "Congestion_Score", "outStatisticFieldName": "Congestion_Score_sum_format" } ] }, "url": "https://services.arcgis.com/6iGx1Dq91oKtcE7x/ArcGIS/rest/services/Congestion_score_street_city_summary/FeatureServer/0" } ], "series": [ { "source": "dataset1", "category": { "field": "Street_City", "label": "Corridor" }, "value": { "field": "Congestion_Score_sum", "label": "Congestion Score" } } ], "style": { "colors": [ "#026873" ] }, "overrides": {

"valueAxes": [
  {
    "minimum": 0,
    "maximum": 100
  }
],
"graphs": [
  {
    "balloonText": "<b>Corridor: </b>[[Street_City]] <br><b>Congestion Score:</b> [[Congestion_Score_sum]] <br><b>Delay:</b> [[Sum_Delay]] hours"
  }
]

} }`

tomwayson commented 3 years ago

Hub does not currently include the AmCharts plugin for exporting charts. You might suggest it as an enhancement.