mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 00:40:22 +02:00
gantt: only display topAxis if configured or directive is set
This commit is contained in:
@@ -371,6 +371,7 @@ export const draw = function(text, id) {
|
|||||||
.attr('font-size', 10)
|
.attr('font-size', 10)
|
||||||
.attr('dy', '1em');
|
.attr('dy', '1em');
|
||||||
|
|
||||||
|
if (ganttDb.topAxisEnabled() || conf.topAxis) {
|
||||||
let topXAxis = axisTop(timeScale)
|
let topXAxis = axisTop(timeScale)
|
||||||
.tickSize(-h + theTopPad + conf.gridLineStartPadding)
|
.tickSize(-h + theTopPad + conf.gridLineStartPadding)
|
||||||
.tickFormat(timeFormat(parser.yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
|
.tickFormat(timeFormat(parser.yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
|
||||||
@@ -387,6 +388,7 @@ export const draw = function(text, id) {
|
|||||||
.attr('font-size', 10)
|
.attr('font-size', 10)
|
||||||
.attr('dy', '1em');
|
.attr('dy', '1em');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function vertLabels(theGap, theTopPad) {
|
function vertLabels(theGap, theTopPad) {
|
||||||
const numOccurances = [];
|
const numOccurances = [];
|
||||||
|
Reference in New Issue
Block a user