move index to public
explicitly style chart
extract graphing functions, render hover with correct message