HTML treemap generation more or less working