fix bin calculation issues with histogram chart