Ported last barchart stuff

Graph with select by cat