make dimple script template anonymous function again but return a chart object