Commit 463595fe authored by Kjetil Thuen's avatar Kjetil Thuen

Added comment, made lint happy

parent 249512da
lodash = require 'lodash'
#Example requestDescription. Will fall back on this if none is passes to the
#reloadData function
requestDescription = () ->
{
host: "http://localhost"
......
......@@ -21,7 +21,8 @@ barThickness = (chartId) ->
Math.floor(chartHeight(chartId) / numBars(chartId)) - 2
maxValue = lodash.memoize (chartId) ->
lodash.reduce(lodash.values(completeData[chartId].yearData), (max, yearData) ->
years = lodash.values completeData[chartId].yearData
lodash.reduce(years, (max, yearData) ->
Math.max max, lodash.reduce(yearData, (max, val) ->
Math.max max, Math.max(val.rvalue, val.lvalue)
0)
......@@ -78,7 +79,8 @@ prepareMetadataDiv = (chartId, data, mapping) ->
updateMetadata = (chartId, data) ->
# FIXME: Add a delay to reduce flicker
if not data
#FIXME: Whats needed here is the data for the current frame filtered on the selected year
#FIXME: Whats needed here is the data for the current frame filtered on the
#selected year
data = completeData[chartId].yearData[completeData[chartId].selectedYear]
d3.select chartId + " div.dataDetails"
.html prepareMetadataDiv chartId, data
......
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