Преглед изворни кода

Add notes about apps avaiable via repl_example()

master
Garrick Aden-Buie пре 6 година
родитељ
комит
10e583e80d
2 измењених фајлова са 19 додато и 4 уклоњено
  1. +12
    -3
      dev/dev.Rmd
  2. +7
    -1
      dev/dev.md

+ 12
- 3
dev/dev.Rmd Прегледај датотеку

## Shiny comes for free! ## Shiny comes for free!


* `r github_sha_link("739d5945010d5e46ab3f9847fd412beb0766805d")` * `r github_sha_link("739d5945010d5e46ab3f9847fd412beb0766805d")`
* Start from: `repl_example("frappe-chart-starter")`
* Basics: `repl_example("frappe-chart-basic")`


Create a basic Shiny app with Create a basic Shiny app with


`r github_sha_link("5da4b68b5f60d8e6ee17cc8c4a009121539a2653")` `r github_sha_link("5da4b68b5f60d8e6ee17cc8c4a009121539a2653")`


Demo with `app.R`
Demo with `app.R` by just running the
`repl_example("frappe-chart-basic")` app again
and using the dev console to show
that the update method is working.


```js ```js
let el = document.getElementById('chart') let el = document.getElementById('chart')


`r github_sha_link("0b4f7ea16f378ec5a53d81260c8f9056fabbcaba")` `r github_sha_link("0b4f7ea16f378ec5a53d81260c8f9056fabbcaba")`
Attach the event listener during `renderValue()` and watch for the `data-select` event.
Attach the event listener during `renderValue()`
and watch for the `data-select` event.
Use the `el.id` to create a new id, like `el.id + '_selected'`. Use the `el.id` to create a new id, like `el.id + '_selected'`.
Send back `index` and `values` from the event. Send back `index` and `values` from the event.




`r github_sha_link("e7fe0e1d87977823e6a040434b33e6d5cdf8eac1")` `r github_sha_link("e7fe0e1d87977823e6a040434b33e6d5cdf8eac1")`


You would probably want to do some work for the user and return more meaningful values.
You would probably want to do some work for the user
and return more meaningful values.
We'll probably just copy and paste this during the workshop, We'll probably just copy and paste this during the workshop,
but here's a potential method. but here's a potential method.


) )
} }
``` ```

Final result: `repl_example("frappe-chart-full")`

+ 7
- 1
dev/dev.md Прегледај датотеку

## Shiny comes for free\! ## Shiny comes for free\!


- [changelog: 739d59](https://github.com/gadenbuie/js4shiny-frappeCharts/commit/739d5945010d5e46ab3f9847fd412beb0766805d) - [changelog: 739d59](https://github.com/gadenbuie/js4shiny-frappeCharts/commit/739d5945010d5e46ab3f9847fd412beb0766805d)
- Start from: `repl_example("frappe-chart-starter")`
- Basics: `repl_example("frappe-chart-basic")`


Create a basic Shiny app with Create a basic Shiny app with




[changelog: 5da4b6](https://github.com/gadenbuie/js4shiny-frappeCharts/commit/5da4b68b5f60d8e6ee17cc8c4a009121539a2653) [changelog: 5da4b6](https://github.com/gadenbuie/js4shiny-frappeCharts/commit/5da4b68b5f60d8e6ee17cc8c4a009121539a2653)


Demo with `app.R`
Demo with `app.R` by just running the
`repl_example("frappe-chart-basic")` app again and using the dev console
to show that the update method is working.


``` js ``` js
let el = document.getElementById('chart') let el = document.getElementById('chart')
) )
} }
``` ```

Final result: `repl_example("frappe-chart-full")`

Loading…
Откажи
Сачувај