File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1818function start ( ) {
1919 var w = 800 ;
2020 var h = 600 ;
21+ var radius = 20 ;
2122
2223 var content = d3 . select ( "#divContent" ) ;
2324 var svg = content . append ( "svg" ) . attr ( {
3233 console . warn ( err ) ;
3334 return ;
3435 }
35- console . log ( data ) ;
36+
37+ var events = data [ "events" ] ;
38+
39+ var sel = svg . selectAll ( "circle.event" ) . data ( events ) ;
40+ sel . exit ( ) . remove ( ) ;
41+ sel . enter ( ) . append ( "circle" ) . classed ( "event" , true ) ;
42+ sel . attr ( {
43+ "cx" : w * 0.5 ,
44+ "cy" : h * 0.5 ,
45+ "r" : radius
46+ } ) ;
3647 } ) ;
3748}
3849
Original file line number Diff line number Diff line change 331. Importing D3 Library (X)
442. Load patient JSON file (X)
553. Set up canvas (X)
6- 4. Draw a circle for each patient event
6+ 4. Draw a circle for each patient event (X)
775. Position circles horizontally by timestamp
88 * Create a time scale
996. Color nodes by event type
You can’t perform that action at this time.
0 commit comments