I have noticed a very annoying problem of the touchscreen when phone is charging. While plugged in if you try to give a touch input it will be all over the place, not giving anything close to what you meant for input. This ghost touches is common issue among smartphones like iphones, Samsung Galaxy, Sony Xperia, Oneplus, Microsoft, Micromax and all other major smartphone developers. They are not any big matter to worry about but there is no permanent fix to the problem. If you consider visiting customer service store they will mostly recommend and perform factory data reset which is not a solution.
Here are few solutions to fix the problem which may depend on different conditions:
Commonly ghost touches occur due to electric fluctuations or varying power input to the device. Try to plug your phone at some other non-regular locations with different power supply and look for the problem, if the problem persists then most probably your USB cable is causing the problem. Try to replace it. But if the touchscreen works normally at other locations then the problem is caused by current fluctuations at your place. Try to charge it using correct current supply specified on the adapter. (See Sol.3 or/& 4)
Use original adapter and USB cable specified for smartphone while charging. Avoid using any 3rd party USB cable or adapter.
Plug your phone to stabilizer box as it decreases electric fluctuations and give way for smooth power supply.
You can charge your phone smoothly using laptop, PC or power banks etc. which give consistent power supply thus preventing problem of touchscreen misbehaviour. Though charging occurs slowly it is best method to prevent ghost touches.
Ghost touches are common among smartphones and is not a big issue to worry about. There is a difficult but simple method. Do not use your smartphone while charging (off course it’s difficult to avoid your smartphone), let it charge then unplug and use. Ghost touches are not severe enough to cause any technical problem.
There is another more difficult but simple method to charge your phone. Turn off your smartphone and charge. This method is not appreciable since many people won’t power off their smartphone due to many reasons but still it can be practised.
Updating device software may not guarantee fixing of the problem but still be done.
Conclusion: I have read some forums where they are talking of factory reset of the device. I do not recommend and appreciate this since touchscreen problem mostly occurs due to external factors.