mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 08:19:43 +02:00
gantt: add a topAxis directive to allow per diagram configuration
This commit is contained in:
@@ -16,6 +16,7 @@ let currentSection = '';
|
||||
const tags = ['active', 'done', 'crit', 'milestone'];
|
||||
let funs = [];
|
||||
let inclusiveEndDates = false;
|
||||
let topAxis = false;
|
||||
|
||||
// The serial order of the task in the script
|
||||
let lastOrder = 0;
|
||||
@@ -39,6 +40,7 @@ export const clear = function() {
|
||||
todayMarker = '';
|
||||
excludes = [];
|
||||
inclusiveEndDates = false;
|
||||
topAxis = false;
|
||||
lastOrder = 0;
|
||||
};
|
||||
|
||||
@@ -70,6 +72,14 @@ export const endDatesAreInclusive = function() {
|
||||
return inclusiveEndDates;
|
||||
};
|
||||
|
||||
export const enableTopAxis = function() {
|
||||
topAxis = true;
|
||||
};
|
||||
|
||||
export const topAxisEnabled = function() {
|
||||
return topAxis;
|
||||
};
|
||||
|
||||
export const getDateFormat = function() {
|
||||
return dateFormat;
|
||||
};
|
||||
@@ -594,6 +604,8 @@ export default {
|
||||
getDateFormat,
|
||||
enableInclusiveEndDates,
|
||||
endDatesAreInclusive,
|
||||
enableTopAxis,
|
||||
topAxisEnabled,
|
||||
setAxisFormat,
|
||||
getAxisFormat,
|
||||
setTodayMarker,
|
||||
|
Reference in New Issue
Block a user