Here is another example I was able to work out, when declaring a new timeseries from records using tsDecl:

```
c3Viz(Patient.evalMetricsWithMetadata(
{
ids: ["123456"],
expressions: ["Weight"],
start: "2015-04-24T00:00:00",
end: "2015-06-18T00:00:00",
interval: "DAY"
}, SimpleMetric.array([{
"id" : "Weight",
"name" : "Weight",
"srcType" : "Patient",
"tsDecl" : {
"data" : "weight",
"treatment" : "AVG",
"start" : "dateEnteredUTC",
"value" : "weight"
"transform" : "interpolate(this, LINEAR, MISSING)"
}
}])
))
```

In the above, we are declaring a new time series and asking the function to apply the transform/interpolation within the definition itself. So the first parameter is “this”. LINEAR means to apply linear interpolation and MISSING means to use linear interpolation only when data is missing between two real data points.

for more information on interpolate() function, see: c3ShowType(ExpressionEngineFunction)