Isolate metric graphing code into each metric