This should work:
var dataObj = {
"dataLimitFrom":1279408157,
"dataLimitTo":1384253671,
"unit":"s",
"values":[
[1280062860,"8.221"],
[1282209412,"4.2",],
[1284577510,"5.9"],
[1286988866,"1.52"],
]
};
var t = new TimeChart({
container: document.getElementById("demo"),
data:
{
units:["s"],
timestampInSeconds: true,
preloaded: dataObj
}
});
For TimeChart in data array first one is always timestamp [1280062860,"8.221"].
You can also change "unit" to any of ["s","m","h","d","M","y"]
More about timechart:
https://zoomcharts.com/developers/en/time-chart/api-reference/settings.html
UPDATE:
'data' array containing timestamps and values is now called 'values'.