How to change chart point count based on chart size?

What would be the best way to change the point count based on the time series chart breakpoint? I’m trying to get the chart to look smooth both on desktop and smaller devices.