tg-ganttchart 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,112 @@
1
+
2
+ <template>
3
+ <svg
4
+ x="0"
5
+ y="0"
6
+ width="100%"
7
+ height="100%"
8
+ class="gantt-elastic__chart-dependency-lines-container"
9
+ :style="{ ...root.style['chart-dependency-lines-container'] }"
10
+ >
11
+ <g v-for="task in dependencyTasks" :key="task.id" :task="task">
12
+ <path
13
+ class="gantt-elastic__chart-dependency-lines-path"
14
+ :style="{ ...root.style['chart-dependency-lines-path'], ...task.style['chart-dependency-lines-path'], ...task.style['chart-dependency-lines-path-' + dependencyLine.task_id] }"
15
+ v-for="dependencyLine in task.dependencyLines"
16
+ :key="dependencyLine.id"
17
+ :task="task"
18
+ :d="dependencyLine.points"
19
+ ></path>
20
+ </g>
21
+ </svg>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ name: 'DependencyLines',
27
+ inject: ['root'],
28
+ props: ['tasks'],
29
+ data() {
30
+ return {};
31
+ },
32
+ methods: {
33
+ /**
34
+ * Get path points
35
+ *
36
+ * @param {any} fromTaskId
37
+ * @param {any} toTaskId
38
+ * @returns {string}
39
+ */
40
+ getPoints(fromTaskId, toTaskId) {
41
+ const fromTask = this.root.getTask(fromTaskId);
42
+ const toTask = this.root.getTask(toTaskId);
43
+ if (
44
+ fromTask === null ||
45
+ toTask === null ||
46
+ !this.root.isTaskVisible(toTask) ||
47
+ !this.root.isTaskVisible(fromTask)
48
+ ) {
49
+ return null;
50
+ }
51
+ const startX = fromTask.x + fromTask.width;
52
+ const startY = fromTask.y + fromTask.height / 2;
53
+ const stopX = toTask.x;
54
+ const stopY = toTask.y + toTask.height / 2;
55
+ const distanceX = stopX - startX;
56
+ let distanceY;
57
+ let yMultiplier = 1;
58
+ if (stopY >= startY) {
59
+ distanceY = stopY - startY;
60
+ } else {
61
+ distanceY = startY - stopY;
62
+ yMultiplier = -1;
63
+ }
64
+ const offset = 10;
65
+ const roundness = 4;
66
+ const isBefore = distanceX <= offset + roundness;
67
+ let points = `M ${startX} ${startY}
68
+ L ${startX + offset},${startY} `;
69
+ if (isBefore) {
70
+ points += `Q ${startX + offset + roundness},${startY} ${startX + offset + roundness},${startY +
71
+ roundness * yMultiplier}
72
+ L ${startX + offset + roundness},${startY + (distanceY * yMultiplier) / 2 - roundness * yMultiplier}
73
+ Q ${startX + offset + roundness},${startY + (distanceY * yMultiplier) / 2} ${startX + offset},${startY +
74
+ (distanceY * yMultiplier) / 2}
75
+ L ${startX - offset + distanceX},${startY + (distanceY * yMultiplier) / 2}
76
+ Q ${startX - offset + distanceX - roundness},${startY + (distanceY * yMultiplier) / 2} ${startX -
77
+ offset +
78
+ distanceX -
79
+ roundness},${startY + (distanceY * yMultiplier) / 2 + roundness * yMultiplier}
80
+ L ${startX - offset + distanceX - roundness},${stopY - roundness * yMultiplier}
81
+ Q ${startX - offset + distanceX - roundness},${stopY} ${startX - offset + distanceX},${stopY}
82
+ L ${stopX},${stopY}`;
83
+ } else {
84
+ points += `L ${startX + distanceX / 2 - roundness},${startY}
85
+ Q ${startX + distanceX / 2},${startY} ${startX + distanceX / 2},${startY + roundness * yMultiplier}
86
+ L ${startX + distanceX / 2},${stopY - roundness * yMultiplier}
87
+ Q ${startX + distanceX / 2},${stopY} ${startX + distanceX / 2 + roundness},${stopY}
88
+ L ${stopX},${stopY}`;
89
+ }
90
+ return points;
91
+ }
92
+ },
93
+ computed: {
94
+ /**
95
+ * Get tasks which are dependent on other tasks
96
+ *
97
+ * @returns {array}
98
+ */
99
+ dependencyTasks() {
100
+ return this.tasks
101
+ .filter(task => typeof task.dependentOn !== 'undefined')
102
+ .map(task => {
103
+ task.dependencyLines = task.dependentOn.map(id => {
104
+ return { points: this.getPoints(id, task.id), task_id: id };
105
+ });
106
+ return task;
107
+ })
108
+ .filter(task => task.dependencyLines.points !== null);
109
+ }
110
+ }
111
+ };
112
+ </script>
@@ -0,0 +1,164 @@
1
+
2
+ <template>
3
+ <svg
4
+ class="gantt-elastic__grid-lines-wrapper"
5
+ :style="{ ...root.style['grid-lines-wrapper'] }"
6
+ ref="chart"
7
+ x="0"
8
+ y="0"
9
+ :width="root.state.options.width"
10
+ :height="root.state.options.allVisibleTasksHeight"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <g class="gantt-elastic__grid-lines" :style="{ ...root.style['grid-lines'] }">
14
+ <line
15
+ class="gantt-elastic__grid-line-horizontal"
16
+ :style="{ ...root.style['grid-line-horizontal'] }"
17
+ v-for="line in horizontalLines"
18
+ :key="line.key"
19
+ :x1="line.x1"
20
+ :y1="line.y1"
21
+ :x2="line.x2"
22
+ :y2="line.y2"
23
+ ></line>
24
+ <line
25
+ class="gantt-elastic__grid-line-vertical"
26
+ :style="{ ...root.style['grid-line-vertical'] }"
27
+ v-for="line in verticalLines"
28
+ :key="line.key"
29
+ :x1="line.x1"
30
+ :y1="line.y1"
31
+ :x2="line.x2"
32
+ :y2="line.y2"
33
+ ></line>
34
+ <line
35
+ class="gantt-elastic__grid-line-time"
36
+ :style="{ ...root.style['grid-line-time'] }"
37
+ :x1="timeLinePosition.x"
38
+ :y1="timeLinePosition.y1"
39
+ :x2="timeLinePosition.x"
40
+ :y2="timeLinePosition.y2"
41
+ ></line>
42
+ </g>
43
+ </svg>
44
+ </template>
45
+
46
+ <script>
47
+ export default {
48
+ name: 'Grid',
49
+ inject: ['root'],
50
+ data() {
51
+ return {};
52
+ },
53
+ /**
54
+ * Created
55
+ */
56
+ created() {
57
+ this.root.$on('recenterPosition', this.recenterPosition);
58
+ },
59
+
60
+ /**
61
+ * Mounted
62
+ */
63
+ mounted() {
64
+ this.$nextTick(() => {
65
+ this.$nextTick(() => {
66
+ // because of stupid slider :/
67
+ this.root.scrollToTime(this.timeLinePosition.time);
68
+ });
69
+ });
70
+ },
71
+
72
+ methods: {
73
+ /**
74
+ * Recenter position - go to current time line
75
+ */
76
+ recenterPosition() {
77
+ this.root.scrollToTime(this.timeLinePosition.time);
78
+ }
79
+ },
80
+
81
+ computed: {
82
+ /**
83
+ * Generate vertical lines of the grid
84
+ *
85
+ * @returns {array}
86
+ */
87
+ verticalLines() {
88
+ let lines = [];
89
+ const state = this.root.state;
90
+ state.options.times.steps.forEach(step => {
91
+ if (this.root.isInsideViewPort(step.offset.px, 1)) {
92
+ lines.push({
93
+ key: step.time,
94
+ x1: step.offset.px,
95
+ y1: 0,
96
+ x2: step.offset.px,
97
+ y2:
98
+ state.tasks.length * (state.options.row.height + state.options.chart.grid.horizontal.gap * 2) +
99
+ this.root.style['grid-line-vertical']['stroke-width']
100
+ });
101
+ }
102
+ });
103
+ return lines;
104
+ },
105
+
106
+ /**
107
+ * Generate horizontal lines of the grid
108
+ *
109
+ * @returns {array}
110
+ */
111
+ horizontalLines() {
112
+ let lines = [];
113
+ const state = this.root.state.options;
114
+ let tasks = this.root.visibleTasks;
115
+ for (let index = 0, len = tasks.length; index <= len; index++) {
116
+ const y =
117
+ index * (state.row.height + state.chart.grid.horizontal.gap * 2) +
118
+ this.root.style['grid-line-vertical']['stroke-width'] / 2;
119
+ lines.push({
120
+ key: 'hl' + index,
121
+ x1: 0,
122
+ y1: y,
123
+ x2: '100%',
124
+ y2: y
125
+ });
126
+ }
127
+ return lines;
128
+ },
129
+
130
+ /**
131
+ * Check if specified line is inside viewport (visible)
132
+ *
133
+ * @returns {function}
134
+ */
135
+ inViewPort() {
136
+ return line => {
137
+ const state = this.root.state.options;
138
+ return line.x1 >= state.scroll.chart.left && line.x1 <= state.scroll.chart.right;
139
+ };
140
+ },
141
+
142
+ /**
143
+ * Get current time line position
144
+ *
145
+ * @returns {object}
146
+ */
147
+ timeLinePosition() {
148
+ const d = new Date();
149
+ const current = d.getTime();
150
+ const currentOffset = this.root.timeToPixelOffsetX(current);
151
+ const timeLine = {
152
+ x: 0,
153
+ y1: 0,
154
+ y2: '100%',
155
+ dateTime: '',
156
+ time: current
157
+ };
158
+ timeLine.x = currentOffset;
159
+ timeLine.dateTime = d.toLocaleDateString();
160
+ return timeLine;
161
+ }
162
+ }
163
+ };
164
+ </script>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <g
3
+ class="gantt-elastic__chart-row-progress-bar-wrapper"
4
+ :style="{ ...root.style['chart-row-progress-bar-wrapper'], ...task.style['chart-row-progress-bar-wrapper'] }"
5
+ >
6
+ <defs>
7
+ <pattern
8
+ id="diagonalHatch"
9
+ :width="root.state.options.chart.progress.width"
10
+ :height="root.state.options.chart.progress.width"
11
+ patternTransform="rotate(45 0 0)"
12
+ patternUnits="userSpaceOnUse"
13
+ >
14
+ <line
15
+ class="chart-row-progress-bar-line"
16
+ :style="{ ...root.style['chart-row-progress-bar-line'], ...task.style['chart-row-progress-bar-line'] }"
17
+ x1="0"
18
+ y1="0"
19
+ x2="0"
20
+ :y2="root.state.options.chart.progress.width"
21
+ />
22
+ </pattern>
23
+ </defs>
24
+ <rect
25
+ v-if="root.state.options.chart.progress.bar"
26
+ class="gantt-elastic__chart-row-progress-bar-solid"
27
+ :style="{ ...root.style['chart-row-progress-bar-solid'], ...task.style['chart-row-progress-bar-solid'] }"
28
+ x="0"
29
+ y="0"
30
+ :width="getProgressWidth"
31
+ ></rect>
32
+ <g v-if="root.state.options.chart.progress.pattern">
33
+ <rect
34
+ class="gantt-elastic__chart-row-progress-bar-pattern"
35
+ :style="{ ...root.style['chart-row-progress-bar-pattern'], ...task.style['chart-row-progress-bar-pattern'] }"
36
+ :x="getProgressWidth"
37
+ y="0"
38
+ :width="100 - task.progress + '%'"
39
+ height="100%"
40
+ ></rect>
41
+ <path
42
+ class="gantt-elastic__chart-row-progress-bar-outline"
43
+ :style="{
44
+ ...root.style['chart-row-progress-bar-outline'],
45
+ ...task.style['base'],
46
+ ...task.style['chart-row-progress-bar-outline']
47
+ }"
48
+ :d="getLinePoints"
49
+ ></path>
50
+ </g>
51
+ </g>
52
+ </template>
53
+
54
+ <script>
55
+ export default {
56
+ name: 'ProgressBar',
57
+ inject: ['root'],
58
+ props: ['task'],
59
+ data() {
60
+ return {};
61
+ },
62
+
63
+ computed: {
64
+ /**
65
+ * Get progress width
66
+ *
67
+ * @returns {string}
68
+ */
69
+ getProgressWidth() {
70
+ return this.task.progress + '%';
71
+ },
72
+
73
+ /**
74
+ * Get line points
75
+ *
76
+ * @returns {string}
77
+ */
78
+ getLinePoints() {
79
+ const start = (this.task.width / 100) * this.task.progress;
80
+ return `M ${start} 0 L ${start} ${this.task.height}`;
81
+ },
82
+
83
+ /**
84
+ * Get solid style
85
+ *
86
+ * @returns {object}
87
+ */
88
+ getSolidStyle() {
89
+ return Object.assign({}, this.root.state.options.chart.progress.styles.bar.solid, this.task.progressBarStyle.bar);
90
+ },
91
+
92
+ /**
93
+ * Get line style
94
+ *
95
+ * @returns {object}
96
+ */
97
+ getLineStyle() {
98
+ return Object.assign(
99
+ {},
100
+ {
101
+ stroke: this.root.state.options.row.styles.bar.stroke + 'a0',
102
+ 'stroke-width': this.root.state.options.row.styles.bar['stroke-width'] / 2
103
+ },
104
+ this.task.style
105
+ );
106
+ }
107
+ }
108
+ };
109
+ </script>
@@ -0,0 +1,117 @@
1
+
2
+ <template>
3
+ <g
4
+ class="gantt-elastic__chart-row-bar-wrapper gantt-elastic__chart-row-milestone-wrapper"
5
+ :style="{
6
+ ...root.style['chart-row-bar-wrapper'],
7
+ ...root.style['chart-row-milestone-wrapper'],
8
+ ...task.style['chart-row-bar-wrapper']
9
+ }"
10
+ >
11
+ <foreignObject
12
+ class="gantt-elastic__chart-expander gantt-elastic__chart-expander--milestone"
13
+ :style="{
14
+ ...root.style['chart-expander'],
15
+ ...root.style['chart-expander--milestone'],
16
+ ...task.style['chart-expander']
17
+ }"
18
+ :x="task.x - root.state.options.chart.expander.offset - root.state.options.chart.expander.size"
19
+ :y="task.y + (root.state.options.row.height - root.state.options.chart.expander.size) / 2"
20
+ :width="root.state.options.chart.expander.size"
21
+ :height="root.state.options.chart.expander.size"
22
+ v-if="displayExpander"
23
+ >
24
+ <expander :tasks="[task]" :options="root.state.options.chart.expander" type="chart"></expander>
25
+ </foreignObject>
26
+ <svg
27
+ class="gantt-elastic__chart-row-bar gantt-elastic__chart-row-milestone"
28
+ :style="{ ...root.style['chart-row-bar'], ...root.style['chart-row-milestone'], ...task.style['chart-row-bar'] }"
29
+ :x="task.x"
30
+ :y="task.y"
31
+ :width="task.width"
32
+ :height="task.height"
33
+ :viewBox="`0 0 ${task.width} ${task.height}`"
34
+ @click="emitEvent('click', $event)"
35
+ @mouseenter="emitEvent('mouseenter', $event)"
36
+ @mouseover="emitEvent('mouseover', $event)"
37
+ @mouseout="emitEvent('mouseout', $event)"
38
+ @mousemove="emitEvent('mousemove', $event)"
39
+ @mousedown="emitEvent('mousedown', $event)"
40
+ @mouseup="emitEvent('mouseup', $event)"
41
+ @mousewheel="emitEvent('mousewheel', $event)"
42
+ @touchstart="emitEvent('touchstart', $event)"
43
+ @touchmove="emitEvent('touchmove', $event)"
44
+ @touchend="emitEvent('touchend', $event)"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ >
47
+ <defs>
48
+ <clipPath :id="clipPathId">
49
+ <polygon :points="getPoints"></polygon>
50
+ </clipPath>
51
+ </defs>
52
+ <polygon
53
+ class="gantt-elastic__chart-row-bar-polygon gantt-elastic__chart-row-milestone-polygon"
54
+ :style="{
55
+ ...root.style['chart-row-bar-polygon'],
56
+ ...root.style['chart-row-milestone-polygon'],
57
+ ...task.style['base'],
58
+ ...task.style['chart-row-bar-polygon']
59
+ }"
60
+ :points="getPoints"
61
+ ></polygon>
62
+ <progress-bar :task="task" :clip-path="'url(#' + clipPathId + ')'"></progress-bar>
63
+ </svg>
64
+ <chart-text :task="task" v-if="root.state.options.chart.text.display"></chart-text>
65
+ </g>
66
+ </template>
67
+
68
+ <script>
69
+ import ChartText from '../Text.vue';
70
+ import ProgressBar from '../ProgressBar.vue';
71
+ import Expander from '../../Expander.vue';
72
+ import taskMixin from './Task.mixin.js';
73
+ export default {
74
+ name: 'Milestone',
75
+ components: {
76
+ ChartText,
77
+ ProgressBar,
78
+ Expander
79
+ },
80
+ inject: ['root'],
81
+ props: ['task'],
82
+ mixins: [taskMixin],
83
+ data() {
84
+ return {};
85
+ },
86
+ computed: {
87
+ /**
88
+ * Get clip path id
89
+ *
90
+ * @returns {string}
91
+ */
92
+ clipPathId() {
93
+ return 'gantt-elastic__milestone-clip-path-' + this.task.id;
94
+ },
95
+
96
+ /**
97
+ * Get points
98
+ *
99
+ * @returns {string}
100
+ */
101
+ getPoints() {
102
+ const task = this.task;
103
+ const fifty = task.height / 2;
104
+ let offset = fifty;
105
+ if (task.width / 2 - offset < 0) {
106
+ offset = task.width / 2;
107
+ }
108
+ return `0,${fifty}
109
+ ${offset},0
110
+ ${task.width - offset},0
111
+ ${task.width},${fifty}
112
+ ${task.width - offset},${task.height}
113
+ ${offset},${task.height}`;
114
+ }
115
+ }
116
+ };
117
+ </script>
@@ -0,0 +1,131 @@
1
+
2
+ <template>
3
+ <g
4
+ class="gantt-elastic__chart-row-bar-wrapper gantt-elastic__chart-row-project-wrapper"
5
+ :style="{
6
+ ...root.style['chart-row-bar-wrapper'],
7
+ ...root.style['chart-row-project-wrapper'],
8
+ ...task.style['chart-row-bar-wrapper']
9
+ }"
10
+ >
11
+ <foreignObject
12
+ class="gantt-elastic__chart-expander gantt-elastic__chart-expander--project"
13
+ :style="{
14
+ ...root.style['chart-expander'],
15
+ ...root.style['chart-expander--project'],
16
+ ...task.style['chart-expander']
17
+ }"
18
+ :x="task.x - root.state.options.chart.expander.offset - root.state.options.chart.expander.size"
19
+ :y="task.y + (root.state.options.row.height - root.state.options.chart.expander.size) / 2"
20
+ :width="root.state.options.chart.expander.size"
21
+ :height="root.state.options.chart.expander.size"
22
+ v-if="displayExpander"
23
+ >
24
+ <expander :tasks="[task]" :options="root.state.options.chart.expander" type="chart"></expander>
25
+ </foreignObject>
26
+ <svg
27
+ class="gantt-elastic__chart-row-bar gantt-elastic__chart-row-project"
28
+ :style="{ ...root.style['chart-row-bar'], ...root.style['chart-row-project'], ...task.style['chart-row-bar'] }"
29
+ :x="task.x"
30
+ :y="task.y"
31
+ :width="task.width"
32
+ :height="task.height"
33
+ :viewBox="`0 0 ${task.width} ${task.height}`"
34
+ @click="emitEvent('click', $event)"
35
+ @mouseenter="emitEvent('mouseenter', $event)"
36
+ @mouseover="emitEvent('mouseover', $event)"
37
+ @mouseout="emitEvent('mouseout', $event)"
38
+ @mousemove="emitEvent('mousemove', $event)"
39
+ @mousedown="emitEvent('mousedown', $event)"
40
+ @mouseup="emitEvent('mouseup', $event)"
41
+ @mousewheel="emitEvent('mousewheel', $event)"
42
+ @touchstart="emitEvent('touchstart', $event)"
43
+ @touchmove="emitEvent('touchmove', $event)"
44
+ @touchend="emitEvent('touchend', $event)"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ >
47
+ <defs>
48
+ <clipPath :id="clipPathId">
49
+ <path :d="getPoints"></path>
50
+ </clipPath>
51
+ </defs>
52
+ <path
53
+ class="gantt-elastic__chart-row-bar-polygon gantt-elastic__chart-row-project-polygon"
54
+ :style="{
55
+ ...root.style['chart-row-bar-polygon'],
56
+ ...root.style['chart-row-project-polygon'],
57
+ ...task.style['base'],
58
+ ...task.style['chart-row-bar-polygon']
59
+ }"
60
+ :d="getPoints"
61
+ ></path>
62
+ <progress-bar :task="task" :clip-path="'url(#' + clipPathId + ')'"></progress-bar>
63
+ </svg>
64
+ <chart-text :task="task" v-if="root.state.options.chart.text.display"></chart-text>
65
+ </g>
66
+ </template>
67
+
68
+ <script>
69
+ import ChartText from '../Text.vue';
70
+ import ProgressBar from '../ProgressBar.vue';
71
+ import Expander from '../../Expander.vue';
72
+ import taskMixin from './Task.mixin.js';
73
+ export default {
74
+ name: 'Project',
75
+ components: {
76
+ ChartText,
77
+ ProgressBar,
78
+ Expander
79
+ },
80
+ inject: ['root'],
81
+ props: ['task'],
82
+ mixins: [taskMixin],
83
+ data() {
84
+ return {};
85
+ },
86
+ computed: {
87
+ /**
88
+ * Get clip path id
89
+ *
90
+ * @returns {string}
91
+ */
92
+ clipPathId() {
93
+ return 'gantt-elastic__project-clip-path-' + this.task.id;
94
+ },
95
+
96
+ /**
97
+ * Get points
98
+ *
99
+ * @returns {string}
100
+ */
101
+ getPoints() {
102
+ const task = this.task;
103
+ const bottom = task.height - task.height / 4;
104
+ const corner = task.height / 6;
105
+ const smallCorner = task.height / 8;
106
+ return `M ${smallCorner},0
107
+ L ${task.width - smallCorner} 0
108
+ L ${task.width} ${smallCorner}
109
+ L ${task.width} ${bottom}
110
+ L ${task.width - corner} ${task.height}
111
+ L ${task.width - corner * 2} ${bottom}
112
+ L ${corner * 2} ${bottom}
113
+ L ${corner} ${task.height}
114
+ L 0 ${bottom}
115
+ L 0 ${smallCorner}
116
+ Z
117
+ `;
118
+ },
119
+
120
+ /**
121
+ * Should we display expander?
122
+ *
123
+ * @returns {boolean}
124
+ */
125
+ displayExpander() {
126
+ const expander = this.root.state.options.chart.expander;
127
+ return expander.display || (expander.displayIfTaskListHidden && !this.root.state.options.taskList.display);
128
+ }
129
+ }
130
+ };
131
+ </script>
@@ -0,0 +1,47 @@
1
+
2
+
3
+ export default {
4
+ computed: {
5
+ /**
6
+ * Get view box
7
+ *
8
+ * @returns {string}
9
+ */
10
+ getViewBox() {
11
+ const task = this.task;
12
+ return `0 0 ${task.width} ${task.height}`;
13
+ },
14
+
15
+ /**
16
+ * Get group transform
17
+ *
18
+ * @returns {string}
19
+ */
20
+ getGroupTransform() {
21
+ return `translate(${this.task.x} ${this.task.y})`;
22
+ },
23
+
24
+ /**
25
+ * Should we display expander?
26
+ *
27
+ * @returns {boolean}
28
+ */
29
+ displayExpander() {
30
+ const expander = this.root.state.options.chart.expander;
31
+ return expander.display || (expander.displayIfTaskListHidden && !this.root.state.options.taskList.display);
32
+ }
33
+ },
34
+ methods: {
35
+ /**
36
+ * Emit event
37
+ *
38
+ * @param {string} eventName
39
+ * @param {Event} event
40
+ */
41
+ emitEvent(eventName, event) {
42
+ if (!this.root.state.options.scroll.scrolling) {
43
+ this.root.$emit(`chart-${this.task.type}-${eventName}`, { event, data: this.task });
44
+ }
45
+ }
46
+ }
47
+ };