convert sample.code to string for cellWidget
more direct approach when adding curve to graph