<!-- the markup --> <canvas id="timetable"></canvas> <!-- the script --> <script type="text/javascript" src="scheda.js"></script> <script> // after calling this, you can call scheda.init() again but without the ID to clear the timetable scheda.init('timetable'); // initializing with config scheda.init('timetable', { bgColor : '#FFF', sched : { color : "#000", style : "bold", font : "Verdana", size : 13 } }); /** day (string) 'MTWThFS', 'M', 'TTh' time (string) '7-8', '1:15-2:45' courseCode (string) 'CMSC 100', required sectionName (string) optional, default is '' room (string) optional, default is 'TBA' color (string) optional, default is a random color returns a unique ID */ scheda.drawCourse('M', '7-10', 'CMSC 100', 'X-1L', 'ICS PC Lab 8'); // setting config after initialization scheda.setConfig(config); // remove a course scheda.remove(id); // get history scheda.getHistory(); // repaint using scheda.repaint(); </script>