Commit f05e6308 authored by Kjetil Thuen's avatar Kjetil Thuen
Browse files

Slightly tweaked axis placement

parent 74849912
......@@ -16,7 +16,7 @@ horizMargin = (chartId) ->
chartWidth(chartId) / 50
vertMargin = (chartId) ->
chartWidth(chartId) / 40
25
speed = -> 200
......@@ -294,7 +294,7 @@ setupChart = (chartId, data, displayDetails) ->
"translate(" +
horizMargin(chartId) +
", " +
(chartHeight(chartId) - vertMargin(chartId)) +
(chartHeight(chartId) - vertMargin(chartId) + 5) +
")"
.call xAxisLeft(chartId)
......@@ -304,14 +304,16 @@ setupChart = (chartId, data, displayDetails) ->
"translate(" +
(horizMargin(chartId) + (chartWidth(chartId) / 2)) +
", " +
(chartHeight(chartId) - vertMargin(chartId)) +
(chartHeight(chartId) - vertMargin(chartId) + 5) +
")"
.call xAxisRight(chartId)
svg.append "g"
.attr "class", "yAxisGrid"
.attr "transform", (d, i) ->
"translate(0, " + ((barThickness(chartId) / 2) + 1) + ")"
"translate(0, " +
((barThickness(chartId) / 2) + 1) +
")"
.call yAxisGrid(chartId)
svg.append "g"
......@@ -319,7 +321,9 @@ setupChart = (chartId, data, displayDetails) ->
.attr "transform", (d, i) ->
"translate(" +
((chartWidth(chartId) - horizMargin(chartId)) / 2) +
", 0)"
", " +
((barThickness(chartId) / 2) + 1) +
")"
.call yAxisLabels(chartId)
.selectAll("text")
.style("text-anchor", "middle")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment