diff --git a/src/modules/graph.coffee b/src/modules/graph.coffee index ea46af2..38594fb 100644 --- a/src/modules/graph.coffee +++ b/src/modules/graph.coffee @@ -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 \ No newline at end of file diff --git a/src/styles/app.styl b/src/styles/app.styl index d292e0d..850b152 100644 --- a/src/styles/app.styl +++ b/src/styles/app.styl @@ -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