manim-web 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/text/index.d.ts +2 -0
- package/dist/animation/text/index.d.ts.map +1 -0
- package/dist/animation/text/kineticTypography.d.ts +144 -0
- package/dist/animation/text/kineticTypography.d.ts.map +1 -0
- package/dist/audio/MidiInput.d.ts +159 -0
- package/dist/audio/MidiInput.d.ts.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/integrations/notebook.d.ts +117 -0
- package/dist/integrations/notebook.d.ts.map +1 -0
- package/dist/integrations/notebook.js +60 -0
- package/dist/integrations/react.js +16 -16
- package/dist/integrations/vue.js +13 -13
- package/dist/manim-web.browser.js +9638 -7586
- package/dist/mobjects/graphing/AreaChart.d.ts +101 -0
- package/dist/mobjects/graphing/AreaChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/CalendarHeatmap.d.ts +111 -0
- package/dist/mobjects/graphing/CalendarHeatmap.d.ts.map +1 -0
- package/dist/mobjects/graphing/ChordDiagram.d.ts +122 -0
- package/dist/mobjects/graphing/ChordDiagram.d.ts.map +1 -0
- package/dist/mobjects/graphing/GanttChart.d.ts +179 -0
- package/dist/mobjects/graphing/GanttChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/RadarChart.d.ts +135 -0
- package/dist/mobjects/graphing/RadarChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/StackedBarChart.d.ts +131 -0
- package/dist/mobjects/graphing/StackedBarChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/StepChart.d.ts +90 -0
- package/dist/mobjects/graphing/StepChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/Treemap.d.ts +100 -0
- package/dist/mobjects/graphing/Treemap.d.ts.map +1 -0
- package/dist/mobjects/graphing/WaterfallChart.d.ts +164 -0
- package/dist/mobjects/graphing/WaterfallChart.d.ts.map +1 -0
- package/dist/mobjects/graphing/chartColors.d.ts +18 -0
- package/dist/mobjects/graphing/chartColors.d.ts.map +1 -0
- package/dist/mobjects/graphing/chordLayout.d.ts +89 -0
- package/dist/mobjects/graphing/chordLayout.d.ts.map +1 -0
- package/dist/mobjects/graphing/ganttLayout.d.ts +36 -0
- package/dist/mobjects/graphing/ganttLayout.d.ts.map +1 -0
- package/dist/mobjects/graphing/index.d.ts +12 -0
- package/dist/mobjects/graphing/index.d.ts.map +1 -1
- package/dist/mobjects/graphing/treemapLayout.d.ts +83 -0
- package/dist/mobjects/graphing/treemapLayout.d.ts.map +1 -0
- package/dist/{src-Dq6hmMfV.js → src-C3q2JQb_.js} +4054 -2002
- package/package.json +6 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Group } from '../../core/Group';
|
|
2
|
+
import { VGroup } from '../../core/VGroup';
|
|
3
|
+
import { Polygon } from '../geometry/Polygon';
|
|
4
|
+
import { Axes } from './Axes';
|
|
5
|
+
/** Options for creating an AreaChart. */
|
|
6
|
+
export interface AreaChartOptions {
|
|
7
|
+
/** Y-values as [series][point]. A flat array is treated as a single series. */
|
|
8
|
+
values: number[][] | number[];
|
|
9
|
+
/** Shared x-values, one per point. Default: indices 0, 1, 2, ... */
|
|
10
|
+
xValues?: number[];
|
|
11
|
+
/** Stack the series so each area rests on the sum below it. Default: false */
|
|
12
|
+
stacked?: boolean;
|
|
13
|
+
/** Baseline each (unstacked) area fills down to. Default: 0 */
|
|
14
|
+
baseline?: number;
|
|
15
|
+
/** Series colors for fills and lines. Single color or array. Default: Manim palette */
|
|
16
|
+
seriesColors?: string | string[];
|
|
17
|
+
/** Series names for the legend. Default: [] */
|
|
18
|
+
seriesNames?: string[];
|
|
19
|
+
/** Fill opacity for the areas. Default: 0.4 */
|
|
20
|
+
fillOpacity?: number;
|
|
21
|
+
/** Stroke width for the top line. Default: 3 */
|
|
22
|
+
lineWidth?: number;
|
|
23
|
+
/** An existing Axes to plot onto. When omitted, one is built from the data. */
|
|
24
|
+
axes?: Axes;
|
|
25
|
+
/** X-axis range override as [min, max] or [min, max, step]. */
|
|
26
|
+
xRange?: [number, number] | [number, number, number];
|
|
27
|
+
/** Y-axis range override as [min, max] or [min, max, step]. */
|
|
28
|
+
yRange?: [number, number] | [number, number, number];
|
|
29
|
+
/** Visual length of the x-axis when auto-building axes. Default: 8 */
|
|
30
|
+
xLength?: number;
|
|
31
|
+
/** Visual length of the y-axis when auto-building axes. Default: 6 */
|
|
32
|
+
yLength?: number;
|
|
33
|
+
/** Color for the axes when auto-building. Default: white */
|
|
34
|
+
axisColor?: string;
|
|
35
|
+
}
|
|
36
|
+
/** The two mobjects that draw one series of an AreaChart. */
|
|
37
|
+
interface SeriesParts {
|
|
38
|
+
/** The filled area from the top line down to the band below. */
|
|
39
|
+
area: Polygon;
|
|
40
|
+
/** The top boundary line. */
|
|
41
|
+
line: Polygon;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* AreaChart - one or more series drawn as filled areas under a line.
|
|
45
|
+
*
|
|
46
|
+
* Each series becomes a semi-transparent fill from its line down to the
|
|
47
|
+
* baseline, plus the line itself. When `stacked` is set, each area rests on
|
|
48
|
+
* the cumulative sum of the series below it.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const chart = new AreaChart({
|
|
53
|
+
* values: [[1, 3, 2, 5], [2, 1, 4, 3]],
|
|
54
|
+
* stacked: true,
|
|
55
|
+
* seriesNames: ['A', 'B'],
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare class AreaChart extends Group {
|
|
60
|
+
/** The coordinate system the areas are plotted on. */
|
|
61
|
+
axes: Axes;
|
|
62
|
+
/** The filled areas, one per series. */
|
|
63
|
+
areas: VGroup;
|
|
64
|
+
/** The top boundary lines, one per series. */
|
|
65
|
+
lines: VGroup;
|
|
66
|
+
protected _values: number[][];
|
|
67
|
+
protected _x: number[];
|
|
68
|
+
protected _stacked: boolean;
|
|
69
|
+
protected _baseline: number;
|
|
70
|
+
protected _colors: string[];
|
|
71
|
+
protected _fillOpacity: number;
|
|
72
|
+
protected _lineWidth: number;
|
|
73
|
+
protected _parts: SeriesParts[];
|
|
74
|
+
constructor(options: AreaChartOptions);
|
|
75
|
+
private _normalize;
|
|
76
|
+
/** The cumulative baseline below series `s` at point index `i`. */
|
|
77
|
+
private _bandBelow;
|
|
78
|
+
/** The top value of series `s` at point index `i`. */
|
|
79
|
+
private _bandTop;
|
|
80
|
+
private _buildAxes;
|
|
81
|
+
private _createSeries;
|
|
82
|
+
/** The coordinate system. */
|
|
83
|
+
getAxes(): Axes;
|
|
84
|
+
/** The number of series. */
|
|
85
|
+
getNumSeries(): number;
|
|
86
|
+
/** The filled area polygon of series `s`. */
|
|
87
|
+
getArea(s: number): Polygon | undefined;
|
|
88
|
+
/** The top boundary line of series `s`. */
|
|
89
|
+
getLine(s: number): Polygon | undefined;
|
|
90
|
+
/** The area and line of series `s` grouped together. */
|
|
91
|
+
getSeries(s: number): VGroup;
|
|
92
|
+
/** The data-space baseline value an unstacked area fills down to. */
|
|
93
|
+
getBaseline(): number;
|
|
94
|
+
/** The top data value of series `s` at each x (cumulative when stacked). */
|
|
95
|
+
getTopValues(s: number): number[];
|
|
96
|
+
/** The baseline data value below series `s` at each x (cumulative when stacked). */
|
|
97
|
+
getBottomValues(s: number): number[];
|
|
98
|
+
copy(): AreaChart;
|
|
99
|
+
}
|
|
100
|
+
export {};
|
|
101
|
+
//# sourceMappingURL=AreaChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/AreaChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB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} from '../../core/Group';
|
|
2
|
+
import { VGroup } from '../../core/VGroup';
|
|
3
|
+
import { Rectangle } from '../geometry/Rectangle';
|
|
4
|
+
/** GitHub-style green contribution palette (light to dark). */
|
|
5
|
+
export declare const GITHUB_GREENS: readonly string[];
|
|
6
|
+
/** One dated value for a CalendarHeatmap. */
|
|
7
|
+
export interface CalendarDatum {
|
|
8
|
+
/** The day, as a 'YYYY-MM-DD' string or a Date. */
|
|
9
|
+
date: string | Date;
|
|
10
|
+
/** The value that colors the day. */
|
|
11
|
+
value: number;
|
|
12
|
+
}
|
|
13
|
+
/** The grid position of a day cell. */
|
|
14
|
+
export interface CellPosition {
|
|
15
|
+
/** Column index (week offset from the start). */
|
|
16
|
+
week: number;
|
|
17
|
+
/** Row index (0..6), the weekday within the chart's week layout. */
|
|
18
|
+
weekday: number;
|
|
19
|
+
}
|
|
20
|
+
/** Options for creating a CalendarHeatmap. */
|
|
21
|
+
export interface CalendarHeatmapOptions {
|
|
22
|
+
/** The dated values. */
|
|
23
|
+
data: CalendarDatum[];
|
|
24
|
+
/** First day shown. Default: the earliest date in the data. */
|
|
25
|
+
startDate?: string | Date;
|
|
26
|
+
/** Last day shown. Default: the latest date in the data. */
|
|
27
|
+
endDate?: string | Date;
|
|
28
|
+
/** Side length of a day cell. Default: 0.3 */
|
|
29
|
+
cellSize?: number;
|
|
30
|
+
/** Gap between cells. Default: 0.06 */
|
|
31
|
+
cellGap?: number;
|
|
32
|
+
/** Color palette mapped across the value domain. Default: GitHub greens */
|
|
33
|
+
palette?: readonly string[];
|
|
34
|
+
/** Value domain [min, max] mapped across the palette. Auto-computed if omitted. */
|
|
35
|
+
domain?: [number, number];
|
|
36
|
+
/** Blend the palette in perceptually-uniform Oklab space. Default: false */
|
|
37
|
+
useOklab?: boolean;
|
|
38
|
+
/** First weekday of a column: 0 = Sunday (GitHub), 1 = Monday. Default: 0 */
|
|
39
|
+
weekStartsOn?: 0 | 1;
|
|
40
|
+
/** Color for days with no datum. Default: '#ebedf0' */
|
|
41
|
+
emptyColor?: string;
|
|
42
|
+
/** Draw month labels above the grid. Default: true */
|
|
43
|
+
showMonthLabels?: boolean;
|
|
44
|
+
/** Font size for month labels. Default: 16 */
|
|
45
|
+
monthLabelFontSize?: number;
|
|
46
|
+
/** Color for labels. Default: white */
|
|
47
|
+
labelColor?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* CalendarHeatmap - a GitHub-style grid of day cells colored by value.
|
|
51
|
+
*
|
|
52
|
+
* Weeks run as columns and weekdays as rows. Each day is a colored square;
|
|
53
|
+
* days with a value are colored through the palette, and days with no datum
|
|
54
|
+
* take the empty color. Month labels sit above the columns where a month
|
|
55
|
+
* begins.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const cal = new CalendarHeatmap({
|
|
60
|
+
* data: [
|
|
61
|
+
* { date: '2024-01-01', value: 3 },
|
|
62
|
+
* { date: '2024-01-02', value: 7 },
|
|
63
|
+
* ],
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare class CalendarHeatmap extends Group {
|
|
68
|
+
/** The day cells. */
|
|
69
|
+
cells: VGroup;
|
|
70
|
+
/** The month labels. */
|
|
71
|
+
monthLabels: VGroup;
|
|
72
|
+
protected _cellSize: number;
|
|
73
|
+
protected _cellGap: number;
|
|
74
|
+
protected _palette: readonly string[];
|
|
75
|
+
protected _domain: [number, number];
|
|
76
|
+
protected _useOklab: boolean;
|
|
77
|
+
protected _weekStartsOn: 0 | 1;
|
|
78
|
+
protected _emptyColor: string;
|
|
79
|
+
protected _labelColor: string;
|
|
80
|
+
protected _values: Map<string, number>;
|
|
81
|
+
protected _startTs: number;
|
|
82
|
+
protected _endTs: number;
|
|
83
|
+
/** Cell rectangle by day key. */
|
|
84
|
+
protected _cellByKey: Map<string, Rectangle>;
|
|
85
|
+
/** Grid position by day key. */
|
|
86
|
+
protected _posByKey: Map<string, CellPosition>;
|
|
87
|
+
constructor(options: CalendarHeatmapOptions);
|
|
88
|
+
private _autoDomain;
|
|
89
|
+
/** The first column's start day, snapped back to the week's first weekday. */
|
|
90
|
+
private _resolveBounds;
|
|
91
|
+
/** The weekday row (0..6) of a day, honoring weekStartsOn. */
|
|
92
|
+
private _weekdayOf;
|
|
93
|
+
/** The grid position of a day timestamp. */
|
|
94
|
+
private _positionOf;
|
|
95
|
+
/** The cell center in local space for a grid position. */
|
|
96
|
+
private _centerOf;
|
|
97
|
+
private _createCells;
|
|
98
|
+
private _createMonthLabels;
|
|
99
|
+
/** The value domain [min, max] mapped across the palette. */
|
|
100
|
+
getDomain(): [number, number];
|
|
101
|
+
/** The number of day cells drawn. */
|
|
102
|
+
getNumCells(): number;
|
|
103
|
+
/** The cell rectangle for a date, or undefined when outside the range. */
|
|
104
|
+
getCell(date: string | Date): Rectangle | undefined;
|
|
105
|
+
/** The grid position (week, weekday) of a date. */
|
|
106
|
+
cellPosition(date: string | Date): CellPosition;
|
|
107
|
+
/** The color the map assigns to a value. */
|
|
108
|
+
colorForValue(value: number): string;
|
|
109
|
+
copy(): CalendarHeatmap;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=CalendarHeatmap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarHeatmap.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/CalendarHeatmap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKlD,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAiD,CAAC;AAE7F,6CAA6C;AAC7C,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,qCAAq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IAAI,IAAI,eAAe;CAmBjC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { VGroup } from '../../core/VGroup';
|
|
2
|
+
import { VMobject } from '../../core/VMobject';
|
|
3
|
+
import { AnnularSector } from '../geometry/AnnularSector';
|
|
4
|
+
import { ChordFlow, ChordGroupArc, ChordLayout, ChordRibbonSpan } from './chordLayout';
|
|
5
|
+
/**
|
|
6
|
+
* A single group arc of a {@link ChordDiagram}.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ChordArc extends AnnularSector {
|
|
9
|
+
/** Group index. */
|
|
10
|
+
readonly groupIndex: number;
|
|
11
|
+
/** Total flow of the group. */
|
|
12
|
+
readonly total: number;
|
|
13
|
+
constructor(options: ConstructorParameters<typeof AnnularSector>[0] & {
|
|
14
|
+
groupIndex: number;
|
|
15
|
+
total: number;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A single flow ribbon of a {@link ChordDiagram}.
|
|
20
|
+
*
|
|
21
|
+
* The ribbon is a closed filled VMobject: an arc along the source span, a
|
|
22
|
+
* bezier through the center to the target span, an arc along it, and a bezier
|
|
23
|
+
* back. The source and target span angles are proportional to the flow values.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ChordRibbon extends VMobject {
|
|
26
|
+
/** Source group index. */
|
|
27
|
+
readonly source: number;
|
|
28
|
+
/** Target group index. */
|
|
29
|
+
readonly target: number;
|
|
30
|
+
/** Flow on the source side. */
|
|
31
|
+
readonly sourceValue: number;
|
|
32
|
+
/** Flow on the target side. */
|
|
33
|
+
readonly targetValue: number;
|
|
34
|
+
private readonly _sourceSpanAngle;
|
|
35
|
+
private readonly _targetSpanAngle;
|
|
36
|
+
constructor(span: ChordRibbonSpan, radius: number, color: string, fillOpacity: number);
|
|
37
|
+
/** Angular width of the source span, proportional to {@link sourceValue}. */
|
|
38
|
+
getSourceSpanAngle(): number;
|
|
39
|
+
/** Angular width of the target span, proportional to {@link targetValue}. */
|
|
40
|
+
getTargetSpanAngle(): number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Options for {@link ChordDiagram}.
|
|
44
|
+
*/
|
|
45
|
+
export interface ChordDiagramOptions {
|
|
46
|
+
/** Square flow matrix. `matrix[i][j]` is the flow from group i to group j. */
|
|
47
|
+
matrix?: number[][];
|
|
48
|
+
/** Link-list input, used with `groupCount` when `matrix` is omitted. */
|
|
49
|
+
flows?: ChordFlow[];
|
|
50
|
+
/** Number of groups, required with `flows`. */
|
|
51
|
+
groupCount?: number;
|
|
52
|
+
/** Group labels, by index. Default: []. */
|
|
53
|
+
labels?: string[];
|
|
54
|
+
/** Inner radius of the ring (ribbons are drawn inside it). Default: 2.5. */
|
|
55
|
+
radius?: number;
|
|
56
|
+
/** Thickness of the group ring. Default: 0.25. */
|
|
57
|
+
ringWidth?: number;
|
|
58
|
+
/** Angular gap between groups, in radians. Default: 0.05. */
|
|
59
|
+
gap?: number;
|
|
60
|
+
/** Angle of the first group's start edge, in radians. Default: Math.PI / 2. */
|
|
61
|
+
startAngle?: number;
|
|
62
|
+
/** Group colors. Single color applies to all, array cycles. Default: Manim palette. */
|
|
63
|
+
colors?: string | string[];
|
|
64
|
+
/** Fill opacity of the group arcs. Default: 1. */
|
|
65
|
+
arcOpacity?: number;
|
|
66
|
+
/** Fill opacity of the ribbons. Default: 0.6. */
|
|
67
|
+
ribbonOpacity?: number;
|
|
68
|
+
/** Whether to draw group labels. Default: true when labels are given. */
|
|
69
|
+
showLabels?: boolean;
|
|
70
|
+
/** Font size for group labels. Default: 20. */
|
|
71
|
+
labelFontSize?: number;
|
|
72
|
+
/** Gap between the ring and a label. Default: 0.3. */
|
|
73
|
+
labelBuff?: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* ChordDiagram - arcs around a circle linked by proportional ribbons.
|
|
77
|
+
*
|
|
78
|
+
* Each group becomes an {@link ChordArc} whose angle is proportional to the
|
|
79
|
+
* group's total flow. Each non-zero flow pair becomes a {@link ChordRibbon}
|
|
80
|
+
* whose span angles are proportional to the flow values. Empty, single-group,
|
|
81
|
+
* and zero-value inputs produce no error.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const chord = new ChordDiagram({
|
|
86
|
+
* matrix: [
|
|
87
|
+
* [0, 3, 1],
|
|
88
|
+
* [3, 0, 2],
|
|
89
|
+
* [1, 2, 0],
|
|
90
|
+
* ],
|
|
91
|
+
* labels: ['A', 'B', 'C'],
|
|
92
|
+
* });
|
|
93
|
+
* chord.getArc(0); // the first group arc
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare class ChordDiagram extends VGroup {
|
|
97
|
+
/** The group arcs. */
|
|
98
|
+
arcs: VGroup;
|
|
99
|
+
/** The flow ribbons. */
|
|
100
|
+
chords: VGroup;
|
|
101
|
+
/** The group labels. */
|
|
102
|
+
labelGroup: VGroup;
|
|
103
|
+
protected _options: ChordDiagramOptions;
|
|
104
|
+
protected _layout: ChordLayout;
|
|
105
|
+
protected _arcs: ChordArc[];
|
|
106
|
+
protected _chords: ChordRibbon[];
|
|
107
|
+
constructor(options: ChordDiagramOptions);
|
|
108
|
+
/** Build a label for each group at its mid-angle, outside the ring. */
|
|
109
|
+
protected _buildLabels(groups: ChordGroupArc[], labels: string[], labelRadius: number, fontSize: number): void;
|
|
110
|
+
/** All group arcs, in group order. */
|
|
111
|
+
getArcs(): ChordArc[];
|
|
112
|
+
/** The arc for a group index, or undefined when out of range. */
|
|
113
|
+
getArc(index: number): ChordArc | undefined;
|
|
114
|
+
/** All flow ribbons, in layout order. */
|
|
115
|
+
getChords(): ChordRibbon[];
|
|
116
|
+
/** The ribbon at the given index, or undefined when out of range. */
|
|
117
|
+
getChord(index: number): ChordRibbon | undefined;
|
|
118
|
+
/** The computed layout (arcs and ribbon spans). */
|
|
119
|
+
getLayout(): ChordLayout;
|
|
120
|
+
copy(): ChordDiagram;
|
|
121
|
+
}
|
|
122
|
+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OAAO,EAAE,WAAW,EAAE,CAAM;gBAE1B,OAAO,EAAE,mBAAmB;IAgExC,uEAAuE;IACvE,SAAS,CAAC,YAAY,CACpB,MAAM,EAAE,aAAa,EAAE,EACvB,MAAM,EAAE,MAAM,EAAE,EAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,IAAI;IAYP,sCAAsC;IACtC,OAAO,IAAI,QAAQ,EAAE;IAIrB,iEAAiE;IACjE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAI3C,yCAAyC;IACzC,SAAS,IAAI,WAAW,EAAE;IAI1B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIhD,mDAAmD;IACnD,SAAS,IAAI,WAAW;IAQf,IAAI,IAAI,YAAY;CAK9B"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { VGroup } from '../../core/VGroup';
|
|
2
|
+
import { VMobject } from '../../core/VMobject';
|
|
3
|
+
import { Rectangle } from '../geometry/Rectangle';
|
|
4
|
+
import { Line } from '../geometry/Line';
|
|
5
|
+
import { GanttTaskSpec } from './ganttLayout';
|
|
6
|
+
/** A time value, given either as a number or a Date. */
|
|
7
|
+
export type GanttTimeValue = number | Date;
|
|
8
|
+
/**
|
|
9
|
+
* One task on the timeline.
|
|
10
|
+
*/
|
|
11
|
+
export interface GanttTask {
|
|
12
|
+
/** Unique task name, used for labels and as a dependency reference. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Start of the task (number or Date). */
|
|
15
|
+
start: GanttTimeValue;
|
|
16
|
+
/** End of the task (number or Date). */
|
|
17
|
+
end: GanttTimeValue;
|
|
18
|
+
/** Row key. Tasks that share a key share a row. Default: the task name. */
|
|
19
|
+
row?: string;
|
|
20
|
+
/** Explicit bar color. Default: cycled from the palette by row. */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Names of tasks this task depends on (for dependency arrows). */
|
|
23
|
+
dependencies?: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Options for creating a GanttChart.
|
|
27
|
+
*/
|
|
28
|
+
export interface GanttChartOptions {
|
|
29
|
+
/** Tasks to render, top to bottom in row order. */
|
|
30
|
+
tasks: GanttTask[];
|
|
31
|
+
/** Visual width of the time axis. Default: 8 */
|
|
32
|
+
width?: number;
|
|
33
|
+
/** Height of each task bar. Default: 0.4 */
|
|
34
|
+
rowHeight?: number;
|
|
35
|
+
/** Vertical gap between rows. Default: 0.2 */
|
|
36
|
+
rowGap?: number;
|
|
37
|
+
/** Bar colors. Single color applies to all, array cycles by row. Default: palette. */
|
|
38
|
+
barColors?: string | readonly string[];
|
|
39
|
+
/** Fill opacity of the bars. Default: 0.9 */
|
|
40
|
+
barFillOpacity?: number;
|
|
41
|
+
/** Stroke width of the bar outline. Default: 1.5 */
|
|
42
|
+
barStrokeWidth?: number;
|
|
43
|
+
/** Color for the axis, ticks and labels. Default: WHITE */
|
|
44
|
+
axisColor?: string;
|
|
45
|
+
/** Whether to draw the time axis line and ticks. Default: true */
|
|
46
|
+
showTimeAxis?: boolean;
|
|
47
|
+
/** Explicit tick values on the time axis (overrides timeTickCount). */
|
|
48
|
+
timeTicks?: GanttTimeValue[];
|
|
49
|
+
/** Number of evenly spaced ticks when timeTicks is not given. Default: 5 */
|
|
50
|
+
timeTickCount?: number;
|
|
51
|
+
/** Formatter for a tick value. Default: ISO date for Date input, else the number. */
|
|
52
|
+
formatTime?: (value: number) => string;
|
|
53
|
+
/** Font size for the time-axis labels. Default: 18 */
|
|
54
|
+
timeLabelFontSize?: number;
|
|
55
|
+
/** Whether to draw the per-row task labels. Default: true */
|
|
56
|
+
showLabels?: boolean;
|
|
57
|
+
/** Font size for the task labels. Default: 18 */
|
|
58
|
+
labelFontSize?: number;
|
|
59
|
+
/** Whether to draw dependency arrows between tasks. Default: false */
|
|
60
|
+
showDependencies?: boolean;
|
|
61
|
+
/** Color for the dependency arrows. Default: WHITE */
|
|
62
|
+
dependencyColor?: string;
|
|
63
|
+
/** Stroke width of the dependency arrows. Default: 2 */
|
|
64
|
+
dependencyStrokeWidth?: number;
|
|
65
|
+
/** Optional "today" marker position (number or Date). */
|
|
66
|
+
today?: GanttTimeValue;
|
|
67
|
+
/** Color for the today marker. Default: RED */
|
|
68
|
+
todayColor?: string;
|
|
69
|
+
/** Stroke width of the today marker. Default: 2 */
|
|
70
|
+
todayStrokeWidth?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* GanttChart - A project-timeline chart mobject.
|
|
74
|
+
*
|
|
75
|
+
* Each task is a horizontal bar that spans its start to its end on a shared time
|
|
76
|
+
* x-axis. Each task sits on one row. Tasks that share a `row` key share a row and
|
|
77
|
+
* may overlap. Optional dependency arrows point from a predecessor's end to a
|
|
78
|
+
* dependent task's start. An optional "today" marker draws a vertical line.
|
|
79
|
+
*
|
|
80
|
+
* Time values are numbers or Dates; a Date is read through getTime(). A task
|
|
81
|
+
* whose end is at or before its start keeps a minimum-width bar anchored at its
|
|
82
|
+
* start, so the bar count always equals the task count.
|
|
83
|
+
*
|
|
84
|
+
* The chart is a VGroup, so Create and FadeIn animate it directly.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const chart = new GanttChart({
|
|
89
|
+
* tasks: [
|
|
90
|
+
* { name: 'Design', start: 0, end: 3 },
|
|
91
|
+
* { name: 'Build', start: 3, end: 8, dependencies: ['Design'] },
|
|
92
|
+
* ],
|
|
93
|
+
* showDependencies: true,
|
|
94
|
+
* today: 5,
|
|
95
|
+
* });
|
|
96
|
+
* scene.play(new Create(chart));
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export declare class GanttChart extends VGroup {
|
|
100
|
+
/** The task bars, one per task, in task order. */
|
|
101
|
+
bars: VGroup;
|
|
102
|
+
/** The per-row task labels. */
|
|
103
|
+
taskLabels: VGroup;
|
|
104
|
+
/** The dependency arrows (empty unless showDependencies is set). */
|
|
105
|
+
dependencyArrows: VGroup;
|
|
106
|
+
/** The time axis line. */
|
|
107
|
+
timeAxis: VMobject;
|
|
108
|
+
/** The time-axis tick labels. */
|
|
109
|
+
timeLabels: VGroup;
|
|
110
|
+
/** The today marker, when a today value is given; otherwise null. */
|
|
111
|
+
todayMarker: Line | null;
|
|
112
|
+
protected _tasks: GanttTask[];
|
|
113
|
+
protected _width: number;
|
|
114
|
+
protected _rowHeight: number;
|
|
115
|
+
protected _rowGap: number;
|
|
116
|
+
protected _barColors: string[];
|
|
117
|
+
protected _barFillOpacity: number;
|
|
118
|
+
protected _barStrokeWidth: number;
|
|
119
|
+
protected _axisColor: string;
|
|
120
|
+
protected _showTimeAxis: boolean;
|
|
121
|
+
protected _timeTicks: number[] | null;
|
|
122
|
+
protected _timeTickCount: number;
|
|
123
|
+
protected _formatTime: (value: number) => string;
|
|
124
|
+
protected _timeLabelFontSize: number;
|
|
125
|
+
protected _showLabels: boolean;
|
|
126
|
+
protected _labelFontSize: number;
|
|
127
|
+
protected _showDependencies: boolean;
|
|
128
|
+
protected _dependencyColor: string;
|
|
129
|
+
protected _dependencyStrokeWidth: number;
|
|
130
|
+
protected _today: number | null;
|
|
131
|
+
protected _todayColor: string;
|
|
132
|
+
protected _todayStrokeWidth: number;
|
|
133
|
+
protected _specs: GanttTaskSpec[];
|
|
134
|
+
protected _rowKeys: string[];
|
|
135
|
+
protected _timeRange: [number, number];
|
|
136
|
+
protected _indexByName: Map<string, number>;
|
|
137
|
+
private _usesDates;
|
|
138
|
+
constructor(options: GanttChartOptions);
|
|
139
|
+
/** Default tick formatter: ISO date for Date input, else a trimmed number. */
|
|
140
|
+
private _defaultFormat;
|
|
141
|
+
/** Convert a time value to its x-coordinate on the time axis. */
|
|
142
|
+
valueToX(value: GanttTimeValue): number;
|
|
143
|
+
/** Y-coordinate of the center of row `rowIndex` (row 0 is topmost). */
|
|
144
|
+
rowCenterY(rowIndex: number): number;
|
|
145
|
+
/** Top y-coordinate of the chart area (above the top row). */
|
|
146
|
+
private _chartTop;
|
|
147
|
+
/** Create the horizontal time axis line below the bottom row. */
|
|
148
|
+
private _createTimeAxis;
|
|
149
|
+
/** Build one bar per task spec. */
|
|
150
|
+
private _createBars;
|
|
151
|
+
/** Build the time-axis tick labels. */
|
|
152
|
+
private _createTimeLabels;
|
|
153
|
+
/** The tick values along the time axis. */
|
|
154
|
+
private _tickValues;
|
|
155
|
+
/** Build one label per row, placed to the left of the chart. */
|
|
156
|
+
private _createTaskLabels;
|
|
157
|
+
/** Build an arrow from each dependency's end to the dependent task's start. */
|
|
158
|
+
private _createDependencyArrows;
|
|
159
|
+
/** Build the vertical today marker. */
|
|
160
|
+
private _createTodayMarker;
|
|
161
|
+
/** Get the group of task bars. */
|
|
162
|
+
getBars(): VGroup;
|
|
163
|
+
/** Get the bar for a task by name, or undefined when there is no such task. */
|
|
164
|
+
getBar(name: string): Rectangle | undefined;
|
|
165
|
+
/** Get the group of dependency arrows (empty unless showDependencies is set). */
|
|
166
|
+
getDependencyArrows(): VGroup;
|
|
167
|
+
/** Get the today marker, or null when no today value was given. */
|
|
168
|
+
getTodayMarker(): Line | null;
|
|
169
|
+
/** Get the time range as [min start, max end]. */
|
|
170
|
+
getTimeRange(): [number, number];
|
|
171
|
+
/** Get the number of rows. */
|
|
172
|
+
getRowCount(): number;
|
|
173
|
+
/** Get the task definitions. */
|
|
174
|
+
getTasks(): GanttTask[];
|
|
175
|
+
/** Get the visual width of the time axis. */
|
|
176
|
+
getChartWidth(): number;
|
|
177
|
+
copy(): GanttChart;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=GanttChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GanttChart.d.ts","sourceRoot":"","sources":["../../../src/mobjects/graphing/GanttChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE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