Skip to content

Add config prop#15

Open
curio77 wants to merge 1 commit into
David-Desmaisons:masterfrom
curio77:config-prop
Open

Add config prop#15
curio77 wants to merge 1 commit into
David-Desmaisons:masterfrom
curio77:config-prop

Conversation

@curio77
Copy link
Copy Markdown

@curio77 curio77 commented Mar 8, 2020

This way, a config object that might otherwise be passed to
Plotly.setPlotConfig() or as the last argument to Plotly.newPlot(),
can be passed to the Plotly Vue component. It is still possible to
pass individial config props that get merged into the resulting config
object, but using the new config prop allows for encapsulation of
configuration as well as reuse and may help keep things tidier.

This way, a config object that might otherwise be passed to
`Plotly.setPlotConfig()` or as the last argument to `Plotly.newPlot()`,
can be passed to the `Plotly` Vue component.  It is still possible to
pass individial config props that get merged into the resulting config
object, but using the new config prop allows for encapsulation of
configuration as well as reuse and may help keep things tidier.
Comment thread src/components/Plotly.vue
},
config: {
type: Object
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use default: () => {} here instead of having the || {} on line 75?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants