improve BarGraph cache invalidation. fixes #7