Specifying custom size for the Shield UI JavaScript export image

100 Views Asked by At

I have a Shield UI JavaScript Chart and have been examining the documentation to it related to export. What I need is to be able to set different dimensions for the image that the chart is being exported to.

There are a few properties of that group so I tried to use following code:

            exportOptions:
                  {
                      image: true,
                      print: true,
                      width:100,
                      height: 100,                          
                  },

however, although as expected, the size won’t change. How can I find a solution and get a custom size of the export image?

1

There are 1 best solutions below

0
On BEST ANSWER

You are right. The two properties: width and height are not applicable for the Shield UI exportOptions.

What I could suggest as an idea is to change the dimensions of the chart beforehand. So when exporting to image it will have the dimensions that you need.