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 = d3.svg.area()
.interpolate("monotone")
.interpolate("precise")
.x( (d) -> x(d.date) )
.y0(height)
.y1( (d) -> y(d.points) )
@ -179,4 +179,12 @@ module.exports =
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

View File

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