René's URL Explorer Experiment


Title: Better update pattern for cartesian SVG · Issue #2563 · plotly/plotly.js · GitHub

Open Graph Title: Better update pattern for cartesian SVG · Issue #2563 · plotly/plotly.js

X Title: Better update pattern for cartesian SVG · Issue #2563 · plotly/plotly.js

Description: As @etpinard pointed out during the finance refactor PR #2561 (comment) and #2561 (comment) we have a mess when redrawing cartesian SVG traces, both re: deleting and redrawing existing traces and re: removing completely unused modules. T...

Open Graph Description: As @etpinard pointed out during the finance refactor PR #2561 (comment) and #2561 (comment) we have a mess when redrawing cartesian SVG traces, both re: deleting and redrawing existing traces and r...

X Description: As @etpinard pointed out during the finance refactor PR #2561 (comment) and #2561 (comment) we have a mess when redrawing cartesian SVG traces, both re: deleting and redrawing existing traces and r...

Opengraph URL: https://github.com/plotly/plotly.js/issues/2563

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better update pattern for cartesian SVG","articleBody":"As @etpinard pointed out during the finance refactor PR https://github.com/plotly/plotly.js/pull/2561#discussion_r181852562 and https://github.com/plotly/plotly.js/pull/2561#discussion_r181856275 we have a mess when redrawing cartesian SVG traces, both re: deleting and redrawing existing traces and re: removing completely unused modules.\r\n\r\nThe first part we can handle by making all the trace modules support more d3-idiomatic `enter/exit/each` logic as suggested in [this TODO](https://github.com/plotly/plotly.js/blob/82677ac8745ca56da740302977533dffcd5521b6/src/plots/cartesian/index.js#L201). The second has a few ways to go about it. Quoting @etpinard:\r\n\r\n\u003e What we need to do is find all the _gone_ modules (i.e. modules with `had??=true` and `has??=false`), loop over them, and then do what we need to do the cleanup the DOM. \r\n\u003e \r\n\u003e Better yet -- as more and more trace type will follow scatter and ohlc in not expecting a `selectAll('g.trace').remove()` before each `_module.plot()` -- we could add a trace module method (maybe called `cleanDOM`) to each trace modules that need to remove things for the DOM (or destroy WebGL objects). \r\n\u003e \r\n\u003e To note, geo subplots (and maybe others?) solve this problem in a different way by using `Plots.generalUpdatePerTraceModule` which calls `_module.plot` of visible **and**  _gone_ modules and expects the trace module plot methods to clean up the DOM accordingly (e.g. like [here](https://github.com/plotly/plotly.js/blob/18e19a86a3e683c1d11f6f4a04eb7f89d1b6108f/src/traces/choropleth/plot.js#L34) for choropleth traces). At present though, I think adding `cleanDOM` to each trace module would be best, as it would allow us to handle the `scattergl` and range-slider cases more easily.","author":{"url":"https://github.com/alexcjohnson","@type":"Person","name":"alexcjohnson"},"datePublished":"2018-04-16T22:41:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2563/plotly.js/issues/2563"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e5535488-997a-4135-4a41-31ef0f1b2b99
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9F3A:A5979:27F9193:3975737:6A566D04
html-safe-nonce55de8470a15680fb10947ccf621867efeca66f4f72d468c544036e5a225866bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjNBOkE1OTc5OjI3RjkxOTM6Mzk3NTczNzo2QTU2NkQwNCIsInZpc2l0b3JfaWQiOiIyNzkwNDM0ODU5NTE2MzI1MTI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac817041023ecd85ebacdf861c0fc70dc478c2f3918a7f7ab4dc3d0a10a64ea89b
hovercard-subject-tagissue:314843312
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/2563/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1e6e279e7e4cdc74269f65190cca9c5d69062cb07e2ffd611b4d2051bcbcae28/plotly/plotly.js/issues/2563
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1e6e279e7e4cdc74269f65190cca9c5d69062cb07e2ffd611b4d2051bcbcae28/plotly/plotly.js/issues/2563
og:image:altAs @etpinard pointed out during the finance refactor PR #2561 (comment) and #2561 (comment) we have a mess when redrawing cartesian SVG traces, both re: deleting and redrawing existing traces and r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealexcjohnson
hostnamegithub.com
expected-hostnamegithub.com
None1bfcd903bf3318822b10b18a6332fac40d3a21f7d94456dca766ab8fa7328068
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id45646037
octolytics-dimension-repository_nwoplotly/plotly.js
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id45646037
octolytics-dimension-repository_network_root_nwoplotly/plotly.js
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release37f446b78ad53e6f593aa1a4243b87c76a3428ab
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/plotly/plotly.js/issues/2563#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.js%2Fissues%2F2563
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.js%2Fissues%2F2563
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=plotly%2Fplotly.js
Reloadhttps://github.com/plotly/plotly.js/issues/2563
Reloadhttps://github.com/plotly/plotly.js/issues/2563
Reloadhttps://github.com/plotly/plotly.js/issues/2563
Please reload this pagehttps://github.com/plotly/plotly.js/issues/2563
plotly https://github.com/plotly
plotly.jshttps://github.com/plotly/plotly.js
Please reload this pagehttps://github.com/plotly/plotly.js/issues/2563
Notifications https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Fork 2k https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Star 18.3k https://github.com/login?return_to=%2Fplotly%2Fplotly.js
Code https://github.com/plotly/plotly.js
Issues 771 https://github.com/plotly/plotly.js/issues
Pull requests 56 https://github.com/plotly/plotly.js/pulls
Actions https://github.com/plotly/plotly.js/actions
Security and quality 0 https://github.com/plotly/plotly.js/security
Insights https://github.com/plotly/plotly.js/pulse
Code https://github.com/plotly/plotly.js
Issues https://github.com/plotly/plotly.js/issues
Pull requests https://github.com/plotly/plotly.js/pulls
Actions https://github.com/plotly/plotly.js/actions
Security and quality https://github.com/plotly/plotly.js/security
Insights https://github.com/plotly/plotly.js/pulse
Better update pattern for cartesian SVGhttps://github.com/plotly/plotly.js/issues/2563#top
https://github.com/alexcjohnson
alexcjohnsonhttps://github.com/alexcjohnson
on Apr 16, 2018https://github.com/plotly/plotly.js/issues/2563#issue-314843312
@etpinardhttps://github.com/etpinard
#2561 (comment)https://github.com/plotly/plotly.js/pull/2561#discussion_r181852562
#2561 (comment)https://github.com/plotly/plotly.js/pull/2561#discussion_r181856275
this TODOhttps://github.com/plotly/plotly.js/blob/82677ac8745ca56da740302977533dffcd5521b6/src/plots/cartesian/index.js#L201
@etpinardhttps://github.com/etpinard
herehttps://github.com/plotly/plotly.js/blob/18e19a86a3e683c1d11f6f4a04eb7f89d1b6108f/src/traces/choropleth/plot.js#L34
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.