Make SurfChart use the new api

And implement the period selection.