wergeld
wergeld

Reputation: 14462

HighStock Print Setting To Hide Range Selector

Using HighStock we want to give the user the option to print but we want to remove the rangeSelector from the image when we export. The following code does this for exporting to a file but it appears to be ignored when using print:

exporting: {
    chartOptions: {
        rangeSelector: {
            enabled: false
        }
    },
    buttons: {
        enabled: false
    },
    filename: 'UnempRate',
    width: 590
}

Note that we have the export buttons disabled because we are calling from a different HTML element. Even if we use the built-in buttons it will still show the rangeSelector on print.

This is related to my other question on the navigator series and chart title issues on export: HighStock Export Renders Incorrect Title and Navigator Series

Upvotes: 1

Views: 1882

Answers (2)

Igor Shastin
Igor Shastin

Reputation: 2888

I think this will help: jsFiddle.

It was difficult, but I've finally got it. If you also need to hide exporting buttons, try to achieve it by yourself.

Upvotes: 1

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

Please take look at this example:

http://jsfiddle.net/4ZMNg/

which export image without rangeselector:

 exporting:{
            chartOptions:{
                rangeSelector:{
                    enabled:false
                }
            }

        },

Upvotes: 1

Related Questions