Check the "battery use" under settings>power.
While charging, it will say "Charging (USB)" or "Charging (AC)". If it is charging (AC), then your cable is ok, just make sure your charger's output rating is 5V x 1A.
Also, note that if your in a hot country, and your phone is under the windsheild, under sunlight, the phone would heat up & not charge (light will flash red).
HTC One (m8)
Tornado, Trinity (sold) - Kaiser (sold) - Diamond (sold) - Topaz (sold) - Leo (broke!) - Pyramid (sold) - EndeavorU - (sold) - M7 (sold).