Added missing integration tests and release version in docs.

This commit is contained in:
Thomas Ingram
2023-08-28 20:17:15 +10:00
parent 8f340094d9
commit 4efac6721d
3 changed files with 49 additions and 5 deletions

View File

@@ -330,6 +330,48 @@ describe('Gantt diagram', () => {
); );
}); });
it('should render a gantt diagram with tick is 2 milliseconds', () => {
imgSnapshotTest(
`
gantt
title A Gantt Diagram
dateFormat SSS
axisFormat %Lms
tickInterval 2millisecond
excludes weekends
section Section
A task : a1, 000, 6ms
Another task : after a1, 6ms
section Another
Task in sec : a2, 006, 3ms
another task : 3ms
`,
{}
);
});
it('should render a gantt diagram with tick is 2 seconds', () => {
imgSnapshotTest(
`
gantt
title A Gantt Diagram
dateFormat ss
axisFormat %Ss
tickInterval 2second
excludes weekends
section Section
A task : a1, 00, 6s
Another task : after a1, 6s
section Another
Task in sec : 06, 3s
another task : 3s
`,
{}
);
});
it('should render a gantt diagram with tick is 15 minutes', () => { it('should render a gantt diagram with tick is 15 minutes', () => {
imgSnapshotTest( imgSnapshotTest(
` `

View File

@@ -241,7 +241,7 @@ The following formatting strings are supported:
More info in: <https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format> More info in: <https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format>
### Axis ticks ### Axis ticks (v10.3.0+)
The default output ticks are auto. You can custom your `tickInterval`, like `1day` or `1week`. The default output ticks are auto. You can custom your `tickInterval`, like `1day` or `1week`.
@@ -252,7 +252,7 @@ tickInterval 1day
The pattern is: The pattern is:
```javascript ```javascript
/^([1-9][0-9]*)(minute|hour|day|week|month)$/; /^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/;
``` ```
More info in: <https://github.com/d3/d3-time#interval_every> More info in: <https://github.com/d3/d3-time#interval_every>
@@ -271,7 +271,7 @@ gantt
weekday monday weekday monday
``` ```
Support: v10.3.0+ > **Warning** > `millisecond` and `second` support was added in vMERMAID_RELEASE_VERSION
## Output in compact mode ## Output in compact mode

View File

@@ -173,7 +173,7 @@ The following formatting strings are supported:
More info in: [https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format](https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format) More info in: [https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format](https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format)
### Axis ticks ### Axis ticks (v10.3.0+)
The default output ticks are auto. You can custom your `tickInterval`, like `1day` or `1week`. The default output ticks are auto. You can custom your `tickInterval`, like `1day` or `1week`.
@@ -197,7 +197,9 @@ gantt
weekday monday weekday monday
``` ```
Support: v10.3.0+ ```warning
`millisecond` and `second` support was added in vMERMAID_RELEASE_VERSION
```
## Output in compact mode ## Output in compact mode