Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting buttons get dropped #84

Closed
maxxpower007 opened this issue Aug 10, 2023 · 3 comments · Fixed by #85
Closed

Exporting buttons get dropped #84

maxxpower007 opened this issue Aug 10, 2023 · 3 comments · Fixed by #85
Assignees
Labels
bug Something isn't working
Milestone

Comments

@maxxpower007
Copy link

Hey,

Not sure if I am doing this right, but when I set the 'exporting' option they seem to get dropped in the resulting export:

Eg:

hc_options = {
    'exporting': {
        'buttons': {
            'contextButton': {
                'enabled': False
            },
            'exportButton': {
                'text': 'Download',
                'menuItems': ['downloadPNG']
            }
        }
    }
}
chart = Chart(options=hc_options)
chart.to_json()

Results in this (Notice the menuItems are missing):

{"userOptions": {"exporting": {"buttons": {"contextButton": {"enabled": false}, "exportButton": {"text": "Download"}}}}}

Am I doing it wrong, or is there a problem..?
(Also happens when I try to set the 'onclick' event..

@hcpchris hcpchris self-assigned this Aug 10, 2023
@hcpchris hcpchris added question Further information is requested bug Something isn't working and removed question Further information is requested labels Aug 10, 2023
@hcpchris
Copy link
Collaborator

hcpchris commented Aug 10, 2023

Thanks, @maxxpower007 ! This looks to be a bug where defining a custom export button under a different key than contextButton is validating / loading against the wrong base class, which is causing certain properties (like menuItems and onclick) to be dropped.

I'll patch this in v.1.3.2 which will be released later today. This issue will get auto-closed as soon as the patch is released, but I'll confirm here for you as well.

@hcpchris hcpchris added this to the v.1.3.2 milestone Aug 10, 2023
@maxxpower007
Copy link
Author

Excellent..!
Thanks Chris

@hcpchris
Copy link
Collaborator

@maxxpower007 : Just confirming the bug was fixed, and v.1.3.2 was released. If you upgrade using pip install --upgrade highcharts-core this issue should be addressed. If this issue persists, feel free to re-open this issue. Otherwise, if you run into any other trouble feel free to log a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants