Graph HTML optimization