resizing the chart on window reisze