@@ -13,9 +13,14 @@ var count_y = d3.scale.linear().range([count_height, 0]);
1313var count_xAxis = d3 . svg . axis ( )
1414 . scale ( count_x )
1515 . orient ( "bottom" )
16+ //.tickSize(-count_height, 0, 0)
17+ . outerTickSize ( 0 ) ;
18+
1619var count_yAxis = d3 . svg . axis ( )
1720 . scale ( count_y )
1821 . orient ( "left" )
22+ . tickSize ( - count_width , 0 , 0 )
23+ . outerTickSize ( 0 )
1924 . ticks ( 10 ) ;
2025
2126// Define the div for the tooltip
@@ -32,6 +37,7 @@ var count = d3.select("#count").append("svg")
3237 . attr ( "transform" ,
3338 "translate(" + count_margin . left + "," + count_margin . top + ")" ) ;
3439
40+
3541// load the data
3642d3 . json ( "/data/counts" , function ( error , data ) {
3743 data . forEach ( function ( d ) {
@@ -52,6 +58,7 @@ d3.json("/data/counts", function(error, data) {
5258 . attr ( "dx" , "-.8em" )
5359 . attr ( "dy" , "-.55em" )
5460 . attr ( "transform" , "rotate(-90)" ) ;
61+
5562 count . append ( "g" )
5663 . attr ( "class" , "y axis" )
5764 . call ( count_yAxis )
@@ -62,8 +69,9 @@ d3.json("/data/counts", function(error, data) {
6269 . style ( "text-anchor" , "end" )
6370 . text ( "Count" ) ;
6471
72+
6573 var line = d3 . svg . line ( )
66- . x ( function ( d ) { return 5 + count_x ( d . Time ) ; } )
74+ . x ( function ( d ) { return 9 + count_x ( d . Time ) ; } )
6775 . y ( function ( d ) { return count_y ( d . Count ) ; } ) ;
6876
6977
@@ -77,7 +85,7 @@ d3.json("/data/counts", function(error, data) {
7785 . data ( data )
7886 . enter ( ) . append ( "circle" )
7987 . attr ( "r" , 3 )
80- . attr ( "cx" , function ( d ) { return 5 + count_x ( d . Time ) ; } )
88+ . attr ( "cx" , function ( d ) { return 9 + count_x ( d . Time ) ; } )
8189 . attr ( "cy" , function ( d ) { return count_y ( d . Count ) ; } )
8290 . style ( "fill" , "blue" )
8391
0 commit comments