This commit is contained in:
Radek Stepan 2013-08-19 22:59:41 +01:00
parent 82ad2a9f0e
commit ccce66c4af
2 changed files with 24 additions and 5 deletions

View File

@ -99,7 +99,7 @@ module.exports =
# Area generator. # Area generator.
area = d3.svg.area() area = d3.svg.area()
.interpolate("monotone") .interpolate("precise")
.x( (d) -> x(d.date) ) .x( (d) -> x(d.date) )
.y0(height) .y0(height)
.y1( (d) -> y(d.points) ) .y1( (d) -> y(d.points) )
@ -179,4 +179,12 @@ module.exports =
tooltip?.hide(200) tooltip?.hide(200)
) )
# Add a line showing where we are now.
svg.append("svg:line")
.attr("class", "today")
.attr("x1", x(new Date()))
.attr("y1", 0)
.attr("x2", x(new Date()))
.attr("y2", height)
cb null cb null

View File

@ -1,5 +1,7 @@
$closed = #4ACAB4 $closed = #4ACAB4
$opened = #FE5D55 $opened = #FE5D55
$grey = #CBC8C3
$ideal = $grey
body body
background: #31323A background: #31323A
@ -93,17 +95,26 @@ h2
path path
&.line &.line
fill: none fill: none
stroke: #CBC8C3 stroke: $grey
stroke-width: 1px stroke-width: 1px
clip-path: url(#clip) clip-path: url(#clip)
&.actual &.actual
stroke-width: 2px stroke-width: 2px
stroke: $closed stroke: $closed
&.ideal
stroke: $ideal
&.area &.area
clip-path: url(#clip) clip-path: url(#clip)
fill: #FAFAF8 fill: lighten($grey, 90%)
line
&.today
stroke: $grey
stroke-width: 2px
stroke-dasharray: 5,5
circle circle
fill: $closed fill: $closed
@ -120,7 +131,7 @@ h2
text text
font-weight: bold font-weight: bold
fill: #CBC8C3 fill: $grey
path path
display: none display: none