- go to the web editor: https://code.cognitory.com/
- create a namespace
- add a
println
- add app-view
- require reagent, define render, call render
-
create
db
ratom w/:active-year
-
create
active-year
reaction -
create
slider-view
showing@active-year
-
add
slider-view
toapp-view
-
create
set-active-year!
transaction -
add
:input
toslider-view
w/:value
and:on-change
- use
h/get-data
to fetch and pprint data - initialize
:data
to[]
- create
set-data!
transaction - create
data
reaction - create
table-view
w/ loop over@data
- add
table-view
toapp-view
- create
active-year-data
reaction - use
@active-year-data
instead of@data
intable-view
- create
graph-view
depending on@data
and@active-year-data
- add
graph-view
toapp-view
Suggested extensions:
- click on table column to sort it
- hover over table row or graph circle -> highlight corresponding graph circle / table row