pre-calculating histogram and showing as normal barchart