Possible to have template for data?

I see in the documentation a section on the layout template attribute, which allows a chart to take its style and formatting from a template object.

Does something like this exist for data? For example, I am desiring something similar to below:

baseTemplateTrace = {
mode: ‘markers’;
type: ‘scatter’;
name: ‘baseTemplateTRace’;
// etc…

var trace1 = {
template : baseTemplateTrace; /// apply the attributes in baseTemplateTrace to this trace
x: [1,2,3,4];
y: [1,2,3,4];



https://plot.ly/javascript/layout-template/ should be a good place to start.