René's URL Explorer Experiment


Title: Can't disable sunburst default animation · Issue #331 · plotly/react-plotly.js · GitHub

Open Graph Title: Can't disable sunburst default animation · Issue #331 · plotly/react-plotly.js

X Title: Can't disable sunburst default animation · Issue #331 · plotly/react-plotly.js

Description: Using NextJS 13, passing onSunburstClick={() => false} to the Plot component does not disable the default behaviour of clicking in a sunburst node and zooming in to that node. The component I'm creating: import { Content, ContextualHelp,...

Open Graph Description: Using NextJS 13, passing onSunburstClick={() => false} to the Plot component does not disable the default behaviour of clicking in a sunburst node and zooming in to that node. The component I'm cre...

X Description: Using NextJS 13, passing onSunburstClick={() => false} to the Plot component does not disable the default behaviour of clicking in a sunburst node and zooming in to that node. The component I...

Opengraph URL: https://github.com/plotly/react-plotly.js/issues/331

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't disable sunburst default animation","articleBody":"Using NextJS 13, passing  `onSunburstClick={() => false}` to the `Plot` component does not disable the default behaviour of clicking in a sunburst node and zooming in to that node.\r\n\r\nThe component I'm creating:\r\n\r\n```jsx\r\nimport {\r\n  Content,\r\n  ContextualHelp,\r\n  Flex,\r\n  Heading,\r\n  Slider,\r\n} from '@adobe/react-spectrum';\r\nimport plotly, { Font, PlotData } from 'plotly.js';\r\nimport { useState } from 'react';\r\nimport createPlotComponent from 'react-plotly.js/factory';\r\n\r\nconst Plot = createPlotComponent(plotly);\r\n\r\ninterface SunburstPlotData extends Partial\u003cPlotData> {\r\n  outsidetextfont?: Partial\u003cFont>;\r\n  leaf?: { opacity?: number };\r\n  maxdepth?: number;\r\n}\r\n\r\n// NOTE: to access the taxon id:\r\n// e.points[0].customdata\r\n\r\nexport default function TaxonSunburst() {\r\n  const [maxDepthValue, setMaxDepthValue] = useState\u003cnumber>(3);\r\n\r\n  const data: SunburstPlotData[] = [\r\n    {\r\n      type: 'sunburst',\r\n      // NOTE: this is for the taxon names\r\n      labels: [\r\n        'Eve',\r\n        'Cain',\r\n        'Seth',\r\n        'Enos',\r\n        'Noam',\r\n        'Abel',\r\n        'Awan',\r\n        'Enoch',\r\n        'Azura',\r\n      ],\r\n      // NOTE: this is going to be used for the taxids\r\n      customdata: [1, 2, 3, 4, 5, 6, 7, 8, 9],\r\n      // NOTE: parent of each taxon\r\n      parents: ['', 'Eve', 'Eve', 'Seth', 'Seth', 'Eve', 'Eve', 'Awan', 'Eve'],\r\n      // NOTE: paper counts per taxon\r\n      values: [10, 14, 12, 10, 2, 6, 6, 4, 4],\r\n      outsidetextfont: { size: 20, color: '#377eb8' },\r\n      leaf: { opacity: 0.4 },\r\n      marker: { line: { width: 2 } },\r\n      maxdepth: maxDepthValue,\r\n    },\r\n  ];\r\n\r\n  return (\r\n    \u003cFlex\r\n      direction=\"column\"\r\n      alignItems=\"center\"\r\n      marginY=\"size-200\"\r\n      maxWidth=\"100%\"\r\n    >\r\n      \u003cSlider\r\n        label=\"Depth\"\r\n        minValue={1}\r\n        maxValue={3}\r\n        value={maxDepthValue}\r\n        onChange={setMaxDepthValue}\r\n        isFilled\r\n        contextualHelp={\r\n          \u003cContextualHelp>\r\n            \u003cHeading>What is depth?\u003c/Heading>\r\n            \u003cContent>\r\n              Depth controls the maximum taxonomic level that is shown in the\r\n              plot.\r\n            \u003c/Content>\r\n          \u003c/ContextualHelp>\r\n        }\r\n      />\r\n      \u003cPlot\r\n        data={data}\r\n        style={{ width: '100%' }}\r\n        layout={{ autosize: true }}\r\n        useResizeHandler\r\n        onSunburstClick={() => false}\r\n      />\r\n    \u003c/Flex>\r\n  );\r\n}\r\n``` \r\n\r\nIn order for SSR to work properly, I'm loading the component like so (from my `pages/index.tsx`):\r\n\r\n```jsx\r\n// ...\r\nimport dynamic from 'next/dynamic';\r\n// ...\r\n\r\nconst TaxonSunburst = dynamic(import('../components/TaxonSunburst'), {\r\n  ssr: false,\r\n  loading: () => (\r\n    \u003cFlex\r\n      justifyContent=\"center\"\r\n      marginY=\"size-200\"\r\n    >\r\n      \u003cProgressCircle\r\n        aria-label=\"Loading sunburst plot\"\r\n        isIndeterminate\r\n      />\r\n    \u003c/Flex>\r\n  ),\r\n});\r\n```\r\n\r\nThe `onClick` event works properly. Also, modifying `onSunburstClick` with something like `onSunburstClick={() => alert(\"test\")}` also works. I would like to disable the default behaviour of the sunburst plots.","author":{"url":"https://github.com/mdoliv","@type":"Person","name":"mdoliv"},"datePublished":"2023-10-28T01:00:25Z","url":"https://github.com/plotly/react-plotly.js/issues/331"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e315da3e-f1e0-6f3e-5eb0-30126d119bcc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCDD6:EA09B:518F65:6E0F16:6B00CFC3
html-safe-nonce51b295bb8e0cf4f9da4e6e254f2b86b50cd1c69c4ce204bb2ea19f39631dc9e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREQ2OkVBMDlCOjUxOEY2NTo2RTBGMTY6NkIwMENGQzMiLCJ2aXNpdG9yX2lkIjoiNjgyOTE4ODIzOTQyMTY1NzAyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccfed6e2f87a0d8cee762efbc7acd68b4d73723082d840ec25b172530e8494387
hovercard-subject-tagissue:1966339932
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/react-plotly.js/331/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e7cb8c8e01112d94cf2437943038c06a97cae883834cecdec5697a732021a50e/plotly/react-plotly.js/issues/331
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e7cb8c8e01112d94cf2437943038c06a97cae883834cecdec5697a732021a50e/plotly/react-plotly.js/issues/331
og:image:altUsing NextJS 13, passing onSunburstClick={() => false} to the Plot component does not disable the default behaviour of clicking in a sunburst node and zooming in to that node. The component I'm cre...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemdoliv
hostnamegithub.com
expected-hostnamegithub.com
None85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5
turbo-cache-controlno-preview
go-importgithub.com/plotly/react-plotly.js git https://github.com/plotly/react-plotly.js.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id98463844
octolytics-dimension-repository_nwoplotly/react-plotly.js
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id98463844
octolytics-dimension-repository_network_root_nwoplotly/react-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
release4943239a6d2c591325dad6e5c313e1cafda877f6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/plotly/react-plotly.js/issues/331#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Freact-plotly.js%2Fissues%2F331
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Freact-plotly.js%2Fissues%2F331
Sign uphttps://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%2Freact-plotly.js
Reloadhttps://github.com/plotly/react-plotly.js/issues/331
Reloadhttps://github.com/plotly/react-plotly.js/issues/331
Reloadhttps://github.com/plotly/react-plotly.js/issues/331
plotlyhttps://github.com/plotly
react-plotly.jshttps://github.com/plotly/react-plotly.js
Codehttps://github.com/plotly/react-plotly.js
Issues142 (142)https://github.com/plotly/react-plotly.js/issues
Pull requests1 (1)https://github.com/plotly/react-plotly.js/pulls
Actionshttps://github.com/plotly/react-plotly.js/actions
Security and qualityhttps://github.com/plotly/react-plotly.js/security
Insightshttps://github.com/plotly/react-plotly.js/insights
https://github.com/plotly/react-plotly.js
New issuehttps://github.com/login?return_to=https://github.com/plotly/react-plotly.js/issues/331
New issuehttps://github.com/login?return_to=https://github.com/plotly/react-plotly.js/issues/331
Can't disable sunburst default animationhttps://github.com/plotly/react-plotly.js/issues/331#top
https://github.com/mdoliv
mdolivhttps://github.com/mdoliv
on Oct 28, 2023https://github.com/plotly/react-plotly.js/issues/331#issue-1966339932
https://github.com/Safa-Morjane
Safa-Morjanehttps://github.com/Safa-Morjane
on Feb 15, 2024https://github.com/plotly/react-plotly.js/issues/331#issuecomment-1945986754
Sign up for freehttps://github.com/signup?return_to=https://github.com/plotly/react-plotly.js/issues/331
Sign in to commenthttps://github.com/login?return_to=https://github.com/plotly/react-plotly.js/issues/331
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.