need help timeline chart... | ThingSpeak Projects | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.

Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
need help timeline chart...
No permission to create posts
May 25, 2018
8:12 am
New Member
Forum Posts: 1
Member Since:
May 25, 2018
sp_UserOfflineSmall Offline

hello I want to help connect the timeline chart with thingspeak JSON. An example: when the value is 1234567 IN, then the timeline is a bream line. when the 1234567 OUT stops the cut line and calculates how long the line is. I'll give you a code and a link to JSON:


google.charts.load("current", {packages:["timeline"]});
function drawChart() {

var container = document.getElementById('example5.1');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'Room' });
dataTable.addColumn({ type: 'string', id: 'Name' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
[ 'Darbuotojas1', 'Viduje', new Date(0,0,0,12,0,0), new Date(0,0,0,13,30,0) ],
[ 'Darbuotojas2', 'Isoreje', new Date(0,0,0,14,0,0), new Date(0,0,0,15,30,0) ],
[ 'Darbuotojas3', 'Viduje', new Date(0,0,0,16,0,0), new Date(0,0,0,17,30,0) ],
[ 'Darbuotojas4', 'Isoreje', new Date(0,0,0,12,30,0), new Date(0,0,0,14,0,0) ],
[ 'Darbuotojas5', 'Viduje', new Date(0,0,0,14,30,0), new Date(0,0,0,16,0,0) ],
[ 'Darbuotojas+', 'Viduje', new Date(0,0,0,16,30,0), new Date(0,0,0,18,0,0) ]]);

var options = {
timeline: { colorByRowLabel: true }

chart.draw(dataTable, options);

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

Advantagetreeexperts, laundrydaddyuk, techhhelp5, ken, tran, huldacormier

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457