Vaddin Table sorting

I am using a custom class in one of the columns in vaadin. The custom class contains a pie chart- VaadinVisualisations. The class also contains some labels. This class is displayed in one of the columns. The table can be sorted. The custom class column allows me to sort it however, the piechart disappears when I do so. When I refresh the page I can see the pie chart again. Can anybody tell me how to fix this? or Is there any other better solution to this?

I was able to do the above by overiding the sort method in the table and by calling the requestRepaintAll() method.