ensured chart drawn only when there is data