{"id":4033,"date":"2020-01-30T12:00:07","date_gmt":"2020-01-30T09:00:07","guid":{"rendered":"https:\/\/dhtmlx.com\/blog\/?p=4033"},"modified":"2025-03-10T16:08:29","modified_gmt":"2025-03-10T13:08:29","slug":"use-dhtmlxgantt-vue-js-framework-demo","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/use-dhtmlxgantt-vue-js-framework-demo\/","title":{"rendered":"How to Use DHTMLX Gantt with Vue.js Framework [Demo]"},"content":{"rendered":"<p><strong>Firstly published on May 11, 2017. Updated on October 10, 2022<\/strong><\/p>\n<p>What&#8217;s extremely awesome about our <a href=\"\/\/dhtmlx.com\/docs\/products\/dhtmlxGantt\/\" target=\"_blank\">Gantt Chart library<\/a> (besides fast performance and vast variety of features) is that it allows integrations with almost all new and popular frameworks and technologies. And today we&#8217;ll show you the easiest way to use js gantt chart with <a href=\"https:\/\/vuejs.org\/\" target=\"_blank\">Vue.js<\/a>, progressive JavaScript framework.<\/p>\n<p>So, follow the instructions below to create a Vue.js Gantt chart or jump to a <a href=\"https:\/\/github.com\/DHTMLX\/vue-gantt-demo\" target=\"_blank\">complete demo on GitHub<\/a> right away.<\/p>\n<p><strong><a href=\"\/\/dhtmlx.com\/docs\/products\/dhtmlxGantt\/\" target=\"_blank\">New to dhtmlxGantt? Learn more about the library now<\/a><\/strong><\/p>\n<h4>How We Start<\/h4>\n<p>The first thing we need to do is to get an app skeleton. And for this, we&#8217;re going to use vue-cli.<\/p>\n<p>Firstly, make sure you have the latest stable versions of Node.js and Vue.js. You can check your Node.js version with the help of <strong>node -v<\/strong> command or download the latest one on the <a href=\"https:\/\/nodejs.org\/en\/\" target=\"_blank\" rel=\"noopener\">Node.js website<\/a>. You can find detailed instructions on how to install the latest Vue.js version as well as vue-cli <a href=\"https:\/\/vuejs.org\/guide\/quick-start.html\" target=\"_blank\" rel=\"noopener\">in this article<\/a>.<\/p>\n<p>You can install vue-cli with the node package manager using command (<strong>npm install -g @vue\/cli<\/strong>) or using yarn:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">yarn global upgrade <span class=\"sy0\">--<\/span>latest <span class=\"sy0\">@<\/span>vue<span class=\"sy0\">\/<\/span>cli<br \/>\nyarn global add <span class=\"sy0\">@<\/span>vue<span class=\"sy0\">\/<\/span>cli<\/div><\/div>\n<p>To create an app, run the following command:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">vue create gantt<span class=\"sy0\">-<\/span>vue<\/div><\/div>\n<p>It will request some project info. You can just leave default answers and press the enter button for each question or select functions manually.<\/p>\n<p>Then you need to go to the app directory, install dependencies and run it.<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">cd gantt<span class=\"sy0\">-<\/span>vue<\/div><\/div>\n<p>If you use yarn, you need to call the following commands:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">yarn install<br \/>\nyarn serve<\/div><\/div>\n<p>If you use npm, you need to call the following commands:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">npm install<br \/>\nnpm run serve<\/div><\/div>\n<p>After these steps, the app should run on <strong>http:\/\/localhost:8080<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4052\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-install.png\" alt=\"vuejs-install\" width=\"692\" height=\"495\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-install.png 692w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-install-300x215.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/p>\n<h4>Moving to Gantt Chart Part<\/h4>\n<p>Now we should get the dhtmlxGantt code. First of all, we need to stop the app by pressing <strong>ctrl+c<\/strong> in the command line in order to run the following command afterward:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">yarn add dhtmlx<span class=\"sy0\">-<\/span>gantt <span class=\"sy0\">--<\/span>save <span class=\"br0\">&#40;<\/span><span class=\"kw1\">for<\/span> yarn<span class=\"br0\">&#41;<\/span><br \/>\nnpm install dhtmlx<span class=\"sy0\">-<\/span>gantt <span class=\"sy0\">--<\/span>save <span class=\"br0\">&#40;<\/span><span class=\"kw1\">for<\/span> npm<span class=\"br0\">&#41;<\/span><\/div><\/div>\n<p>Then, to add a Gantt chart to an application, we should create a component.<\/p>\n<p>So, we&#8217;ll start by creating a folder for the app components. Open the src folder and create components folder in it. Then, create <strong>GanttComponent.vue<\/strong> file in the components folder and put the following code into it:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>components<span class=\"sy0\">\/<\/span>GanttComponent.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><\/div><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<p><script>\/\/ <![CDATA[\nimport {gantt} from 'dhtmlx-gantt'; export default { props: { tasks: { type: Object, default () { return {data: [], links: []} } } }, mounted: function () { gantt.config.date_format = \"%Y-%m-%d\"; gantt.init(this.$refs.ganttContainer); gantt.parse(this.$props.tasks); } }\n\/\/ ]]><\/script><\/p>\n<p>&nbsp;<\/p>\n<p>Now, the Gantt chart component is ready. When the element will be added to the page it will initialize the Gantt chart under &#8220;gantt&#8221; ref. Then, Gantt chart will load data from the tasks property.<\/p>\n<p>And now it&#8217;s time to add the component to our app.<\/p>\n<p>Open App.vue and add the following code instead of the one we&#8217;ve already had there.<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><\/div><\/div>\n<div class=\"container\"><\/div>\n<p>&nbsp;<\/p>\n<p><script>\/\/ <![CDATA[\nimport GanttComponent from '.\/components\/GanttComponent.vue'; export default { name: 'app', components: {GanttComponent}, data () { return { tasks: { data: [ {id: 1, text: 'Task #1', start_date: '2020-01-17', duration: 3, progress: 0.6}, {id: 2, text: 'Task #2', start_date: '2020-01-20', duration: 3, progress: 0.4} ], links: [ {id: 1, source: 1, target: 2, type: '0'} ] }, } } }\n\/\/ ]]><\/script><\/p>\n<p>&nbsp;<\/p>\n<p>Now, we should see the Gantt chart with predefined tasks on a page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4054\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/gantt-vue.png\" alt=\"gantt-vue\" width=\"900\" height=\"265\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/gantt-vue.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/gantt-vue-300x88.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/gantt-vue-768x226.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<h4>Listening changes and handling events<\/h4>\n<p>Let&#8217;s say we need to trace changes in Gantt made by the user and process them somehow &#8211; show the details of the selected item in a separate form, keep data model of the parent component up to date, or send these changes to the backend. In other words, we need a way to let the rest of the app know what happens inside Gantt.<\/p>\n<p>To do so we can <a href=\"https:\/\/docs.dhtmlx.com\/gantt\/desktop__server_side.html#technique\" target=\"_blank\" rel=\"noopener\">create a DataProcessor<\/a> with a custom router object, where the router is a function and <a href=\"https:\/\/vuejs.org\/guide\/essentials\/component-basics.html\" target=\"_blank\" rel=\"noopener\">$emit<\/a> DataProcessor events to the parent component.<\/p>\n<p>As a simple demonstration, let&#8217;s implement a &#8216;changelog&#8217; feature &#8211; we&#8217;ll write all changes made in Gantt in a neat list somewhere on the page.<\/p>\n<p>Firstly, go into the Gantt component and add code that will trace and emit changes of dhtmlxGantt. Add the following code right after the <strong>gantt.init<\/strong> call:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>components<span class=\"sy0\">\/<\/span>GanttComponent.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\ngantt.<span class=\"me1\">createDataProcessor<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#40;<\/span>entity<span class=\"sy0\">,<\/span> action<span class=\"sy0\">,<\/span> data<span class=\"sy0\">,<\/span> id<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&amp;<\/span>gt<span class=\"sy0\">;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$emit<span class=\"br0\">&#40;<\/span>`$<span class=\"br0\">&#123;<\/span>entity<span class=\"br0\">&#125;<\/span><span class=\"sy0\">-<\/span>updated`<span class=\"sy0\">,<\/span> id<span class=\"sy0\">,<\/span> action<span class=\"sy0\">,<\/span> data<span class=\"br0\">&#41;<\/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>It adds handlers to the add\/update\/delete events for the links and tasks. If some particular handler is called, it will trigger vue event on our component with parameters.<\/p>\n<p>The next step is to add listeners for these events into the app component and write a log of actions in another div.<\/p>\n<p>Let&#8217;s extend the app component with the required functionality:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"sy0\">&lt;<\/span>script<span class=\"sy0\">&gt;<\/span><span class=\"co1\">\/\/ &lt;![CDATA[<\/span><br \/>\n<span class=\"kw5\">import<\/span> GanttComponent from <span class=\"st0\">'.\/components\/GanttComponent.vue'<\/span><span class=\"sy0\">;<\/span> <span class=\"kw5\">export<\/span> <span class=\"kw1\">default<\/span> <span class=\"br0\">&#123;<\/span> name<span class=\"sy0\">:<\/span> <span class=\"st0\">'app'<\/span><span class=\"sy0\">,<\/span> components<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span>GanttComponent<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> data <span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span> <span class=\"kw1\">return<\/span> <span class=\"br0\">&#123;<\/span> tasks<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span> data<span class=\"sy0\">:<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"br0\">&#123;<\/span>id<span class=\"sy0\">:<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">,<\/span> text<span class=\"sy0\">:<\/span> <span class=\"st0\">'Task #1'<\/span><span class=\"sy0\">,<\/span> start_date<span class=\"sy0\">:<\/span> <span class=\"st0\">'2020-01-17'<\/span><span class=\"sy0\">,<\/span> duration<span class=\"sy0\">:<\/span> <span class=\"nu0\">3<\/span><span class=\"sy0\">,<\/span> progress<span class=\"sy0\">:<\/span> <span class=\"nu0\">0.6<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#123;<\/span>id<span class=\"sy0\">:<\/span> <span class=\"nu0\">2<\/span><span class=\"sy0\">,<\/span> text<span class=\"sy0\">:<\/span> <span class=\"st0\">'Task #2'<\/span><span class=\"sy0\">,<\/span> start_date<span class=\"sy0\">:<\/span> <span class=\"st0\">'2020-01-20'<\/span><span class=\"sy0\">,<\/span> duration<span class=\"sy0\">:<\/span> <span class=\"nu0\">3<\/span><span class=\"sy0\">,<\/span> progress<span class=\"sy0\">:<\/span> <span class=\"nu0\">0.4<\/span><span class=\"br0\">&#125;<\/span> <span class=\"br0\">&#93;<\/span><span class=\"sy0\">,<\/span> links<span class=\"sy0\">:<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"br0\">&#123;<\/span>id<span class=\"sy0\">:<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">,<\/span> source<span class=\"sy0\">:<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">,<\/span> target<span class=\"sy0\">:<\/span> <span class=\"nu0\">2<\/span><span class=\"sy0\">,<\/span> type<span class=\"sy0\">:<\/span> <span class=\"st0\">'0'<\/span><span class=\"br0\">&#125;<\/span> <span class=\"br0\">&#93;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> messages<span class=\"sy0\">:<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#93;<\/span> <span class=\"br0\">&#125;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> methods<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span> addMessage <span class=\"br0\">&#40;<\/span>message<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span> <span class=\"kw1\">this<\/span>.<span class=\"me1\">messages<\/span>.<span class=\"me1\">unshift<\/span><span class=\"br0\">&#40;<\/span>message<span class=\"br0\">&#41;<\/span> <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">this<\/span>.<span class=\"me1\">messages<\/span>.<span class=\"me1\">length<\/span> <span class=\"sy0\">&gt;<\/span> <span class=\"nu0\">40<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">this<\/span>.<span class=\"me1\">messages<\/span>.<span class=\"me1\">pop<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp;<br \/>\n&nbsp; &nbsp; logTaskUpdate <span class=\"br0\">&#40;<\/span>id<span class=\"sy0\">,<\/span> mode<span class=\"sy0\">,<\/span> task<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; let text <span class=\"sy0\">=<\/span> <span class=\"br0\">&#40;<\/span>task <span class=\"sy0\">&amp;&amp;<\/span> task.<span class=\"me1\">text<\/span> <span class=\"sy0\">?<\/span> ` <span class=\"br0\">&#40;<\/span>$<span class=\"br0\">&#123;<\/span>task.<span class=\"me1\">text<\/span><span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span>`<span class=\"sy0\">:<\/span> <span class=\"st0\">''<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; let message <span class=\"sy0\">=<\/span> `Task $<span class=\"br0\">&#123;<\/span>mode<span class=\"br0\">&#125;<\/span><span class=\"sy0\">:<\/span> $<span class=\"br0\">&#123;<\/span>id<span class=\"br0\">&#125;<\/span> $<span class=\"br0\">&#123;<\/span>text<span class=\"br0\">&#125;<\/span>`<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">this<\/span>.<span class=\"me1\">addMessage<\/span><span class=\"br0\">&#40;<\/span>message<span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp;<br \/>\n&nbsp; &nbsp; logLinkUpdate <span class=\"br0\">&#40;<\/span>id<span class=\"sy0\">,<\/span> mode<span class=\"sy0\">,<\/span> link<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; let message <span class=\"sy0\">=<\/span> `Link $<span class=\"br0\">&#123;<\/span>mode<span class=\"br0\">&#125;<\/span><span class=\"sy0\">:<\/span> $<span class=\"br0\">&#123;<\/span>id<span class=\"br0\">&#125;<\/span>`<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>link<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; message <span class=\"sy0\">+=<\/span> ` <span class=\"br0\">&#40;<\/span> source<span class=\"sy0\">:<\/span> $<span class=\"br0\">&#123;<\/span>link.<span class=\"me1\">source<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span> target<span class=\"sy0\">:<\/span> $<span class=\"br0\">&#123;<\/span>link.<span class=\"me1\">target<\/span><span class=\"br0\">&#125;<\/span> <span class=\"br0\">&#41;<\/span>`<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"kw1\">this<\/span>.<span class=\"me1\">addMessage<\/span><span class=\"br0\">&#40;<\/span>message<span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n&nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/ ]]&gt;&lt;\/script&gt;<\/span><\/div><\/div>\n<p>&nbsp;<\/p>\n<p>What you can see here &#8211; we&#8217;ve added an array property where we&#8217;re going to store log entries, a method that adds a new message to the top of that array (our log will show new entries first). Also, we&#8217;ve added two more methods that will create log messages for actions done with tasks and links and add them to the message stack.<\/p>\n<p>And finally, update a template of the app component to utilize these functions:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><\/div><\/div>\n<div class=\"container\">\n<div class=\"right-container\">\n<ul class=\"gantt-messages\">\n<li class=\"gantt-message\">{{message}}<\/li>\n<\/ul>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>We&#8217;ve added a simple two-column layout, attached our log handlers to the Gantt events that we emit from the Gantt module, added a container for log messages and bound them to our log messages stack.<\/p>\n<p>Now, if we make some changes to Gantt, messages should be shown on the right side.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4051\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-gantt-chart.png\" alt=\"vuejs-gantt-chart\" width=\"900\" height=\"655\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-gantt-chart.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-gantt-chart-300x218.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/vuejs-gantt-chart-768x559.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>If you want to display some info about the selected tasks, proceed to the instructions below.<\/p>\n<p>To show information about selected tasks, we can capture <a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__refs__gantt_events.html\" target=\"_blank\" rel=\"noopener\">API events<\/a> of DHTMLX Gantt (&#8216;<a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__gantt_ontaskselected_event.html\" target=\"_blank\" rel=\"noopener\">onTaskSelected<\/a>&#8216;) and $emit them to the parent component. We can also use the &#8216;<a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__gantt_ontaskidchange_event.html\" target=\"_blank\" rel=\"noopener\">onTaskIdChange<\/a>&#8216; event to update information after changing the task id.<\/p>\n<p>Open the Gantt chart component and add the following code right before <strong>gantt.init call<\/strong>:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>components<span class=\"sy0\">\/<\/span>GanttComponent.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\ngantt.<span class=\"me1\">attachEvent<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'onTaskSelected'<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&amp;<\/span>gt<span class=\"sy0\">;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet task <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">getTask<\/span><span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$emit<span class=\"br0\">&#40;<\/span><span class=\"st0\">'task-selected'<\/span><span class=\"sy0\">,<\/span> task<span class=\"br0\">&#41;<\/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>gantt.attachEvent(&#8216;onTaskIdChange&#8217;, (id, new_id) =&gt; {<br \/>\nif (gantt.getSelectedId() == new_id) {<br \/>\nlet task = gantt.getTask(new_id);<br \/>\nthis.$emit(&#8216;task-selected&#8217;, task);<br \/>\n}<br \/>\n});<\/p>\n<p>Here we&#8217;ve added the <strong>onTaskSelected<\/strong> handler that is going to trigger a &#8216;task-selected&#8217; event.<\/p>\n<p>Open the app component to add a selection handler to it. We need to add some necessary elements to our template as well. It should look like this:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><\/div><\/div>\n<div class=\"container\">\n<div class=\"right-container\">\n<div class=\"gantt-selected-info\">\n<div>\n<h2>{{ selectedTask.text }}<\/h2>\n<p><b>ID: <\/b>{{ selectedTask.id }}<br \/>\n<b>Progress: <\/b> {{ progressPercentage }}<br \/>\n<b>Start Date: {{ formattedStartDate }}<br \/>\n<b>End Date: <\/b>{{ formattedEndDate }} <\/b><\/p>\n<\/div>\n<div class=\"select-task-prompt\">\n<h2>Click any task<\/h2>\n<\/div>\n<\/div>\n<ul class=\"gantt-messages\">\n<li class=\"gantt-message\">{{ message }}<\/li>\n<\/ul>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>It&#8217;s also necessary to set styles to show the information about the selected tasks in a nice-looking way:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">&nbsp;<\/div><\/div>\n<p>&nbsp;<\/p>\n<p>Here we&#8217;ve added another container, which is bound to the <strong>selectedTask<\/strong> property of the app component using &#8220;v-if&#8221; directive. Besides, we&#8217;ve added a handler for the &#8220;task-selected&#8221; event we now emit.<\/p>\n<p>Make sure to add this property to the app component:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\nselectedTask<span class=\"sy0\">:<\/span> <span class=\"kw2\">null<\/span><\/div><\/div>\n<p>And add the <strong>selectTask<\/strong> method, which is used in the handler we&#8217;ve defined above:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\nselectTask<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<span class=\"kw1\">this<\/span>.<span class=\"me1\">selectedTask<\/span> <span class=\"sy0\">=<\/span> task<br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>Thus, each time a user selects a task inside Gantt, the component emits the &#8216;task-selected&#8217; event. Then this event is captured by the app component. Inside the event handler, we update the <strong>selectedTask<\/strong> property, which in its turn invokes a repaint of the <strong>.gantt-selected-info<\/strong> element with task details.<\/p>\n<p>Note that the task object has the <strong>start_date\/end_date<\/strong> properties of Date type and progress completion in float type &#8211; these should be formatted in a human-friendly form before being added to the page.<\/p>\n<p>It\u2019s implemented using <strong>progressPercentage<\/strong>,<strong>formattedStartDate<\/strong>, and <strong>formattedEndDate<\/strong> computed properties, which we define like this:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"br0\">&#123;<\/span><span class=\"br0\">&#123;<\/span> src<span class=\"sy0\">\/<\/span>App.<span class=\"me1\">vue<\/span> <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#125;<\/span><br \/>\ncomputed<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nprogressPercentage<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet taskProgress <span class=\"sy0\">=<\/span> <span class=\"kw1\">this<\/span>.<span class=\"me1\">selectedTask<\/span>.<span class=\"me1\">progress<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span><span class=\"sy0\">!<\/span>taskProgress<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">return<\/span> <span class=\"st0\">&quot;0&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"kw1\">return<\/span> `$<span class=\"br0\">&#123;<\/span><span class=\"kw4\">Math<\/span>.<span class=\"me1\">round<\/span><span class=\"br0\">&#40;<\/span><span class=\"sy0\">+<\/span>taskProgress <span class=\"sy0\">*<\/span> <span class=\"nu0\">100<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span> <span class=\"sy0\">%<\/span>`<span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\nformattedStartDate<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet taskStart <span class=\"sy0\">=<\/span> <span class=\"kw1\">this<\/span>.<span class=\"me1\">selectedTask<\/span>.<span class=\"me1\">start_date<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">return<\/span> `$<span class=\"br0\">&#123;<\/span>taskStart.<span class=\"me1\">getFullYear<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span> <span class=\"sy0\">\/<\/span> $<span class=\"br0\">&#123;<\/span>taskStart.<span class=\"me1\">getMonth<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">+<\/span> <span class=\"nu0\">1<\/span><span class=\"br0\">&#125;<\/span> <span class=\"sy0\">\/<\/span> $<span class=\"br0\">&#123;<\/span>taskStart.<span class=\"me1\">getDate<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span>`<span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\nformattedEndDate<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet taskEnd <span class=\"sy0\">=<\/span> <span class=\"kw1\">this<\/span>.<span class=\"me1\">selectedTask<\/span>.<span class=\"me1\">end_date<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">return<\/span> `$<span class=\"br0\">&#123;<\/span>taskEnd.<span class=\"me1\">getFullYear<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span> <span class=\"sy0\">\/<\/span> $<span class=\"br0\">&#123;<\/span>taskEnd.<span class=\"me1\">getMonth<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">+<\/span> <span class=\"nu0\">1<\/span><span class=\"br0\">&#125;<\/span> <span class=\"sy0\">\/<\/span> $<span class=\"br0\">&#123;<\/span>taskEnd.<span class=\"me1\">getDate<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span>`<span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><\/div><\/div>\n<p>Now, if we run our app and select a task, we should see that its info is shown on the right.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4053\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/Gantt-chart-vuejs.png\" alt=\"Gantt-chart-vuejs\" width=\"900\" height=\"655\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/Gantt-chart-vuejs.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/Gantt-chart-vuejs-300x218.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2017\/05\/Gantt-chart-vuejs-768x559.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<h4>Final touch<\/h4>\n<p>Note that our GanttComponent.vue component uses the global instance of the <strong>Gantt<\/strong> object. We do it in order to make our tutorial compatible with all versions of dhtmlxGantt, both paid and free ones.<\/p>\n<p>But this approach hides one pitfall &#8211; different instances of the GanttComponent.vue component can be mounted and unmounted multiple times through pages lifecycle, and each time our &#8216;mounted&#8217; hook will work with the same Gantt object which could have been already initialized.<\/p>\n<p>It is not a problem by itself, but you&#8217;ll need to do certain precautions to prevent side effects that can be caused by the state of the reused instance of dhtmlxGantt.<\/p>\n<p>Generally, you must be aware of two things:<br \/>\n1) Event handlers that are added using <a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__gantt_attachevent.html\" target=\"_blank\" rel=\"noopener\">gantt.attachEvent<\/a> should never be detached when the component is unmounted. You either need to detach them manually using <a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__gantt_detachevent.html\" target=\"_blank\" rel=\"noopener\">gantt.detachEvent<\/a> or to ensure that these events are added only once.<\/p>\n<p>This can be done by moving <a href=\"https:\/\/docs.dhtmlx.com\/gantt\/api__gantt_attachevent.html\" target=\"_blank\" rel=\"noopener\">gantt.attachEvent<\/a> calls to a separate function and setting up a flag that will allow us to tell track that function has already been called:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">methods<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n$_initGanttEvents<span class=\"sy0\">:<\/span> <span class=\"kw1\">function<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span><span class=\"sy0\">!<\/span>gantt.$_eventsInitialized<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\ngantt.<span class=\"me1\">attachEvent<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'onTaskSelected'<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&amp;<\/span>gt<span class=\"sy0\">;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet task <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">getTask<\/span><span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$emit<span class=\"br0\">&#40;<\/span><span class=\"st0\">'task-selected'<\/span><span class=\"sy0\">,<\/span> task<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">attachEvent<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'onTaskIdChange'<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#40;<\/span>id<span class=\"sy0\">,<\/span> new_id<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&amp;<\/span>gt<span class=\"sy0\">;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>gantt.<span class=\"me1\">getSelectedId<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">==<\/span> new_id<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\nlet task <span class=\"sy0\">=<\/span> gantt.<span class=\"me1\">getTask<\/span><span class=\"br0\">&#40;<\/span>new_id<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$emit<span class=\"br0\">&#40;<\/span><span class=\"st0\">'task-selected'<\/span><span class=\"sy0\">,<\/span> task<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.$_eventsInitialized <span class=\"sy0\">=<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">,<\/span><\/div><\/div>\n<p>And call this method from the <strong>mounted<\/strong> hook:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">mounted<span class=\"sy0\">:<\/span> <span class=\"kw1\">function<\/span> <span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$_initGanttEvents<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">date_format<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">&quot;%Y-%m-%d&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">init<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw1\">this<\/span>.$refs.<span class=\"me1\">ganttContainer<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">parse<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw1\">this<\/span>.$props.<span class=\"me1\">tasks<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>2) The same works for the dataProcessor. It can be either destroyed from the <strong>unmounted<\/strong> hook, or you can ensure you&#8217;re attaching only one dataProcessor to the Gantt:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">methods<span class=\"sy0\">:<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n$_initDataProcessor<span class=\"sy0\">:<\/span> <span class=\"kw1\">function<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span><span class=\"sy0\">!<\/span>gantt.$_dataProcessorInitialized<span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\ngantt.<span class=\"me1\">createDataProcessor<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#40;<\/span>entity<span class=\"sy0\">,<\/span> action<span class=\"sy0\">,<\/span> data<span class=\"sy0\">,<\/span> id<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&amp;<\/span>gt<span class=\"sy0\">;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$emit<span class=\"br0\">&#40;<\/span>`$<span class=\"br0\">&#123;<\/span>entity<span class=\"br0\">&#125;<\/span><span class=\"sy0\">-<\/span>updated`<span class=\"sy0\">,<\/span> id<span class=\"sy0\">,<\/span> action<span class=\"sy0\">,<\/span> data<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.$_dataProcessorInitialized <span class=\"sy0\">=<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>And then in mounted:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">mounted<span class=\"sy0\">:<\/span> <span class=\"kw1\">function<\/span> <span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">this<\/span>.$_initGanttEvents<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ngantt.<span class=\"me1\">config<\/span>.<span class=\"me1\">date_format<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">&quot;%Y-%m-%d&quot;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>gantt.init(this.$refs.ganttContainer);<br \/>\ngantt.parse(this.$props.tasks);<\/p>\n<p>this.$_initDataProcessor();<br \/>\n}<\/p>\n<p>So, we&#8217;ve created a simple Gantt chart with the help of DHTMLX Gantt and Vue.js. <strong>The results of our work <a href=\"https:\/\/github.com\/DHTMLX\/vue-gantt-demo\" target=\"_blank\">can be found on GitHub<\/a>.<\/strong> If you follow the instructions above and meet any difficulties, don\u2019t hesitate to share them with us.<\/p>\n<h4>Which technologies\/frameworks are you using?<\/h4>\n<p>We need your feedback to provide the right integrations at the right time. Please leave your requests here:<\/p>\n<p><a class=\"typeform-share button\" style=\"display: inline-block; text-decoration: none; background-color: #41b883; color: white; cursor: pointer; font-family: Helvetica,Arial,sans-serif; font-size: 16px; line-height: 40px; text-align: center; margin: 0; height: 40px; padding: 0px 26px; border-radius: 20px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;\" href=\"https:\/\/dhtmlx.typeform.com\/to\/D3AU2V\" target=\"_blank\" data-mode=\"drawer_right\">Request Integration <\/a><script>\/\/ <![CDATA[\n(function() { var qs,js,q,s,d=document, gi=d.getElementById, ce=d.createElement, gt=d.getElementsByTagName, id=\"typef_orm_share\", b=\"https:\/\/embed.typeform.com\/\"; if(!gi.call(d,id)){ js=ce.call(d,\"script\"); js.id=id; js.src=b+\"embed.js\"; q=gt.call(d,\"script\")[0]; q.parentNode.insertBefore(js,q) } })()\n\/\/ ]]><\/script><\/p>\n<p>Thank you in advance and stay tuned for new tutorials!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firstly published on May 11, 2017. Updated on October 10, 2022 What&#8217;s extremely awesome about our Gantt Chart library (besides fast performance and vast variety of features) is that &#8230;<\/p>\n","protected":false},"author":2,"featured_media":4034,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,71,1,38],"tags":[33,20,14,60,55],"class_list":["post-4033","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","tag-tips","tag-integrations-gantt","tag-vue-js"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/4033","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=4033"}],"version-history":[{"count":21,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/4033\/revisions"}],"predecessor-version":[{"id":13463,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/4033\/revisions\/13463"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/4034"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=4033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=4033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=4033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}