{"id":3941,"date":"2017-03-14T14:00:28","date_gmt":"2017-03-14T10:00:28","guid":{"rendered":"https:\/\/dhtmlx.com\/blog\/?p=3941"},"modified":"2023-05-05T13:08:26","modified_gmt":"2023-05-05T10:08:26","slug":"custom-elements-gantt-chart-component","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/custom-elements-gantt-chart-component\/","title":{"rendered":"Custom Elements of Gantt Chart Component"},"content":{"rendered":"<p>Since the 1910s when the <a href=\"\/\/dhtmlx.com\/docs\/products\/dhtmlxGantt\/\">Gantt Chart<\/a> was initially devised, it has undergone many changes. Different types of projects, relationships between the tasks, and possible unexpectedness that you should be prepared while managing the working process, have led to the creation of more and more new custom elements, tricks, and approaches.<\/p>\n<p><strong><a href=\"\/\/dhtmlx.com\/docs\/products\/dhtmlxGantt\/download.shtml\" onclick=\"ga('send', 'event', 'link', 'click', 'download-gantt-customelements-blog')\">Download dhtmlxGantt &#8211; JavaScript Gantt Chart<\/a><\/strong><\/p>\n<p>One of the simplest examples of such elements is a <strong>Milestone<\/strong>, a mark that shows an important part of the project.<\/p>\n<p>For example, the milestone can show the moment when one of the important phases of the project such as design is finished. It helps define the most important dates at first sight. Moreover, completing a milestone is also a great achievement from a psychological point of view since it gives your team a great sense of accomplishment.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/milestones-2.png\" alt=\"milestones\" width=\"875\" height=\"555\" class=\"aligncenter size-full wp-image-3945\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/milestones-2.png 875w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/milestones-2-300x190.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/milestones-2-768x487.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/p>\n<p>In this article, we&#8217;ll describe two types of custom elements that you can build with our js\/html Gantt Chart: <strong>Deadlines<\/strong> and <strong>Baselines<\/strong>.<\/p>\n<blockquote><p><strong>Note: dhtmlxGantt functionality is not limited to these two types of custom elements. In this blog post we use them as an example. Also, they can be designed based on your needs.<\/strong><\/p><\/blockquote>\n<h4>Using Deadlines<\/h4>\n<p>Without a doubt, meeting your deadlines is one of the key indicators that shows how well the work on the project goes. Missing your deadlines means additional losses and questions your ability to manage the working process successfully. Thus, it&#8217;s pretty important always to keep in mind your deadlines or, what&#8217;s even better, see them before your eyes. It&#8217;s an easy way to alert some possible problems in your schedule. But sometimes deadlines can be overlooked.<\/p>\n<p>Starting from <a href=\"\/\/dhtmlx.com\/blog\/dhtmlxgantt-updated-version-3-0\/\">version 3.0<\/a>, dhtmlxGantt allows you to add custom elements such as deadlines to your apps. Deadline dates are displayed next to each task, and if a task lasts too long and overlaps a deadline marker, you&#8217;ll see a notification icon in the list of tasks at the right side of the app. Here&#8217;s how it can look like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/deadlines-dhtmlxgantt1.png\" alt=\"deadlines-dhtmlxgantt\" width=\"875\" height=\"560\" class=\"aligncenter size-full wp-image-3946\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/deadlines-dhtmlxgantt1.png 875w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/deadlines-dhtmlxgantt1-300x192.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/deadlines-dhtmlxgantt1-768x492.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/p>\n<p>To check how it works, you can visit <a href=\"\/\/docs.dhtmlx.com\/gantt\/samples\/04_customization\/14_deadline.html\">this demo page<\/a>. If you change the duration of a proper task, you&#8217;ll see that a notification icon appears or disappears.<\/p>\n<p>In dhtmlxGantt, displaying additional elements, such as a deadline or baseline, is usually done by creating a displayable layer and placing custom elements there. To add one more layer to the timeline area, use <em>theaddTaskLayer<\/em> method. As a parameter, the method takes a function that takes a task&#8217;s object and returns a DOM element that will be displayed or false.<\/p>\n<p>Here&#8217;s an example of how you can use this method in case you want to add deadlines to your project:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">gantt.<span class=\"me1\">init<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;gantt_here&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">addTaskLayer<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw1\">function<\/span> draw_deadline<span class=\"br0\">&#40;<\/span>task<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>task.<span class=\"me1\">deadline<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">var<\/span> el <span class=\"sy0\">=<\/span> document.<span class=\"me1\">createElement<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'div'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">className<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">'deadline'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">var<\/span> sizes <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">getTaskPosition<\/span><span class=\"br0\">&#40;<\/span>task<span class=\"sy0\">,<\/span> task.<span class=\"me1\">deadline<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">style<\/span>.<span class=\"me1\">left<\/span> <span class=\"sy0\">=<\/span> sizes.<span class=\"me1\">left<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'px'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">style<\/span>.<span class=\"me1\">top<\/span> <span class=\"sy0\">=<\/span> sizes.<span class=\"me1\">top<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'px'<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">setAttribute<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'title'<\/span><span class=\"sy0\">,<\/span> gantt.<span class=\"me1\">templates<\/span>.<span class=\"me1\">task_date<\/span><span class=\"br0\">&#40;<\/span>task.<span class=\"me1\">deadline<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">return<\/span> el<span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">return<\/span> <span class=\"kw2\">false<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Here&#8217;s how everything works. After you call the method, dhtmlxGantt adds a container to the timeline area and calls <em>addTaskLayer<\/em> method for each task. The returned DOM element will be appended to the container. When a task is updated, the custom layers will be updated as well.<\/p>\n<p>To learn more about displaying additional elements in the timeline area, check the following <a href=\"\/\/docs.dhtmlx.com\/gantt\/desktop__baselines.html\">documentation page<\/a>.<\/p>\n<h4>Using Baselines<\/h4>\n<p>First of all, let&#8217;s define what a baseline is and what are the possible reasons to use it in the chart. You can think of the baseline as an original plan of the project that can be used by a project manager to compare it to the actual state of affairs. As a result, you&#8217;ll be able to understand if the initial understanding of the project was right and how effective were the chosen approaches.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/baselines-dhtmlxgantt1.png\" alt=\"baselines-dhtmlxgantt\" width=\"875\" height=\"560\" class=\"aligncenter size-full wp-image-3947\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/baselines-dhtmlxgantt1.png 875w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/baselines-dhtmlxgantt1-300x192.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/03\/baselines-dhtmlxgantt1-768x492.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/p>\n<p>The baseline is a snapshot of your project at a given time. To better monitor the progress of a project, you can create more than one baselines. Those timeline projections could be compared to the actual timeline of a project to define the activities that were delayed, completed ahead of schedule, or performed on time. Such approach allows learning from the previous experience and developing a new strategy of scheduling.<\/p>\n<p>To see how baselines can look in dhtmlxGantt, check <a href=\"\/\/docs.dhtmlx.com\/gantt\/samples\/04_customization\/15_baselines.html\">this demo page<\/a>.<\/p>\n<p>The process of creation of the baselines in case of dhtmlxGantt consists of several tasks. We assume that you already know how to create a Gantt chart. If not, follow <a href=\"\/\/docs.dhtmlx.com\/gantt\/desktop__guides.html\">our guides<\/a>.<\/p>\n<p>To add a baseline to the existing chart, you should free some space under the task bar from the baseline first:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">gantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">task_height<\/span> <span class=\"sy0\">=<\/span> <span class=\"nu0\">16<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">row_height<\/span> <span class=\"sy0\">=<\/span> <span class=\"nu0\">40<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Then, move task line to the top of the row using the following code:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">.<span class=\"me1\">gantt_task_line<\/span><span class=\"sy0\">,<\/span> .<span class=\"me1\">gantt_line_wrapper<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; margin<span class=\"sy0\">-<\/span>top<span class=\"sy0\">:<\/span> <span class=\"sy0\">-<\/span>9px<span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n.<span class=\"me1\">gantt_side_content<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; margin<span class=\"sy0\">-<\/span>bottom<span class=\"sy0\">:<\/span> 7px<span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n.<span class=\"me1\">gantt_task_link<\/span> .<span class=\"me1\">gantt_link_arrow<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; margin<span class=\"sy0\">-<\/span>top<span class=\"sy0\">:<\/span> <span class=\"sy0\">-<\/span>12px<br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n.<span class=\"me1\">gantt_side_content<\/span>.<span class=\"me1\">gantt_right<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; bottom<span class=\"sy0\">:<\/span> <span class=\"nu0\">0<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>After that, you need to add additional data properties to the task object. They&#8217;ll to the start and end values of the snapshot. For, example, <em>planned_start<\/em>, and <em>planned_end<\/em>.<\/p>\n<p>dhtmlxGantt automatically parse the start_date and end_date data properties to Date objects. Any other date properties require additional processing. To make the recently added <em>planned_start<\/em> and <em>planned_endproperties<\/em> recognizable by dhtmlxGantt, we should parse them to Date objects using the <em>parseDate()<\/em> method within the onTaskLoading event handler:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">gantt.<span class=\"me1\">attachEvent<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;onTaskLoading&quot;<\/span><span class=\"sy0\">,<\/span> <span class=\"kw1\">function<\/span><span class=\"br0\">&#40;<\/span>task<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; task.<span class=\"me1\">planned_start<\/span> <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">date<\/span>.<span class=\"me1\">parseDate<\/span><span class=\"br0\">&#40;<\/span>task.<span class=\"me1\">planned_start<\/span><span class=\"sy0\">,<\/span> <span class=\"st0\">&quot;xml_date&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; task.<span class=\"me1\">planned_end<\/span> <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">date<\/span>.<span class=\"me1\">parseDate<\/span><span class=\"br0\">&#40;<\/span>task.<span class=\"me1\">planned_end<\/span><span class=\"sy0\">,<\/span> <span class=\"st0\">&quot;xml_date&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">return<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Now, we should call the <em>addTaskLayer<\/em> method to display planned time for tasks:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">gantt.<span class=\"me1\">addTaskLayer<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw1\">function<\/span> draw_planned<span class=\"br0\">&#40;<\/span>task<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>task.<span class=\"me1\">planned_start<\/span> <span class=\"sy0\">&amp;&amp;<\/span> task.<span class=\"me1\">planned_end<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">var<\/span> sizes <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">getTaskPosition<\/span><span class=\"br0\">&#40;<\/span>task<span class=\"sy0\">,<\/span> task.<span class=\"me1\">planned_start<\/span><span class=\"sy0\">,<\/span> task.<span class=\"me1\">planned_end<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">var<\/span> el <span class=\"sy0\">=<\/span> document.<span class=\"me1\">createElement<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'div'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">className<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">'baseline'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">style<\/span>.<span class=\"me1\">left<\/span> <span class=\"sy0\">=<\/span> sizes.<span class=\"me1\">left<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'px'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">style<\/span>.<span class=\"me1\">width<\/span> <span class=\"sy0\">=<\/span> sizes.<span class=\"me1\">width<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'px'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; el.<span class=\"me1\">style<\/span>.<span class=\"me1\">top<\/span> <span class=\"sy0\">=<\/span> sizes.<span class=\"me1\">top<\/span> <span class=\"sy0\">+<\/span> gantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">task_height<\/span> &nbsp;<span class=\"sy0\">+<\/span> <span class=\"nu0\">13<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'px'<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">return<\/span> el<span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">return<\/span> <span class=\"kw2\">false<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Next, choose how your baselines will look like by using some CSS code:<\/p>\n<div class=\"codecolorer-container css default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"css codecolorer\"><span class=\"re1\">.baseline<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">position<\/span><span class=\"sy0\">:<\/span> <span class=\"kw2\">absolute<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">border-radius<\/span><span class=\"sy0\">:<\/span> <span class=\"re3\">2px<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">opacity<\/span><span class=\"sy0\">:<\/span> <span class=\"nu0\">0.6<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">margin-top<\/span><span class=\"sy0\">:<\/span> <span class=\"re3\">-7px<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">height<\/span><span class=\"sy0\">:<\/span> <span class=\"re3\">12px<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">background<\/span><span class=\"sy0\">:<\/span> <span class=\"re0\">#ffd180<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">border<\/span><span class=\"sy0\">:<\/span> <span class=\"re3\">1px<\/span> <span class=\"kw2\">solid<\/span> <span class=\"kw3\">rgb<\/span><span class=\"br0\">&#40;<\/span><span class=\"nu0\">255<\/span><span class=\"sy0\">,<\/span><span class=\"nu0\">153<\/span><span class=\"sy0\">,<\/span><span class=\"nu0\">0<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>And, finally redefine the Lightbox structure if you want to provide a possibility to edit the newly added properties from UI:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">gantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">lightbox<\/span>.<span class=\"me1\">sections<\/span> <span class=\"sy0\">=<\/span> <span class=\"br0\">&#91;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#123;<\/span>name<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;description&quot;<\/span><span class=\"sy0\">,<\/span> height<span class=\"sy0\">:<\/span> <span class=\"nu0\">70<\/span><span class=\"sy0\">,<\/span> map_to<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;text&quot;<\/span><span class=\"sy0\">,<\/span> type<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;textarea&quot;<\/span><span class=\"sy0\">,<\/span> focus<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#123;<\/span>name<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;time&quot;<\/span><span class=\"sy0\">,<\/span> height<span class=\"sy0\">:<\/span> <span class=\"nu0\">72<\/span><span class=\"sy0\">,<\/span> map_to<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;auto&quot;<\/span><span class=\"sy0\">,<\/span> type<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;duration&quot;<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#123;<\/span>name<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;baseline&quot;<\/span><span class=\"sy0\">,<\/span> height<span class=\"sy0\">:<\/span> <span class=\"nu0\">72<\/span><span class=\"sy0\">,<\/span> map_to<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span> <br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; start_date<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;planned_start&quot;<\/span><span class=\"sy0\">,<\/span> end_date<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;planned_end&quot;<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> type<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;duration&quot;<\/span><span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#93;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">locale<\/span>.<span class=\"me1\">labels<\/span>.<span class=\"me1\">section_baseline<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">&quot;Planned&quot;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>For more detailed information you can check the <a href=\"\/\/docs.dhtmlx.com\/gantt\/desktop__baselines.html\">documentation page<\/a>.<\/p>\n<p><a href=\"\/\/dhtmlx.com\/docs\/products\/dhtmlxGantt\/download.shtml\" onclick=\"ga('send', 'event', 'link', 'click', 'download-gantt-customelements-banner-blog')\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/08\/download-gantt-banner.png\" alt=\"download gantt\" width=\"900\" height=\"300\" class=\"aligncenter size-full wp-image-3693\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/08\/download-gantt-banner.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/08\/download-gantt-banner-300x100.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/08\/download-gantt-banner-768x256.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p>That&#8217;s it for today. We hope you find these new features handy and they&#8217;ll help you to improve the management process. To learn more about how customizing of the Gantt Chart can help with your work, you can check some of our recent posts. For example, <a href=\"\/\/dhtmlx.com\/blog\/critical-path-method-important\/\">What Is Critical Path Method<\/a> or <a href=\"\/\/dhtmlx.com\/blog\/lead-lag-need-know-auto-scheduling-gantt\/\">Leads and Lags.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since the 1910s when the Gantt Chart was initially devised, it has undergone many changes. Different types of projects, relationships between the tasks, and possible unexpectedness that you should &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3811,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,71,1,38],"tags":[33,20],"class_list":["post-3941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-posts-for-codeproject-com","category-tutorials","category-uncategorized","category-visible","tag-all-posts","tag-gantt"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=3941"}],"version-history":[{"count":1,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3941\/revisions"}],"predecessor-version":[{"id":11373,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3941\/revisions\/11373"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3811"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=3941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=3941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=3941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}