add topx and threshold option to chart output
clear pieces_list before adding to prevent duplicate piece when importing more than once