Writing svg histogram with php