René's URL Explorer Experiment


Title: how to define Args parameter for UpdateMenuButton.init for release version 5.0 · plotly/Plotly.NET · Discussion #456 · GitHub

Open Graph Title: how to define Args parameter for UpdateMenuButton.init for release version 5.0 · plotly/Plotly.NET · Discussion #456

X Title: how to define Args parameter for UpdateMenuButton.init for release version 5.0 · plotly/Plotly.NET · Discussion #456

Description: how to define Args parameter for UpdateMenuButton.init for release version 5.0

Open Graph Description: Following code doesn't compile anymore with release 5.0: UpdateMenuButton.init(Args: new string[] { "mode", "lines"}, Label: "Lines", Method: UpdateMethod.Restyle) Args with string[] is no longer v...

X Description: Following code doesn't compile anymore with release 5.0: UpdateMenuButton.init(Args: new string[] { "mode", "lines"}, Label: "Lines", Method: UpdateMethod.Restyle)...

Opengraph URL: https://github.com/plotly/Plotly.NET/discussions/456

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"how to define Args parameter for  UpdateMenuButton.init for release version 5.0","text":"

Following code doesn't compile anymore with release 5.0:

\n

UpdateMenuButton.init(Args: new string[] { \"mode\", \"lines\"}, Label: \"Lines\", Method: UpdateMethod.Restyle)

\n

Args with string[] is no longer valid.

\n

How to define args with release 5.0?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Hi @kunjiangkun,

\n

The original intention of changing the argument type to DynamicObj[] was to support arguments of different types (see #414), because in the final schema, args is a json array with arbitrary types.

\n

This means that you now have to create dynamic objects with field names set to your argument names. Here is a simple example:

\n
using Plotly.NET;\nusing Plotly.NET.LayoutObjects;\nusing DynamicObj;\n\nvar mode1 = new DynamicObj.DynamicObj();\nmode1.SetValue(\"mode\", \"markers\");\n\nvar mode2 = new DynamicObj.DynamicObj();\nmode2.SetValue(\"mode\", \"lines\");\n\nvar myBtn1 = UpdateMenuButton.init(\n    Args: new DynamicObj.DynamicObj[] {mode1}, Label: \"Markers\", Method: StyleParam.UpdateMethod.Restyle);\n\nvar myBtn2 = UpdateMenuButton.init(\n    Args: new DynamicObj.DynamicObj[] {mode2}, Label: \"Lines\", Method: StyleParam.UpdateMethod.Restyle);\n\nChart2D.Chart.Point<int,int,string>(\n    x: new[] {1, 2, 3, 4},\n    y: new[] {10, 11, 12, 13}\n)\n.WithUpdateMenu(UpdateMenu.init(Buttons: new UpdateMenuButton[] {myBtn1, myBtn2}))
","upvoteCount":1,"url":"https://github.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918"}}}

route-pattern/:user_id/:repository/discussions/:number(.:format)
route-controllerdiscussions
route-actionshow
fetch-noncev2:2b7d31df-225a-abde-e35e-07e275179789
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-idB856:140A92:2FB7EE:41A0B5:698F4CE1
html-safe-nonce2292bd0ccb9a03f331be13b456472ace5965d540d246b2b2a71f585df3291b74
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODU2OjE0MEE5MjoyRkI3RUU6NDFBMEI1OjY5OEY0Q0UxIiwidmlzaXRvcl9pZCI6IjkxNDMzNzA2MzE5OTA5NTUyMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfebbf001badd3fc65e5b9c8299c2127001658b01a71fcf674fe729fb04d6101a
hovercard-subject-tagdiscussion:6778285
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///discussions/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/plotly/Plotly.NET/discussions/456
twitter:imagehttps://opengraph.githubassets.com/6a27fc4df305ad6733858055b3ed9eeeccd6610a7d1c72acf3ed5f7b6cb8c6c0/plotly/Plotly.NET/discussions/456
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6a27fc4df305ad6733858055b3ed9eeeccd6610a7d1c72acf3ed5f7b6cb8c6c0/plotly/Plotly.NET/discussions/456
og:image:altFollowing code doesn't compile anymore with release 5.0: UpdateMenuButton.init(Args: new string[] { "mode", "lines"}, Label: "Lines", Method: UpdateMethod.Restyle) Args with string[] is no longer v...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1
turbo-cache-controlno-preview
go-importgithub.com/plotly/Plotly.NET git https://github.com/plotly/Plotly.NET.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id58708375
octolytics-dimension-repository_nwoplotly/Plotly.NET
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58708375
octolytics-dimension-repository_network_root_nwoplotly/Plotly.NET
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
release6a0e76b4dbdd86599b4b518abe0e57175194496e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F456
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F456
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fdiscussions%2Fshow&source=header-repo&source_repo=plotly%2FPlotly.NET
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
plotly https://patch-diff.githubusercontent.com/plotly
Plotly.NEThttps://patch-diff.githubusercontent.com/plotly/Plotly.NET
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Fork 101 https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Star 834 https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Code https://patch-diff.githubusercontent.com/plotly/Plotly.NET
Issues 43 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/issues
Pull requests 3 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulls
Discussions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions
Actions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/actions
Projects 0 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/projects
Security 0 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/security
Insights https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulse
Code https://patch-diff.githubusercontent.com/plotly/Plotly.NET
Issues https://patch-diff.githubusercontent.com/plotly/Plotly.NET/issues
Pull requests https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulls
Discussions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions
Actions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/actions
Projects https://patch-diff.githubusercontent.com/plotly/Plotly.NET/projects
Security https://patch-diff.githubusercontent.com/plotly/Plotly.NET/security
Insights https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulse
Answered https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918
kMutagenehttps://patch-diff.githubusercontent.com/kMutagene
kunjiangkun https://patch-diff.githubusercontent.com/kunjiangkun
Q&Ahttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/categories/q-a
how to define Args parameter for UpdateMenuButton.init for release version 5.0 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#top
kunjiangkun https://patch-diff.githubusercontent.com/kunjiangkun
Answered https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918
kMutagenehttps://patch-diff.githubusercontent.com/kMutagene
Return to tophttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#top
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
kunjiangkun https://patch-diff.githubusercontent.com/kunjiangkun
Jun 4, 2024 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#discussion-6778285
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
kMutagene https://patch-diff.githubusercontent.com/kMutagene
Jun 5, 2024 https://github.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918
@kunjiangkunhttps://github.com/kunjiangkun
#414https://github.com/plotly/Plotly.NET/issues/414
View full answer https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918
Oldest https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456?sort=old
Newest https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456?sort=new
Top https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
kMutagene https://patch-diff.githubusercontent.com/kMutagene
Jun 5, 2024 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456#discussioncomment-9673918
@kunjiangkunhttps://github.com/kunjiangkun
#414https://github.com/plotly/Plotly.NET/issues/414
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
kunjiangkunhttps://patch-diff.githubusercontent.com/kunjiangkun
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F456
🙏 Q&A https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/categories/q-a
https://patch-diff.githubusercontent.com/kunjiangkun
https://patch-diff.githubusercontent.com/kMutagene
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/456
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
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.