You cannot physically show more than 300-1200 pixels/inch on a printer and a lot less on a display.
Take those 2 million points and summarise every group of 1000-odd points (via mean, median, mode, maximum or minimum...), so that you end up with 2000 'summarised' points (this would be quick and easy to code). Charting 2000 summarised points makes much more sense for on-screen charting. Use a summary range of 100-500 points, if it will be printed (depending on printer DPI capability and chart size).
Internally, this is what most charting components will have to do, in any case.