improve denisty line performance, fix data range for density line