The screen dims, but does not go completely black. Even if you manually turn the screen off while charging, it comes back on, presumably from some notification.
Go to Settings > Developer options > Stay awake, turn it off. Let me know if that's what you're looking for.