dragonfly-science / bailiwick-ui

Bailiwick frontend
1 stars 1 forks source link

Feature Labels on barcharts #30

Closed simonwinter closed 5 years ago

simonwinter commented 5 years ago

Currently when we send the features to javascript, we're sending the featureId, like so:

step (areaid, year, _mfeatureid) Numbers{..} res
         = do
          let featureId = do
                f <- _mfeatureid
                return f
              key = (areaid, lookupAreaName areaid, lookupAreaLevel areaid, lookupAreaParents areaid, featureId)
           in  OMap.alter (malter (year, rawNum, indexNum, headlineDisp, indexDisp)) key res

Ideally I'd like to pass a featureId & feature name in the key. This would mean updating the State & ChartState to allow for Features to be accessible to the shapeData function.