Skip to content

Commit

Permalink
Modified the number of week for which the x-axis stays in week mode a…
Browse files Browse the repository at this point in the history
…s discussed in issue #125
  • Loading branch information
knsv committed Mar 5, 2015
1 parent 4214091 commit 85cdfba
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/mermaid.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -28485,8 +28485,8 @@ module.exports.draw = function (text, id) {
.tickSize(-h + theTopPad + conf.gridLineStartPadding, 0, 0)
.tickFormat(d3.time.format.multi(formatter))
;

if(daysInChart >7 && daysInChart<60){
if(daysInChart >7 && daysInChart<230){
xAxis = xAxis.ticks(d3.time.monday.range);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/mermaid.full.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mermaid.slim.js
Original file line number Diff line number Diff line change
Expand Up @@ -28453,8 +28453,8 @@ module.exports.draw = function (text, id) {
.tickSize(-h + theTopPad + conf.gridLineStartPadding, 0, 0)
.tickFormat(d3.time.format.multi(formatter))
;

if(daysInChart >7 && daysInChart<60){
if(daysInChart >7 && daysInChart<230){
xAxis = xAxis.ticks(d3.time.monday.range);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/mermaid.slim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/diagrams/gantt/ganttRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ module.exports.draw = function (text, id) {
.tickFormat(d3.time.format.multi(formatter))
;

if(daysInChart >7 && daysInChart<60){
if(daysInChart >7 && daysInChart<230){
xAxis = xAxis.ticks(d3.time.monday.range);
}

Expand Down
10 changes: 8 additions & 2 deletions test/gantt.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@ <h2>less then a year</h2>
title Adding GANTT diagram functionality to mermaid

section Design
Design jison grammar :done, crit, des1, 2014-01-06,8w
Create example text :done, after des1, 16w
Design1:done, crit, des1, 2014-01-22,4w
Design2:after des1, 3w
Design3:3w
Design4:3w
Design5:18d
Design6:2w
Implementation1:3w
Implementation2:3w
</div>
<h1>Other tests</h1>
<div class="mermaid">
Expand Down
3 changes: 3 additions & 0 deletions test/mix.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
<div class="mermaid">
info
</div>
</body>
</html>

0 comments on commit 85cdfba

Please sign in to comment.