Skip to content

Updating cdn-options PR #492

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 3 commits into from
May 31, 2016
Merged

Updating cdn-options PR #492

merged 3 commits into from
May 31, 2016

Conversation

yankev
Copy link
Contributor

@yankev yankev commented May 30, 2016

  • removed the use of global variable __PLOTLY_USE_CDN.
  • added keyword description to docstring

Note: For requirejs.config, the js will added to the end of the path.
There were issues of plot persistence when I did include the .js.

@chriddyp

@chriddyp
Copy link
Member

Note: For requirejs.config, the js will added to the end of the path.
There were issues of plot persistence when I did include the .js.

Got it. Can you add a comment to the code to explain this?


connected (default=False) -- if connected is True, this means that the
plotly.js library will be loaded from a CDN(online) rather than the
local file from pip.
Copy link
Member

@chriddyp chriddyp May 30, 2016

Choose a reason for hiding this comment

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

Although this explains what it is doing, it doesn't really explain why. What if instead:


Arguments:

connected (default=False) -- If True, plotly.js library will be loaded from an online CDN. If False, plotly.js is loaded locally from this python package.

Use connected = True if you want your notebooks to have a smaller file size. plotly.js is a multi-megabyte file and when connected = False, the entire library is included inline inside the notebook. When connected = True, the library is downloaded from the web when you view the notebook. Since the library will be downloaded from the web, you and your viewers must be connected to the internet to be able to view this notebook's charts.

Use connected = False if you want you and your collaborators to be able to view and create charts regardless of your internet connection. This is the default option since it is the most predictable. Since the library will be included inline inside your notebook, this makes your notebooks considerably larger than if you were using connected = True.

@yankev
Copy link
Contributor Author

yankev commented May 30, 2016

@chriddyp K, made some more changes. Let me know what you think.

@chriddyp
Copy link
Member

💃

@yankev
Copy link
Contributor Author

yankev commented May 31, 2016

Cool, merging.

@yankev yankev merged commit ef9f4ba into master May 31, 2016
@cldougl cldougl deleted the cdn-options branch March 24, 2017 15:07
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