Support customization of gantt diagram xAxis format using diagram code

This commit is contained in:
Tyler Long
2018-03-13 14:01:44 +08:00
parent 7ef1b28c83
commit f62736c749
6 changed files with 34 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ import moment from 'moment'
import { logger } from '../../logger'
let dateFormat = ''
let axisFormat = ''
let title = ''
let sections = []
let tasks = []
@@ -18,6 +19,14 @@ export const clear = function () {
rawTasks = []
}
export const setAxisFormat = function (txt) {
axisFormat = txt
}
export const getAxisFormat = function () {
return axisFormat
}
export const setDateFormat = function (txt) {
dateFormat = txt
}
@@ -342,6 +351,8 @@ const compileTasks = function () {
export default {
clear,
setDateFormat,
setAxisFormat,
getAxisFormat,
setTitle,
getTitle,
addSection,