improved memoization of chart control in widget