-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 format "full-json" to Plotly.toImage and Plotly.dowloadImage #4593
Conversation
Since the figure attributes change from one version to another, we should possibly write plotly.js version to the output, IMO. |
Not a bad idea! Should we write it side-by-side with the |
Shouldn't we also consider |
We could, but in general the modeBarButtonsToAdd: [{
name: 'my button',
click: function(gd) { console.log('hello') }
}]
// would become
{
modeBarButtonsToAdd: [{
name: 'my button',
click: '_function_'
}]
} |
One more question: |
No, there are plenty of functions inside |
I think we’d want to only include the parts of full* that are in the
schema...
On Wed, Feb 19, 2020 at 17:31 Étienne Tétreault-Pinard < ***@***.***> wrote:
is it OK to assume nothing in data or layout is ever a function?
No, there are plenty of functions inside fullLayout e.g.
fullLayout.xaxis.l2p
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4593?email_source=notifications&email_token=AABRWA54QL3RBFLA3DKBN5DRDWXLDA5CNFSM4KYB7PW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMJ6NLI#issuecomment-588506797>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRWAY5YZXBFZ6SH27QCRDRDWXLDANCNFSM4KYB7PWQ>
.
--
Nicolas Kruchten-VP Product
Email nicolas@plot.ly
5555 Gaspe Ave #118, Montreal, QC, H2T 2A3
|
|
I'm not sure about the value of returning |
|
@alexcjohnson adding The problem I have at the moment is outputting the version number (ie. |
The trick is to hardcode it just like in Line 12 in 15d75db
and plotly.js/src/assets/geo_assets.js Line 15 in 15d75db
and then add a line below Lines 10 to 13 in 15d75db
updateVersion(/* path/to/file/ */); and let the |
At the moment, when downloading the file via cc @plotly/plotly_js @nicolaskruchten |
updateVersion(constants.pathToPlotlyCore); | ||
updateVersion(constants.pathToPlotlyGeoAssetsSrc); | ||
updateVersion(constants.pathToPlotlyVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done !!
I like |
some TODOs here:
|
I'm wondering if sorting the object's keys recursively is really required? Would it be valuable to users? |
Sorting isn’t a hard requirement, could be omitted for now, but I do think it could be useful. @archmoj pointed out diffing, though I guess |
Ok so would 81b8813 be satisfactory? I guess I could turn the |
Looks great to me - I wouldn't worry about No other comments from me, let's do it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 beautiful!
First step needed to complete plotly/orca#283
This PR introduces a new export format
full-json
that returns the graph JSON by usingplots.graphJson()
Also, this PR introduces a
version.js
file containing the current version of the library which is easy to import in any part of the code. See 6a8ac65 for details.TODO
full.json
extensioncc @nicolaskruchten