Browse Source

甘特图库 调整

fujunwen 4 years ago
parent
commit
bc2aa61d33

+ 1 - 1
src/utils/ganttChart/GanttChart_day.js

@@ -341,7 +341,7 @@ GanttChartDay.prototype.drawTimeZone = function() {
     }
     timeGroup.addShape('text', {
       attrs: {
-        x: 40 * i,
+        x: 40 * i + 5,
         y: 40,
         fontSize: 10,
         text: timeText,

+ 2 - 2
src/utils/ganttChart/GanttChart_month.js

@@ -28,7 +28,7 @@ export function GanttChartMonth(options) {
   // 拖动定时器
   this.dragTimer = null;
   // 每天的间隔宽度
-  this.dayStep = parseInt(this.cWidth/365);
+  this.dayStep = parseInt(this.cWidth/365*2/3);
   // 分组标题高度
   this.groupTitleHeight = 18;
   // 任务矩形高度
@@ -328,7 +328,7 @@ GanttChartMonth.prototype.drawTimeZone = function() {
     let daysCount = moment(`${year}-${i}`).dayOfYear()
     timeGroup.addShape('text', {
       attrs: {
-        x: this.dayStep * daysCount,
+        x: this.dayStep * daysCount + 180,
         y: 40,
         fontSize: 10,
         text: timeText,