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

Add config prop #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

curio77
Copy link

@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.
@@ -22,6 +22,9 @@ export default {
layout: {
type: Object
},
config: {
type: Object
},
Copy link

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