remove downsampling from ZenUI and move to graph library

Moved downsampling logic out of zenui and into query service.