{"action":"created","issue":{"url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/2","repository_url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials","labels_url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/2/comments","events_url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/2/events","html_url":"https://github.com/FrissAnalytics/shinyJsTutorials/issues/2","id":153648342,"number":2,"title":"how C3Guage.R and C3Guage.js work together","user":{"login":"MySchizoBuddy","id":51676,"avatar_url":"https://avatars.githubusercontent.com/u/51676?v=3","gravatar_id":"","url":"https://api.github.com/users/MySchizoBuddy","html_url":"https://github.com/MySchizoBuddy","followers_url":"https://api.github.com/users/MySchizoBuddy/followers","following_url":"https://api.github.com/users/MySchizoBuddy/following{/other_user}","gists_url":"https://api.github.com/users/MySchizoBuddy/gists{/gist_id}","starred_url":"https://api.github.com/users/MySchizoBuddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MySchizoBuddy/subscriptions","organizations_url":"https://api.github.com/users/MySchizoBuddy/orgs","repos_url":"https://api.github.com/users/MySchizoBuddy/repos","events_url":"https://api.github.com/users/MySchizoBuddy/events{/privacy}","received_events_url":"https://api.github.com/users/MySchizoBuddy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T10:31:53Z","updated_at":"2016-05-09T10:57:23Z","closed_at":"2016-05-09T10:57:23Z","body":"please elaborate on how C3Guage.R and C3Guage.js work together. Looks to me all the communication is happening behind the scene. "},"comment":{"url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/comments/217834919","html_url":"https://github.com/FrissAnalytics/shinyJsTutorials/issues/2#issuecomment-217834919","issue_url":"https://api.github.com/repos/FrissAnalytics/shinyJsTutorials/issues/2","id":217834919,"user":{"login":"FrissAnalytics","id":11570078,"avatar_url":"https://avatars.githubusercontent.com/u/11570078?v=3","gravatar_id":"","url":"https://api.github.com/users/FrissAnalytics","html_url":"https://github.com/FrissAnalytics","followers_url":"https://api.github.com/users/FrissAnalytics/followers","following_url":"https://api.github.com/users/FrissAnalytics/following{/other_user}","gists_url":"https://api.github.com/users/FrissAnalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/FrissAnalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrissAnalytics/subscriptions","organizations_url":"https://api.github.com/users/FrissAnalytics/orgs","repos_url":"https://api.github.com/users/FrissAnalytics/repos","events_url":"https://api.github.com/users/FrissAnalytics/events{/privacy}","received_events_url":"https://api.github.com/users/FrissAnalytics/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T10:57:23Z","updated_at":"2016-05-09T10:57:23Z","body":"to answer your question more precisely requires to go into the internals of HTMLWidgets, which we consider out of scope for this tutorial. \r\n\r\nWhat is most important to realize is that in C3Gauge.R we set the R data and options and put these in a list called `x`. Remember, `x` is an R object. Via a call to htmlwidgets::createWidget, HTMLWidgets will pass this information to javascript in which the R object is translated into something javascript understands, which is where jsonlite comes in. \r\n\r\nThis indeed happens behind the scenes. As we point out in the tutorial the step from R data to javascript data is often the most difficult step. \r\n\r\nA simple thing you can do is to write\r\n\r\n``` javascript\r\nconsole.log(x);\r\n```\r\n\r\ninside the `renderValue` function in the javascript code so you can see what object is actually created at the javascript side, after it is passed from R. \r\n\r\n\r\n\r\n"}}