Skip to content

add makeTemplate and validateTemplate to plotly_js function reference. #1118

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

Merged
merged 2 commits into from
Oct 17, 2018

Conversation

michaelbabyn
Copy link
Contributor

resolves #1111

@michaelbabyn michaelbabyn requested a review from cldougl October 5, 2018 16:42
@nicolaskruchten
Copy link
Contributor

I think it might be nice to get @alexcjohnson to weigh in here as well perhaps? I'm always anxious to get plotly.js developers' input on the function reference docs as they evolve :)

@nicolaskruchten
Copy link
Contributor

@VeraZab check this out.

<dd>
<dl>
<dt><code>figure</code></dt>
<dd>a plot object, with <code>{data, layout}</code> members
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or a <div> DOM element with a plot already in it - at least once v1.42 is out (next week) with plotly/plotly.js#3111 (thanks @antoinerg!)

<dd>
<dl>
<dt><code>figure</code></dt>
<dd>a plot object, with <code>{data, layout}</code> members
Copy link
Collaborator

Choose a reason for hiding this comment

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

this too can be a DOM element (with or without the PR mentioned above)

type:'bar',
y:[3,2,5,8]
}]
layoutTemplate = {template:template}
Copy link
Collaborator

Choose a reason for hiding this comment

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

🐄 layoutTemplate makes it sound like this is a template, but it's a layout. Perhaps layoutWithTemplate?

@alexcjohnson
Copy link
Collaborator

Very nice @michaelbabyn!

I'm assuming there will be a separate PR to document the structure of a template better? We have https://plot.ly/javascript/reference/#layout-template but I think it needs a lot more detail, with some examples, to really be useful.

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.

Document the new plotly.js makeTemplate function and layout.template attr
3 participants