UNPKG

jsgantt-improved-prime

Version:
390 lines (367 loc) 19.5 kB
<!DOCTYPE html> <html lang="en" class="no-js"> <!-- Head --> <head> <!-- Meta data --> <meta charset="utf-8"> <title>jsGantt Improved</title> <meta name="description" content="FREE javascript gantt - jsGantt Improved HTML, CSS and AJAX only"> <meta name="keywords" content="jsgantt-improved free javascript gantt-chart html css ajax"> <meta name="viewport" content="width=device-width,initial-scale=1"> <!-- External resources --> <!-- jQuery + Ajax [required by Bootstrap] --> <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script> <!-- Required by smooth scrolling --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <!-- Bootstrap v4.0.0 Alpha --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> <!-- Font Awesome --> <script src="https://use.fontawesome.com/78d1e57168.js"></script> <!-- Google's Code Prettify --> <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=css&amp;skin=sunburst"></script> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css?family=Cookie|Satisfy|Kelly+Slab|Overlock" rel="stylesheet"> <!-- Internal resources --> <!-- Webpage --> <link href="main.css" rel="stylesheet" type="text/css" /> <script src="main.js" type="text/javascript"></script> <!-- jsGanttImproved App --> <link href="jsgantt.css" rel="stylesheet" type="text/css" /> <script src="jsgantt.js" type="text/javascript"></script> </head> <!-- Content --> <body data-spy="scroll" data-target="#my-navbar-nav"> <!-- Navigation bar --> <nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse fixed-top"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#my-navbar-nav" aria-controls="my-navbar-nav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand product-name" id="my-nav-brand" href="#home">jsGanttImproved</a> <div class="collapse navbar-collapse" id="my-navbar-nav"> <ul class="navbar-nav mr-auto" role="tablist"> <li class="nav-item"> <a class="nav-link" href="#home">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="#demo">Demo</a> </li> <li class="nav-item"> <a class="nav-link" href="#features">Features</a> </li> <li class="nav-item"> <a class="nav-link" href="#usage">Usage</a> </li> <li class="nav-item"> <a class="nav-link" href="#credits">Credits</a> </li> </ul> <form class="form-inline my-2 my-lg-0"> <a class="btn btn-outline-danger my-2 my-sm-0 mx-1" href="https://api.github.com/repos/jsGanttImproved/jsgantt-improved/zipball">Download</a> <a class="btn btn-outline-primary my-2 my-sm-0 mx-1" href="https://github.com/jsGanttImproved/jsgantt-improved" target="_blank">View on GitHub</a> </form> </div> </nav> <!-- Content --> <!-- Home --> <div class="container-fluid" id="home"> <div class="row"> <div class="col-lg-6 text-center"> <h1 class="display-1 product-name" id="home-title">jsGanttImproved</h1> <h2 class="display-2" id="home-subtitle">latest v2.0.10</h2> <a class="btn btn-danger my-2 my-sm-0 mx-1" href="https://api.github.com/repos/jsGanttImproved/jsgantt-improved/zipball">Download</a> <a class="btn btn-primary my-2 my-sm-0 mx-1" href="https://github.com/jsGanttImproved/jsgantt-improved" target="_blank">View on GitHub</a> </div> <div class="col-lg-6"> <div class="card text-center" id="slide-card"> <div class="card-block"> <span class="card-text slide"> <p><i class="fa fa-code slide-icon"></i></p> <p>100% HTML + CSS + JavaScript Gantt Chart</p> </span> <span class="card-text slide"> <p><i class="fa fa-usd slide-icon"></i></p> <p>Completely FREE</p> </span> <span class="card-text slide"> <p><i class="fa fa-github slide-icon"></i></p> <p>Open source</p> </span> </div> <div class="card-footer text-muted" id="slide-dots"> <span class="dot"></span> <span class="dot"></span> <span class="dot"></span> </div> </div> </div> </div> <div class="row"> <div class="col text-center"> <a class="btn btn-outline-info" href="#demo" id="learn-more"><i class="fa fa-chevron-down"></i></a> </div> </div> </div> <!-- Demo --> <div class="container-fluid section" id="demo"> <h1>Demo</h1> <div class="btn-group" data-toggle="buttons"> <label class="btn btn-primary btn-demo"> <input type="checkbox" autocomplete="off"><i class="fa fa-code"></i> Embedded Code </label> <label class="btn btn-primary btn-demo"> <input type="checkbox" autocomplete="off"><i class="fa fa-file-code-o"></i> External XML File </label> </div> <div id="embedded-Gantt"> <script type="text/javascript"> var g = new JSGantt.GanttChart(document.getElementById('embedded-Gantt'), 'week'); if (g.getDivId() != null) { g.setCaptionType('Complete'); // Set to Show Caption (None,Caption,Resource,Duration,Complete) g.setQuarterColWidth(36); g.setDateTaskDisplayFormat('day dd month yyyy'); // Shown in tool tip box g.setDayMajorDateDisplayFormat('mon yyyy - Week ww') // Set format to display dates in the "Major" header of the "Day" view g.setWeekMinorDateDisplayFormat('dd mon') // Set format to display dates in the "Minor" header of the "Week" view g.setShowTaskInfoLink(1); // Show link in tool tip (0/1) g.setShowEndWeekDate(0); // Show/Hide the date for the last day of the week in header for daily view (1/0) g.setUseSingleCell(10000); // Set the threshold at which we will only use one cell per table row (0 disables). Helps with rendering performance for large charts. g.setFormatArr('Day', 'Week', 'Month', 'Quarter'); // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers // Parameters (pID, pName, pStart, pEnd, pStyle, pLink (unused) pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt) g.AddTaskItem(new JSGantt.TaskItem(1, 'Define Chart API', '', '', 'ggroupblack', '', 0, 'Brian', 0, 1, 0, 1, '', '', 'Some Notes text', g)); g.AddTaskItem(new JSGantt.TaskItem(11, 'Chart Object', '2017-02-20', '2017-02-20', 'gmilestone', '', 1, 'Shlomy', 100, 0, 1, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(12, 'Task Objects', '', '', 'ggroupblack', '', 0, 'Shlomy', 40, 1, 1, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(121, 'Constructor Proc #1234 of February 2017', '2017-02-21', '2017-03-09', 'gtaskblue', '', 0, 'Brian T.', 60, 0, 12, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(122, 'Task Variables', '2017-03-06', '2017-03-11', 'gtaskred', '', 0, 'Brian', 60, 0, 12, 1, 121, '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(123, 'Task by Minute/Hour', '2017-03-09', '2017-03-14 12:00', 'gtaskyellow', '', 0, 'Ilan', 60, 0, 12, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(124, 'Task Functions', '2017-03-09', '2017-03-29', 'gtaskred', '', 0, 'Anyone', 60, 0, 12, 1, '123SS', 'This is a caption', null, g)); g.AddTaskItem(new JSGantt.TaskItem(2, 'Create HTML Shell', '2017-03-24', '2017-03-24', 'gtaskyellow', '', 0, 'Brian', 20, 0, 0, 1, 122, '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(3, 'Code Javascript', '', '', 'ggroupblack', '', 0, 'Brian', 0, 1, 0, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(31, 'Define Variables', '2017-02-25', '2017-03-17', 'gtaskpurple', '', 0, 'Brian', 30, 0, 3, 1, '', 'Caption 1', '', g)); g.AddTaskItem(new JSGantt.TaskItem(32, 'Calculate Chart Size', '2017-03-15', '2017-03-24', 'gtaskgreen', '', 0, 'Shlomy', 40, 0, 3, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(33, 'Draw Task Items', '', '', 'ggroupblack', '', 0, 'Someone', 40, 2, 3, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(332, 'Task Label Table', '2017-03-06', '2017-03-09', 'gtaskblue', '', 0, 'Brian', 60, 0, 33, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(333, 'Task Scrolling Grid', '2017-03-11', '2017-03-20', 'gtaskblue', '', 0, 'Brian', 0, 0, 33, 1, '332', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(34, 'Draw Task Bars', '', '', 'ggroupblack', '', 0, 'Anybody', 60, 1, 3, 0, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(341, 'Loop each Task', '2017-03-26', '2017-04-11', 'gtaskred', '', 0, 'Brian', 60, 0, 34, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(342, 'Calculate Start/Stop', '2017-04-12', '2017-05-18', 'gtaskpink', '', 0, 'Brian', 60, 0, 34, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(343, 'Draw Task Div', '2017-05-13', '2017-05-17', 'gtaskred', '', 0, 'Brian', 60, 0, 34, 1, '', '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(344, 'Draw Completion Div', '2017-05-17', '2017-06-04', 'gtaskred', '', 0, 'Brian', 60, 0, 34, 1, "342,343", '', '', g)); g.AddTaskItem(new JSGantt.TaskItem(35, 'Make Updates', '2017-07-17', '2017-09-04', 'gtaskpurple', '', 0, 'Brian', 30, 0, 3, 1, '333', '', '', g)); g.Draw(); } else { alert("Error, unable to create Gantt Chart"); } </script> </div> <div id="external-Gantt"> <script type="text/javascript"> var g = new JSGantt.GanttChart(document.getElementById('external-Gantt'), 'day'); if (g.getDivId() != null) { g.setCaptionType('Resource'); // Set to Show Caption (None,Caption,Resource,Duration,Complete) g.setShowTaskInfoLink(1); // Show link in tool tip (0/1) g.setDayMajorDateDisplayFormat('dd mon'); g.setDateTaskDisplayFormat('dd month yyyy HH:MI'); // Use the XML file parser JSGantt.parseXML('project.xml', g) g.Draw(); } else { alert("Error, unable to create Gantt Chart"); } </script> </div> </div> <!-- Features --> <div class="container-fluid section" id="features"> <h1>Features</h1> <p>jsGanttImproved is a fully featured gantt chart component built entirely in Javascript, CSS and AJAX. It is lightweight and there is no need of external libraries or additional images.</p> <div class="row"> <div class="col-lg"> <h2>Basic Features</h2> <ul> <li>Tasks &amp; Collapsible Task Groups</li> <li>Multiple Dependencies</li> <li>Task Completion</li> <li>Task Style</li> <li>Milestones</li> <li>Resources</li> </ul> </div> <div class="col-lg"> <h2>Advanced Features</h3> <ul> <li>Dynamic Loading of Tasks</li> <li>Dynamic change of format: Hour, Day, Week, Month, Quarter</li> <li> Load Gantt from: <ul> <li>External XML files (including experimental support for Microsoft Project XML files)</li> <li>JavaScript strings</li> </ul> </li> <li>Export Gantt as XML string</li> <li>Support for internationalization</li> </ul> </div> </div> <h2>Current Known Issues:</h3> <ul> <li>If the browser is viewing the page at anything other than 100% zoom then bars may not be sized or positioned correctly.</li> </ul> <h2>Changelog:</h3> <p>Check the full list of changes on <a href="https://github.com/jsGanttImproved/jsgantt-improved/releases">GitHub releases page</a>.</p> <h3>2.1.2:</h3> <ul> <li>Fix for adding custom columns in object</li> <li>IE compatible with dependencies highlight</li> </ul> <h3>2.1.1:</h3> <ul> <li>New way for rendering gantt where it works better scroll</li> </ul> <h3>2.0.10:</h3> <ul> <li>Use complete value from task group from data instead of calculated</li> </ul> <h3>v2.0.9:</h3> <ul> <li>Editing data in gantt table</li> <li>Highlight dependencies when hover</li> </ul> <h3>v2.0.8:</h3> <ul> <li>Small bug fixes</li> </ul> <h3>v2.0.7:</h3> <ul> <li>Debug option and better docs</li> <li>Better performance reading json</li> </ul> <h3>v2.0.6:</h3> <ul> <li>Additional columns for data table</li> </ul> <h3>v2.0.5:</h3> <ul> <li>Chinese Mandarin translation</li> </ul> <h3>v2.0.3:</h3> <ul> <li>Many bug fixes reported in github</li> <li>Click events now is able to be binded to row or cells</li> <li>Milestones now uses the enddate to show in chart</li> </ul> <h3>v2.0.2:</h3> <ul> <li>Change the source to use Typescript and organizing in small modules</li> <li>Start/End Dates with Planned and Executed values</li> <li>Now Tasks has Cost value as well, showed in a column</li> <li>Gantt now shows two bars for each task, planned and executed, one is full background and other has transparency</li> <li>Fixing small layout bugs</li> </ul> <h3>v1.8.0:</h3> <ul> <li>Left part of the chart is now created first on JavaScript and establishes the left floating reference</li> <li>Minimum width updated to 632px so that the left part of the chart has a fixed width of 532px and the right part fills out the rest with a minimum of 100px</li> </ul> <h3>v1.7.5.3:</h3> <ul> <li>Fixed group completion percentage that now is a weighted average</li> <li>Start and end dates specified on standard group tasks will now be respected if they fall outside of the calculated group date range</li> <li>Fixed problem that would occur if Tool Tips were disabled</li> <li>Moved example dates forward so the current date marker is visible</li> </ul> <h3>v1.7.5:</h3> <ul> <li>Project Migrated to GitHub</li> <li>Instantiating a new JSGantt.TaskItem will now also accept Date objects for start and end dates</li> <li>Fixed old Internet Explorer compatibilty broken by v1.7</li> <li>Fixed bug in Iso week date format</li> <li>Changed to solid arrows on dependency lines to be more printer friendly</li> <li>Code refactoring and clean up</li> </ul> <h3>v1.7:</h3> <ul> <li> Fixed nasty long-standing bug where the first Gantt chart created must be stored in a javascript variable named &quot;g&quot; <ul> <li>NOTE: This required a change in the method to instatiate a JSGantt.TaskItem object to pass the related chart.</li> <li>A temporary fix is included that still assumes the use of "g" for the chart if the chart object is not passed, this will be removed in v1.8</li> </ul> </li> <li>Altered XML export functionality so that dates are output in the specified input format for the chart</li> <li>Added method to read XML directly from an input string</li> <li>Prevented creation of a task with a duplicate &quot;unique&quot; ID</li> <li>Fixed bug where attempting to remove the first task defined would prevent the chart from redrawing</li> <li>Some general code clean up</li> </ul> </div> <!-- Usage --> <div class="container-fluid section" id="usage"> <h1>Usage</h1> <p>Following the steps below you will be able to get create a basic Gantt Chart. If you notice any bugs, please post them to <a href="https://github.com/jsGanttImproved/jsgantt-improved/issues">GitHub&nbsp;issues</a>.</p> <ol> See the full docs <a href="https://github.com/jsGanttImproved/jsgantt-improved/blob/develop/Documentation.md">here</a>: * https://github.com/jsGanttImproved/jsgantt-improved/blob/develop/Documentation.md </div> <!-- Credits --> <div class="container-fluid section" id="credits"> <h1>Credits</h1> <div class="card-group"> <div class="card contact-card"> <img class="img-fluid" src="https://avatars.githubusercontent.com/eduardomourar" alt="Eduardo Rodrigues"> <div class="card-block"> <h4 class="card-title">Eduardo Rodrigues</h4> <p class="card-text">Developer</p> <div class="text-right"> <a href="https://github.com/eduardomourar" class="card-link contact-link"><i class="fa fa-github"></i></a> </div> </div> </div> <div class="card contact-card"> <img class="img-fluid" src="https://avatars.githubusercontent.com/mariohmol" alt="Mario Mol"> <div class="card-block"> <h4 class="card-title">Mario Mol</h4> <p class="card-text">Developer</p> <div class="text-right"> <a href="https://github.com/mariohmol" class="card-link contact-link"><i class="fa fa-github"></i></a> </div> </div> </div> <div class="card contact-card"> <img class="img-fluid" src="https://avatars.githubusercontent.com/RickCardoso" alt="Ricardo Cardoso"> <div class="card-block"> <h4 class="card-title">Ricardo Cardoso</h4> <p class="card-text">Developer</p> <div class="text-right"> <a href="https://github.com/RickCardoso" class="card-link contact-link"><i class="fa fa-github"></i></a> </div> </div> </div> </div> </div> <!-- Footer --> <div class="footer text-center"> <p>© Copyright 2013-2018 jsGanttImproved<br /> Designed with <a href="https://v4-alpha.getbootstrap.com" target="_blank">Bootstrap</a> and <a href="http://fontawesome.io" target="_blank">Font Awesome</a></p> </div> </body> </html>