make the chart method default to replace = F
cleaner implementation of dealing with JS objects