mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
Support customization of gantt diagram xAxis format using diagram code
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user