gantt: add a topAxis directive to allow per diagram configuration

This commit is contained in:
Nishanth Aravamudan
2021-03-24 11:21:39 -05:00
parent 6629061abd
commit 2d0aab223c
2 changed files with 14 additions and 0 deletions

View File

@@ -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,