Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch to use anywidget#4663

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
marthacryan wants to merge43 commits intoplotly:masterfrommarthacryan:anywidget
Closed

Conversation

@marthacryan
Copy link
Collaborator

@marthacryanmarthacryan commentedJul 14, 2024
edited
Loading

Co-authored by@manzt! This updates the logic for theFigureWidget to rely onanywidget.
A quote about anywidget from the documentation for context:

anywidget is both aspecification and toolset for authoring reusable web-based widgets for interactive computing environments. As a specification, it defines a standard for widget front-end code. As a toolkit, it provides tools for authoring widget front-end code according to the specification, as well as a Python library that simplifies creating and publishing customJupyter Widgets.

This will not affect thego.Figure class. High level explanation of the difference between usinggo.Figure andgo.FigureWidget:

  • go.Figure: The chart generated by this object will be interactive on theclient side. For many purposes, this is all a user needs to do with a chart. The interactions are things like zooming in, or any of the various operations in the toolbar.
  • go.FigureWidget: The difference here is that the figure is interactive on theserver side as well.
    • Interactions with the plotly chart can be sent to the python kernel and used in other widgets.
    • Interactions with other widgets can be used to control the chart

@marthacryanmarthacryan marked this pull request as draftJuly 14, 2024 17:57
@gvwilsongvwilson requested a review fromemilyklJuly 17, 2024 18:28
@gvwilsongvwilson added featuresomething new P2considered for next cycle communitycommunity contribution labelsAug 13, 2024
{
"scripts": {
"build":"esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=../plotly/bundle.js widget.ts",
"watch":"npm run build -- --watch --sourcemap=inline",
Copy link
Contributor

@manztmanztSep 16, 2024
edited
Loading

Choose a reason for hiding this comment

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

sourcemaps will make it easier to debug when developing the widget using the browser developer tools.

marthacryan reacted with thumbs up emoji
@@ -0,0 +1,17 @@
{
"scripts": {
"build":"esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=../plotly/bundle.js widget.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

I added the--minify and--alias flags.minify makes the final bundle smaller.

The alias here is to make the import nicer for typescript type checking types (tsc), while esbuild needs to point to the actual files (./dist).

@marthacryanmarthacryan mentioned this pull requestOct 18, 2024
@marthacryanmarthacryan mentioned this pull requestOct 22, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@emilyklemilyklAwaiting requested review from emilykl

1 more reviewer

@manztmanztmanzt left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@marthacryanmarthacryan

Labels

communitycommunity contributionfeaturesomething newP2considered for next cycle

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@marthacryan@manzt@gvwilson

[8]ページ先頭

©2009-2025 Movatter.jp