Last active
August 29, 2015 14:04
-
-
Save lastlegion/f96ee1315ee6a9924eca to your computer and use it in GitHub Desktop.
The ajax request for filtering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handle_filter_request(req,res,next) { | |
filter = req.param("filter") ? JSON.parse(req.param("filter")) : {} | |
if(filter[dimension]){ | |
dimension.filter(filter[dimension]); | |
} | |
results[dimension]= {values:group.all(),top: group.top(1)[0].value}; | |
res.writeHead(200, { 'content-type': 'application/json' }); | |
res.end((JSON.stringify(results))); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment