Are you still on 6.0 or have you received the OTA update to 7.0?
If device will only turn on if connected to the charger doesn't sound good.
If you can get into recovery, try wiping the system cache first. If that doesn't help, may be time for a factory reset.
Are you using a screen protector? Could be interfering with the sensors.