Skip to content

Export plot #103

Answered by FlorianJacta
vfreysz asked this question in Q&A
Discussion options

You must be logged in to vote

@vfreysz You can change the configuration to download an 'svg' like you would using Plotly Javascript. Taipy provides the API called plot_config to change the Plotly configuration. Other parameters can also be changed that are described in the Plotly configuration page.

from taipy import Gui

x = [1, 2, 3, 4, 5]
y = [2, 4, 1, 6, 3]
data = {'x': x, 'y': y}

# the format can be png, svg, jpeg, webp
config = {
    "toImageButtonOptions": {"format": 'svg'},  
}

Gui("<|{data}|chart|plot_config={config}|>").run()

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by FlorianJacta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants