@@ -13,9 +13,14 @@ var count_y = d3.scale.linear().range([count_height, 0]);
13
13
var count_xAxis = d3 . svg . axis ( )
14
14
. scale ( count_x )
15
15
. orient ( "bottom" )
16
+ //.tickSize(-count_height, 0, 0)
17
+ . outerTickSize ( 0 ) ;
18
+
16
19
var count_yAxis = d3 . svg . axis ( )
17
20
. scale ( count_y )
18
21
. orient ( "left" )
22
+ . tickSize ( - count_width , 0 , 0 )
23
+ . outerTickSize ( 0 )
19
24
. ticks ( 10 ) ;
20
25
21
26
// Define the div for the tooltip
@@ -32,6 +37,7 @@ var count = d3.select("#count").append("svg")
32
37
. attr ( "transform" ,
33
38
"translate(" + count_margin . left + "," + count_margin . top + ")" ) ;
34
39
40
+
35
41
// load the data
36
42
d3 . json ( "/data/counts" , function ( error , data ) {
37
43
data . forEach ( function ( d ) {
@@ -52,6 +58,7 @@ d3.json("/data/counts", function(error, data) {
52
58
. attr ( "dx" , "-.8em" )
53
59
. attr ( "dy" , "-.55em" )
54
60
. attr ( "transform" , "rotate(-90)" ) ;
61
+
55
62
count . append ( "g" )
56
63
. attr ( "class" , "y axis" )
57
64
. call ( count_yAxis )
@@ -62,8 +69,9 @@ d3.json("/data/counts", function(error, data) {
62
69
. style ( "text-anchor" , "end" )
63
70
. text ( "Count" ) ;
64
71
72
+
65
73
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 ) ; } )
67
75
. y ( function ( d ) { return count_y ( d . Count ) ; } ) ;
68
76
69
77
@@ -77,7 +85,7 @@ d3.json("/data/counts", function(error, data) {
77
85
. data ( data )
78
86
. enter ( ) . append ( "circle" )
79
87
. 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 ) ; } )
81
89
. attr ( "cy" , function ( d ) { return count_y ( d . Count ) ; } )
82
90
. style ( "fill" , "blue" )
83
91
0 commit comments