Generating histogram data.