René's URL Explorer Experiment


Title: sunburst plots: 'plotly_click' event_data only available for root and leafs · Issue #1648 · plotly/plotly.R · GitHub

Open Graph Title: sunburst plots: 'plotly_click' event_data only available for root and leafs · Issue #1648 · plotly/plotly.R

X Title: sunburst plots: 'plotly_click' event_data only available for root and leafs · Issue #1648 · plotly/plotly.R

Description: Currently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot. I'm wondering whether this behaviour is intentional and inherited by plotly.js or not. Please see t...

Open Graph Description: Currently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot. I'm wondering whether this behaviour is intentional and inh...

X Description: Currently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot. I'm wondering whether this behaviour is intenti...

Opengraph URL: https://github.com/plotly/plotly.R/issues/1648

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sunburst plots: 'plotly_click' event_data only available for root and leafs","articleBody":"Currently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot.\r\n\r\nI'm wondering whether this behaviour is intentional and inherited by plotly.js or not.\r\n\r\nPlease see the following example and a workaround I came up with using `onclick`, which I first posted [here](https://stackoverflow.com/a/58706762/9841389):\r\n\r\n```r\r\nlibrary(plotly)\r\nlibrary(shinyjs)\r\n\r\nDF \u003c- structure(list(labels = c(\"total\", \"A\", \"C\", \"B\", \"F\", \"E\", \"F\", \r\n                                \"E\", \"D\", \"E\", \"D\", \"D\", \"F\", \"G\", \"H\", \"H\", \"G\", \"H\", \"G\", \"H\", \r\n                                \"H\", \"G\", \"I\", \"G\", \"I\", \"H\", \"G\", \"I\", \"I\", \"G\", \"G\", \"I\", \"H\", \r\n                                \"H\", \"I\", \"I\", \"I\", \"H\", \"I\", \"G\"),\r\n                     values = c(100L, 36L, 29L,\r\n                                35L, 12L, 14L, 10L, 14L, 8L, 18L, 5L, 10L, 9L, 6L, 5L, 4L, 3L,\r\n                                7L, 4L, 2L, 6L, 3L, 8L, 3L, 2L, 4L, 4L, 4L, 4L, 4L, 3L, 2L, 5L, \r\n                                5L, 2L, 2L, 1L, 1L, 1L, 5L),\r\n                     parents = c(NA, \"total\", \"total\", \"total\", \"total - A\", \"total - C\", \"total - C\", \"total - A\",\r\n                                 \"total - B\", \"total - B\", \"total - C\", \"total - A\", \"total - B\",\r\n                                 \"total - A - F\", \"total - C - E\", \"total - C - F\", \"total - A - E\",\r\n                                 \"total - A - E\", \"total - B - D\", \"total - B - D\", \"total - B - E\",\r\n                                 \"total - C - D\", \"total - B - E\", \"total - A - D\", \"total - B - D\",\r\n                                 \"total - B - F\", \"total - C - F\", \"total - A - E\", \"total - C - E\",\r\n                                 \"total - B - E\", \"total - B - F\", \"total - A - D\", \"total - A - D\",\r\n                                 \"total - A - F\", \"total - B - F\", \"total - C - F\", \"total - C - D\",\r\n                                 \"total - C - D\", \"total - A - F\", \"total - C - E\"),\r\n                     ids = c(\r\n                       \"total\", \"total - A\", \"total - C\", \"total - B\", \"total - A - F\", \"total - C - E\", \r\n                       \"total - C - F\", \"total - A - E\", \"total - B - D\", \"total - B - E\", \"total - C - D\",\r\n                       \"total - A - D\", \"total - B - F\", \"total - A - F - G\", \"total - C - E - H\",\r\n                       \"total - C - F - H\", \"total - A - E - G\", \"total - A - E - H\", \"total - B - D - G\",\r\n                       \"total - B - D - H\", \"total - B - E - H\", \"total - C - D - G\", \"total - B - E - I\",\r\n                       \"total - A - D - G\", \"total - B - D - I\", \"total - B - F - H\", \"total - C - F - G\",\r\n                       \"total - A - E - I\", \"total - C - E - I\", \"total - B - E - G\", \"total - B - F - G\",\r\n                       \"total - A - D - I\", \"total - A - D - H\", \"total - A - F - H\", \"total - B - F - I\",\r\n                       \"total - C - F - I\", \"total - C - D - I\", \"total - C - D - H\", \"total - A - F - I\",\r\n                       \"total - C - E - G\"\r\n                     )), row.names = c(NA,-40L), class = \"data.frame\")\r\n\r\nui \u003c- fluidPage(\r\n  useShinyjs(),\r\n  plotlyOutput(\"sunburst\"),\r\n  htmlOutput(\"hoverDataOut\"),\r\n  htmlOutput(\"clickDataOut\")\r\n)\r\n\r\nserver \u003c- function(input, output, session) {\r\n  output$sunburst \u003c- renderPlotly({\r\n    plot_ly(data = DF, source = \"sunSource\", customdata = ~ids, ids = ~ids, labels= ~labels, parents = ~parents, values= ~values, type='sunburst', branchvalues = 'total')\r\n  })\r\n  \r\n  hoverData \u003c- reactive({\r\n    currentEventData \u003c- unlist(event_data(event = \"plotly_hover\", source = \"sunSource\", priority = \"event\"))\r\n  })\r\n  \r\n  clickData \u003c- reactiveVal()\r\n  \r\n  observe({\r\n    clickData(unlist(event_data(event = \"plotly_click\", source = \"sunSource\", priority = \"event\")))\r\n  })\r\n  \r\n  # workaround:\r\n  # onclick(id = \"sunburst\", expr = {clickData(hoverData())})\r\n  \r\n  output$hoverDataOut \u003c- renderText({\r\n    paste(\"Hover data:\", paste(names(hoverData()), unlist(hoverData()), sep = \": \", collapse = \" | \"))\r\n  })\r\n  \r\n  output$clickDataOut \u003c- renderText({\r\n    paste(\"Click data:\", paste(names(clickData()), unlist(clickData()), sep = \": \", collapse = \" | \"))\r\n  })\r\n  \r\n}\r\n\r\nshinyApp(ui, server)\r\n```\r\n---\r\n\r\n![screen](https://user-images.githubusercontent.com/36849480/68189754-58c0d100-ffac-11e9-9ec6-29a47a346376.gif)\r\n","author":{"url":"https://github.com/ismirsehregal","@type":"Person","name":"ismirsehregal"},"datePublished":"2019-11-05T08:05:32Z","url":"https://github.com/plotly/plotly.R/issues/1648"}

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:a7e02a87-ef7c-72a0-b393-e579be3e7a4f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA92A:215B92:D5F892:11DCF8B:6B0101B7
html-safe-nonce9a233f833a73166e55180dc06b36a6093241736990aa9a4af7425d13d12d1313
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTJBOjIxNUI5MjpENUY4OTI6MTFEQ0Y4Qjo2QjAxMDFCNyIsInZpc2l0b3JfaWQiOiIzMTEwMjA0NjcwODg3Mzk1NzY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9109a3ea7c1fb769d14e8c6a9d80233cc6cdd735bd1cbd549d9b4e6bcfeae810
hovercard-subject-tagissue:517608332
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.R/1648/issue_layout
twitter:imagehttps://opengraph.githubassets.com/eecd89600791488ee43798868976b8b3c9ee7efd148cbe9851749c31c2051c80/plotly/plotly.R/issues/1648
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/eecd89600791488ee43798868976b8b3c9ee7efd148cbe9851749c31c2051c80/plotly/plotly.R/issues/1648
og:image:altCurrently it seems that for sunburst plots the 'plotly_click' event_data is only available after clicking the root and leafs of the plot. I'm wondering whether this behaviour is intentional and inh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameismirsehregal
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.R git https://github.com/plotly/plotly.R.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id14579179
octolytics-dimension-repository_nwoplotly/plotly.R
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14579179
octolytics-dimension-repository_network_root_nwoplotly/plotly.R
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
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/plotly/plotly.R/issues/1648#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.R%2Fissues%2F1648
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%2Fplotly.R%2Fissues%2F1648
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%2Fplotly.R
Reloadhttps://github.com/plotly/plotly.R/issues/1648
Reloadhttps://github.com/plotly/plotly.R/issues/1648
Reloadhttps://github.com/plotly/plotly.R/issues/1648
plotlyhttps://github.com/plotly
plotly.Rhttps://github.com/plotly/plotly.R
Codehttps://github.com/plotly/plotly.R
Issues716 (716)https://github.com/plotly/plotly.R/issues
Pull requests47 (47)https://github.com/plotly/plotly.R/pulls
Discussionshttps://github.com/plotly/plotly.R/discussions
Actionshttps://github.com/plotly/plotly.R/actions
Projectshttps://github.com/plotly/plotly.R/projects
Wikihttps://github.com/plotly/plotly.R/wiki
Security and qualityhttps://github.com/plotly/plotly.R/security
Insightshttps://github.com/plotly/plotly.R/insights
https://github.com/plotly/plotly.R
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.R/issues/1648
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.R/issues/1648
sunburst plots: 'plotly_click' event_data only available for root and leafshttps://github.com/plotly/plotly.R/issues/1648#top
plotly.jshttps://github.com/plotly/plotly.R/issues?q=state%3Aopen%20label%3A%22plotly.js%22
https://github.com/ismirsehregal
ismirsehregalhttps://github.com/ismirsehregal
on Nov 5, 2019https://github.com/plotly/plotly.R/issues/1648#issue-517608332
herehttps://stackoverflow.com/a/58706762/9841389
https://user-images.githubusercontent.com/36849480/68189754-58c0d100-ffac-11e9-9ec6-29a47a346376.gif
https://github.com/dracodoc
dracodochttps://github.com/dracodoc
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-550316302
https://github.com/cpsievert
cpsieverthttps://github.com/cpsievert
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-550485778
plotly/plotly.js#4338https://github.com/plotly/plotly.js/issues/4338
cpsieverthttps://github.com/cpsievert
completedhttps://github.com/plotly/plotly.R/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#event-2776765601
cpsieverthttps://github.com/cpsievert
plotly.jshttps://github.com/plotly/plotly.R/issues?q=state%3Aopen%20label%3A%22plotly.js%22
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#event-2776766300
cpsieverthttps://github.com/cpsievert
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#event-2777173629
cpsieverthttps://github.com/cpsievert
completedhttps://github.com/plotly/plotly.R/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
bcae42bhttps://github.com/plotly/plotly.R/commit/bcae42bbeea8d8368fb3ca881243e6acd0c661b4
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#event-2777180900
https://github.com/cpsievert
cpsieverthttps://github.com/cpsievert
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-550539231
https://github.com/xhdong-umd
xhdong-umdhttps://github.com/xhdong-umd
on Nov 6, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-550539793
https://github.com/dracodoc
dracodochttps://github.com/dracodoc
on Nov 7, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-551179504
@cpsieverthttps://github.com/cpsievert
https://github.com/cpsievert
cpsieverthttps://github.com/cpsievert
on Nov 7, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-551191284
https://plotly-r.com/linking-views-with-shiny.html#reactive-valshttps://plotly-r.com/linking-views-with-shiny.html#reactive-vals
https://github.com/dracodoc
dracodochttps://github.com/dracodoc
on Nov 7, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-551202353
https://github.com/ismirsehregal
ismirsehregalhttps://github.com/ismirsehregal
on Nov 7, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-551260107
https://github.com/dracodoc
dracodochttps://github.com/dracodoc
on Nov 7, 2019https://github.com/plotly/plotly.R/issues/1648#issuecomment-551280811
chschanhttps://github.com/chschan
on Mar 12, 2020https://github.com/plotly/plotly.R/issues/1648#event-3121270941
[pull] master from ropensci:master (#2)https://github.com/Displayr/plotly/commit/32dde4152264fdfa964f7b3c796fb3ac91b17666
#2https://github.com/Displayr/plotly/pull/2
https://docs.github.com/articles/closing-issues-via-commit-messages
32dde41https://github.com/Displayr/plotly/commit/32dde4152264fdfa964f7b3c796fb3ac91b17666
chschanhttps://github.com/chschan
on Jun 26, 2022https://github.com/plotly/plotly.R/issues/1648#event-6880336078
[pull] master from ropensci:master (#2)https://github.com/Displayr/plotly/commit/504c33f5a9c92f511cfeade4708bfa5928d13dcc
#2https://github.com/Displayr/plotly/pull/2
https://docs.github.com/articles/closing-issues-via-commit-messages
504c33fhttps://github.com/Displayr/plotly/commit/504c33f5a9c92f511cfeade4708bfa5928d13dcc
chschanhttps://github.com/chschan
on Jul 4, 2022https://github.com/plotly/plotly.R/issues/1648#event-6924524270
Plotly june2022 (#18)https://github.com/Displayr/plotly/commit/55f49ee1fce06c206aed509fa1a944ac49fc5560
#18https://github.com/Displayr/plotly/pull/18
https://docs.github.com/articles/closing-issues-via-commit-messages
55f49eehttps://github.com/Displayr/plotly/commit/55f49ee1fce06c206aed509fa1a944ac49fc5560
Sign up for freehttps://github.com/signup?return_to=https://github.com/plotly/plotly.R/issues/1648
Sign in to commenthttps://github.com/login?return_to=https://github.com/plotly/plotly.R/issues/1648
plotly.jshttps://github.com/plotly/plotly.R/issues?q=state%3Aopen%20label%3A%22plotly.js%22
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.