cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 / Analytical List Page: Download Chart as Image

tobias_grimm_ksg
Explorer
0 Kudos

According to this post, in SAPUI5 1.40 a new feature has been introduced to download a SmartChart as an image. The download button can be enabled by setting the showDownloadButton = true. The ALP UI Adaption Documentation says the same. 

I have created an Analytical List Page with SAPUI5 Version 1.84. I tried setting the showDownloadButton in the mainfest.json, but I do not see any change in the UI. I also tried other properties mentioned in the docs like setting showLegendButton = false without any effect. 

Am I putting these properties in the wrong location or does anyone know why these settings have no effect on my ALP? 

 "pages": {
      "AnalyticalListPage|ZCAQ_CO_MYAPP": {
        "entitySet": "ZCAQ_CO_MYAPPResults",
        "component": {
          "name": "sap.suite.ui.generic.template.AnalyticalListPage",
          "list": true,
          "settings": {
            "contentTitle": "{{contentAreaTitle}}",
            "defaultFilterMode": "compact",
            "condensedTableLayout": true,
            "showGoButtonOnFilterBar": true,
            "autoHide": true,
            "smartVariantManagement": true,
            "showDownloadButton": true, //does not work
            "qualifier": "MainChart",
            "tableSettings": {
              "multiSelect": false,
              "type": "AnalyticalTable"
            },
            "chartSettings": {
              "showDataLabel": true,
              "showDownloadButton": true //does not work
            },
...

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

tobias_grimm_ksg
Explorer
0 Kudos

I found out you can set it from code in the onInit event handler of the controller and the button shows up: 

var smartChart sap.ui.getCore().byId("chartId");
smartChart.mProperties.showDownloadButton = true;

 download.png

I would still like to know if it is possible to enable the button via the settings in the manifest.json?