diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/README.md b/lib/node_modules/@stdlib/plot/vega/title/ctor/README.md
index 36509ae8e2f5..cc35424efd80 100644
--- a/lib/node_modules/@stdlib/plot/vega/title/ctor/README.md
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/README.md
@@ -26,6 +26,8 @@ limitations under the License.
+A title configuration defines the text label placed along the edge of a chart. It supports a primary title and an optional subtitle, along with extensive styling options such as font, color, alignment, and orientation.
+
@@ -47,51 +49,58 @@ Returns a title instance.
```javascript
var title = new Title();
// returns
-```
-
-The constructor accepts the following `options`:
-
-- **align**: horizontal text alignment of the title and subtitle
-- **anchor**: anchor position for placing the title and subtitle Default: `'middle'`.
-- **angle**: angle (in degrees) of the title and subtitle text
-- **aria**: boolean indicating whether ARIA attributes should be included in SVG output Default: `true`.
-- **baseline**: vertical baseline of the title and subtitle text
-- **color**: color of the title text
-- **dx**: horizontal offset (in pixels) added to the title and subtitle x-coordinate
-- **dy**: vertical offset (in pixels) added to the title and subtitle y-coordinate
-- **encode**: mark encodings for custom title styling
-- **font**: font name of the title text
-- **fontSize**: font size of the title text
-- **fontStyle**: font style of the title text
-- **fontWeight**: font weight of the title text
-- **frame**: reference frame for the anchor position Default: `'bounds'`.
-- **limit**: maximum allowed length (in pixels) of title and subtitle text
-- **lineHeight**: line height for multi-line title text
-- **offset**: orthogonal offset (in pixels) by which to displace the title from its position along the edge of the chart
-- **orient**: title orientation Default: `'top'`.
-- **subtitle**: subtitle text
-- **subtitleColor**: color of the subtitle text
-- **subtitleFont**: font name for the subtitle text
-- **subtitleFontSize**: font size for the subtitle text
-- **subtitleFontStyle**: font style for the subtitle text
-- **subtitleFontWeight**: font weight for the subtitle text
-- **subtitleLineHeight**: line height for multi-line subtitle text
-- **subtitlePadding**: padding (in pixels) between title and subtitle text
-- **text**: title text Default: `[]`.
-- **zindex**: integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups Default: `0`.
-```javascript
-var title = new Title({
- 'text': 'Beep boop',
- 'anchor': 'start',
- 'orient': 'bottom'
+title = new Title({
+ 'text': 'Monthly Revenue',
+ 'subtitle': 'Fiscal Year 2025',
+ 'anchor': 'middle',
+ 'fontSize': 18,
+ 'subtitleFontSize': 13,
+ 'subtitleColor': '#888'
});
// returns
-
-var v = title.text;
-// returns [ 'Beep boop' ]
```
+
+
+
+
+
+
+
+
+
+The constructor accepts the following options:
+
+- **align**: horizontal text alignment of the title and subtitle.
+- **anchor**: anchor position for placing the title and subtitle. Default: `'middle'`.
+- **angle**: angle (in degrees) of the title and subtitle text.
+- **aria**: boolean indicating whether ARIA attributes should be included in SVG output. Default: `true`.
+- **baseline**: vertical baseline of the title and subtitle text.
+- **color**: color of the title text.
+- **dx**: horizontal offset (in pixels) added to the title and subtitle x-coordinate.
+- **dy**: vertical offset (in pixels) added to the title and subtitle y-coordinate.
+- **encode**: mark encodings for custom title styling.
+- **font**: font name of the title text.
+- **fontSize**: font size of the title text.
+- **fontStyle**: font style of the title text.
+- **fontWeight**: font weight of the title text.
+- **frame**: reference frame for the anchor position. Default: `'bounds'`.
+- **limit**: maximum allowed length (in pixels) of title and subtitle text.
+- **lineHeight**: line height for multi-line title text.
+- **offset**: orthogonal offset (in pixels) by which to displace the title from its position along the edge of the chart.
+- **orient**: title orientation. Default: `'top'`.
+- **subtitle**: subtitle text.
+- **subtitleColor**: color of the subtitle text.
+- **subtitleFont**: font name for the subtitle text.
+- **subtitleFontSize**: font size for the subtitle text.
+- **subtitleFontStyle**: font style for the subtitle text.
+- **subtitleFontWeight**: font weight for the subtitle text.
+- **subtitleLineHeight**: line height for multi-line subtitle text.
+- **subtitlePadding**: padding (in pixels) between title and subtitle text.
+- **text**: title text. Default: `[]`.
+- **zindex**: integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups. Default: `0`.
+
* * *
### Writable Properties
@@ -103,16 +112,42 @@ var v = title.text;
Horizontal text alignment of the title and subtitle.
```javascript
-var title = new Title();
-
-// Set:
-title.align = 'left';
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'left title alignment',
+ 'subtitleFontStyle': 'italic',
+ 'subtitleFontSize': 12,
+ 'align': 'left',
+ 'fontSize': 16
+});
-// Get:
var v = title.align;
// returns 'left'
+
+title.align = 'center';
+
+v = title.align;
+// returns 'center'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.anchor
@@ -120,16 +155,53 @@ var v = title.align;
Anchor position for placing the title and subtitle. Default: `'middle'`.
```javascript
-var title = new Title();
-
-// Set:
-title.anchor = 'start';
+var title = new Title({
+ 'text': 'anchor: start',
+ 'anchor': 'start',
+ 'fontSize': 16
+});
-// Get:
var v = title.anchor;
// returns 'start'
+
+title.anchor = 'middle';
+
+v = title.anchor;
+// returns 'middle'
+
+title.anchor = 'end';
+
+v = title.anchor;
+// returns 'end'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.angle
@@ -137,16 +209,39 @@ var v = title.anchor;
Angle (in degrees) of the title and subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.angle = 90;
+var title = new Title({
+ 'text': 'Title Text',
+ 'angle': 0,
+ 'fontSize': 16
+});
-// Get:
var v = title.angle;
-// returns 90
+// returns 0
+
+title.angle = 180;
+
+v = title.angle;
+// returns 180
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.aria
@@ -156,11 +251,12 @@ Boolean indicating whether ARIA attributes should be included in SVG output. Def
```javascript
var title = new Title();
-// Set:
+var v = title.aria;
+// returns true
+
title.aria = false;
-// Get:
-var v = title.aria;
+v = title.aria;
// returns false
```
@@ -171,16 +267,39 @@ var v = title.aria;
Vertical baseline of the title and subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.baseline = 'top';
+var title = new Title({
+ 'text': 'baseline: top',
+ 'baseline': 'top',
+ 'fontSize': 16
+});
-// Get:
var v = title.baseline;
// returns 'top'
+
+title.baseline = 'bottom';
+
+v = title.baseline;
+// returns 'bottom'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.color
@@ -188,16 +307,39 @@ var v = title.baseline;
Color of the title text.
```javascript
-var title = new Title();
-
-// Set:
-title.color = 'steelblue';
+var title = new Title({
+ 'text': 'Title Text',
+ 'color': 'steelblue',
+ 'fontSize': 16
+});
-// Get:
var v = title.color;
// returns 'steelblue'
+
+title.color = '#e74c3c';
+
+v = title.color;
+// returns '#e74c3c'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.dx
@@ -205,16 +347,40 @@ var v = title.color;
Horizontal offset (in pixels) added to the title and subtitle x-coordinate.
```javascript
-var title = new Title();
-
-// Set:
-title.dx = 2;
+var title = new Title({
+ 'text': 'dx: 0',
+ 'dx': 0,
+ 'anchor': 'start',
+ 'fontSize': 16
+});
-// Get:
var v = title.dx;
-// returns 2
+// returns 0
+
+title.dx = 100;
+
+v = title.dx;
+// returns 100
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.dy
@@ -222,16 +388,39 @@ var v = title.dx;
Vertical offset (in pixels) added to the title and subtitle y-coordinate.
```javascript
-var title = new Title();
-
-// Set:
-title.dy = 2;
+var title = new Title({
+ 'text': 'dy: 0',
+ 'dy': 0,
+ 'fontSize': 16
+});
-// Get:
var v = title.dy;
-// returns 2
+// returns 0
+
+title.dy = 100;
+
+v = title.dy;
+// returns 100
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.encode
@@ -241,7 +430,9 @@ Mark encodings for custom title styling.
```javascript
var title = new Title();
-// Set:
+var v = title.encode;
+// returns undefined
+
title.encode = {
'title': {
'enter': {
@@ -252,8 +443,7 @@ title.encode = {
}
};
-// Get:
-var v = title.encode;
+v = title.encode;
// returns {...}
```
@@ -264,16 +454,39 @@ var v = title.encode;
Font name of the title text.
```javascript
-var title = new Title();
-
-// Set:
-title.font = 'Arial';
+var title = new Title({
+ 'text': 'Serif Font Title',
+ 'font': 'serif',
+ 'fontSize': 16
+});
-// Get:
var v = title.font;
-// returns 'Arial'
+// returns 'serif'
+
+title.font = 'monospace';
+
+v = title.font;
+// returns 'monospace'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.fontSize
@@ -281,16 +494,52 @@ var v = title.font;
Font size of the title text.
```javascript
-var title = new Title();
-
-// Set:
-title.fontSize = 12;
+var title = new Title({
+ 'text': 'fontSize: 12',
+ 'fontSize': 12
+});
-// Get:
var v = title.fontSize;
// returns 12
+
+title.fontSize = 20;
+
+v = title.fontSize;
+// returns 20
+
+title.fontSize = 28;
+
+v = title.fontSize;
+// returns 28
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.fontStyle
@@ -298,16 +547,39 @@ var v = title.fontSize;
Font style of the title text.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'Normal Style Title',
+ 'fontStyle': 'normal',
+ 'fontSize': 16
+});
+
+var v = title.fontStyle;
+// returns 'normal'
-// Set:
title.fontStyle = 'italic';
-// Get:
-var v = title.fontStyle;
+v = title.fontStyle;
// returns 'italic'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.fontWeight
@@ -315,16 +587,39 @@ var v = title.fontStyle;
Font weight of the title text.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'Normal Weight Title',
+ 'fontWeight': 'normal',
+ 'fontSize': 16
+});
+
+var v = title.fontWeight;
+// returns 'normal'
-// Set:
title.fontWeight = 'bold';
-// Get:
-var v = title.fontWeight;
+v = title.fontWeight;
// returns 'bold'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.frame
@@ -332,16 +627,40 @@ var v = title.fontWeight;
Reference frame for the anchor position. Default: `'bounds'`.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'frame: bounds',
+ 'frame': 'bounds',
+ 'anchor': 'start',
+ 'fontSize': 16
+});
+
+var v = title.frame;
+// returns 'bounds'
-// Set:
title.frame = 'group';
-// Get:
-var v = title.frame;
+v = title.frame;
// returns 'group'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.limit
@@ -349,16 +668,38 @@ var v = title.frame;
Maximum allowed length (in pixels) of title and subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.limit = 100;
+var title = new Title({
+ 'text': 'A Very Long Title That Shows Without Limit',
+ 'fontSize': 16
+});
-// Get:
var v = title.limit;
-// returns 100
+// returns undefined
+
+title.limit = 200;
+
+v = title.limit;
+// returns 200
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.lineHeight
@@ -366,16 +707,39 @@ var v = title.limit;
Line height for multi-line title text.
```javascript
-var title = new Title();
-
-// Set:
-title.lineHeight = 2;
+var title = new Title({
+ 'text': [ 'First Line', 'Second Line' ],
+ 'lineHeight': 20,
+ 'fontSize': 16
+});
-// Get:
var v = title.lineHeight;
-// returns 2
+// returns 20
+
+title.lineHeight = 40;
+
+v = title.lineHeight;
+// returns 40
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.offset
@@ -383,16 +747,39 @@ var v = title.lineHeight;
Orthogonal offset (in pixels) by which to displace the title from its position along the edge of the chart.
```javascript
-var title = new Title();
-
-// Set:
-title.offset = 12;
+var title = new Title({
+ 'text': 'offset: 0',
+ 'offset': 0,
+ 'fontSize': 16
+});
-// Get:
var v = title.offset;
-// returns 12
+// returns 0
+
+title.offset = 30;
+
+v = title.offset;
+// returns 30
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.orient
@@ -400,16 +787,39 @@ var v = title.offset;
Title orientation. Default: `'top'`.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'orient: top',
+ 'orient': 'top',
+ 'fontSize': 16
+});
+
+var v = title.orient;
+// returns 'top'
-// Set:
title.orient = 'bottom';
-// Get:
-var v = title.orient;
+v = title.orient;
// returns 'bottom'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitle
@@ -417,16 +827,30 @@ var v = title.orient;
Subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitle = 'foo bar';
+var title = new Title({
+ 'text': 'Title Text',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
-// Get:
var v = title.subtitle;
-// returns [ 'foo bar' ]
+// returns undefined
+
+title.subtitle = 'This is the subtitle text';
+
+v = title.subtitle;
+// returns [ 'This is the subtitle text' ]
```
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleColor
@@ -434,16 +858,31 @@ var v = title.subtitle;
Color of the subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitleColor = 'steelblue';
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'This is the subtitle text',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
-// Get:
var v = title.subtitleColor;
-// returns 'steelblue'
+// returns undefined
+
+title.subtitleColor = '#3498db';
+
+v = title.subtitleColor;
+// returns '#3498db'
```
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleFont
@@ -451,16 +890,41 @@ var v = title.subtitleColor;
Font name for the subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitleFont = 'Arial';
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'Subtitle in serif font',
+ 'subtitleFont': 'serif',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
-// Get:
var v = title.subtitleFont;
-// returns 'Arial'
+// returns 'serif'
+
+title.subtitleFont = 'monospace';
+
+v = title.subtitleFont;
+// returns 'monospace'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleFontSize
@@ -468,16 +932,40 @@ var v = title.subtitleFont;
Font size for the subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitleFontSize = 14;
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'subtitleFontSize: 10',
+ 'subtitleFontSize': 10,
+ 'fontSize': 16
+});
-// Get:
var v = title.subtitleFontSize;
-// returns 14
+// returns 10
+
+title.subtitleFontSize = 18;
+
+v = title.subtitleFontSize;
+// returns 18
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleFontStyle
@@ -485,16 +973,41 @@ var v = title.subtitleFontSize;
Font style for the subtitle text.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'Normal style subtitle',
+ 'subtitleFontStyle': 'normal',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
+
+var v = title.subtitleFontStyle;
+// returns 'normal'
-// Set:
title.subtitleFontStyle = 'italic';
-// Get:
-var v = title.subtitleFontStyle;
+v = title.subtitleFontStyle;
// returns 'italic'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleFontWeight
@@ -502,16 +1015,41 @@ var v = title.subtitleFontStyle;
Font weight for the subtitle text.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'Normal weight subtitle',
+ 'subtitleFontWeight': 'normal',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
+
+var v = title.subtitleFontWeight;
+// returns 'normal'
-// Set:
title.subtitleFontWeight = 'bold';
-// Get:
-var v = title.subtitleFontWeight;
+v = title.subtitleFontWeight;
// returns 'bold'
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitleLineHeight
@@ -519,16 +1057,41 @@ var v = title.subtitleFontWeight;
Line height for multi-line subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitleLineHeight = 16;
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': [ 'First subtitle line', 'Second subtitle line' ],
+ 'subtitleLineHeight': 10,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
-// Get:
var v = title.subtitleLineHeight;
-// returns 16
+// returns 10
+
+title.subtitleLineHeight = 30;
+
+v = title.subtitleLineHeight;
+// returns 30
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.subtitlePadding
@@ -536,16 +1099,41 @@ var v = title.subtitleLineHeight;
Padding (in pixels) between title and subtitle text.
```javascript
-var title = new Title();
-
-// Set:
-title.subtitlePadding = 24;
+var title = new Title({
+ 'text': 'Title Text',
+ 'subtitle': 'subtitlePadding: 0',
+ 'subtitlePadding': 0,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+});
-// Get:
var v = title.subtitlePadding;
-// returns 24
+// returns 0
+
+title.subtitlePadding = 20;
+
+v = title.subtitlePadding;
+// returns 20
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### Title.prototype.text
@@ -553,16 +1141,28 @@ var v = title.subtitlePadding;
Title text. Default: `[]`.
```javascript
-var title = new Title();
-
-// Set:
-title.text = 'Beep boop';
+var title = new Title({
+ 'fontSize': 16
+});
-// Get:
var v = title.text;
-// returns [ 'Beep boop' ]
+// returns []
+
+title.text = 'Title Text';
+
+v = title.text;
+// returns [ 'Title Text' ]
```
+
+
+
+
+
+
+
+
+
#### Title.prototype.zindex
@@ -570,16 +1170,40 @@ var v = title.text;
Integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups. Default: `0`.
```javascript
-var title = new Title();
+var title = new Title({
+ 'text': 'Title Text (zindex: 0)',
+ 'zindex': 0,
+ 'fontSize': 16,
+ 'dy': 15
+});
+
+var v = title.zindex;
+// returns 0
-// Set:
title.zindex = 2;
-// Get:
-var v = title.zindex;
+v = title.zindex;
// returns 2
```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
* * *
### Read-only Properties
@@ -605,7 +1229,7 @@ var v = title.properties;
#### Title.prototype.toJSON()
-Serializes a title instance to a JSON object.
+Serializes a title instance to a JSON representation.
```javascript
var title = new Title({
@@ -623,7 +1247,7 @@ var title = new Title({
'text': 'Beep boop'
});
-var str = JSON.stringify( title );
+var v = JSON.stringify( title );
// returns '{"aria":true,"anchor":"middle","frame":"bounds","orient":"top","text":["Beep boop"],"zindex":0}'
```
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title.svg
new file mode 100644
index 000000000000..991cca18edc1
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_center.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_center.svg
new file mode 100644
index 000000000000..15d64d5301d5
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_center.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_left.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_left.svg
new file mode 100644
index 000000000000..89e9221cea72
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_align_left.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_end.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_end.svg
new file mode 100644
index 000000000000..14d1dc311174
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_end.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_middle.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_middle.svg
new file mode 100644
index 000000000000..8fab7cb5734d
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_middle.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_start.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_start.svg
new file mode 100644
index 000000000000..a55b03e0cfa1
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_anchor_start.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_0.svg
new file mode 100644
index 000000000000..a3870a5c88f6
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_180.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_180.svg
new file mode 100644
index 000000000000..9600a2b9662f
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_angle_180.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_bottom.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_bottom.svg
new file mode 100644
index 000000000000..5411818cdfc9
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_bottom.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_top.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_top.svg
new file mode 100644
index 000000000000..1a8a82ab3682
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_baseline_top.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_red.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_red.svg
new file mode 100644
index 000000000000..3dff5d1a2260
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_red.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_steelblue.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_steelblue.svg
new file mode 100644
index 000000000000..3db5c297a476
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_color_steelblue.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_0.svg
new file mode 100644
index 000000000000..94e58f8f8d95
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_100.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_100.svg
new file mode 100644
index 000000000000..b1245d016adc
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dx_100.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_0.svg
new file mode 100644
index 000000000000..2dfb0f3ce191
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_100.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_100.svg
new file mode 100644
index 000000000000..105425784aaf
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_dy_100.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_monospace.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_monospace.svg
new file mode 100644
index 000000000000..c79744e3a2d4
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_monospace.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_serif.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_serif.svg
new file mode 100644
index 000000000000..9d1607c6576c
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_font_serif.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_12.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_12.svg
new file mode 100644
index 000000000000..cf719b687454
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_12.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_20.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_20.svg
new file mode 100644
index 000000000000..1386770be2d9
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_20.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_28.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_28.svg
new file mode 100644
index 000000000000..29b6ec1779c8
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontsize_28.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_italic.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_italic.svg
new file mode 100644
index 000000000000..5e30fe06b9aa
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_italic.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_normal.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_normal.svg
new file mode 100644
index 000000000000..696e4f8b803d
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontstyle_normal.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_bold.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_bold.svg
new file mode 100644
index 000000000000..a33adeeaced1
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_bold.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_normal.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_normal.svg
new file mode 100644
index 000000000000..276504d7fc6a
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_fontweight_normal.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_bounds.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_bounds.svg
new file mode 100644
index 000000000000..9c5b7dd83b4d
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_bounds.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_group.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_group.svg
new file mode 100644
index 000000000000..afc76f7549ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_frame_group.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_200.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_200.svg
new file mode 100644
index 000000000000..a7e9b376e7cc
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_200.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_none.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_none.svg
new file mode 100644
index 000000000000..7c018e43d9f6
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_limit_none.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_20.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_20.svg
new file mode 100644
index 000000000000..aad25962b345
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_20.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_40.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_40.svg
new file mode 100644
index 000000000000..41fa976bf720
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_lineheight_40.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_0.svg
new file mode 100644
index 000000000000..02425234b4b4
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_30.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_30.svg
new file mode 100644
index 000000000000..cfebfba1e5b7
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_offset_30.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_bottom.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_bottom.svg
new file mode 100644
index 000000000000..4ba72e1564d3
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_bottom.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_top.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_top.svg
new file mode 100644
index 000000000000..a000178b29c8
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_orient_top.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle.svg
new file mode 100644
index 000000000000..34c2237aadea
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_color_blue.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_color_blue.svg
new file mode 100644
index 000000000000..c95d5ae83fb2
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_color_blue.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_monospace.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_monospace.svg
new file mode 100644
index 000000000000..5031d546fadf
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_monospace.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_serif.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_serif.svg
new file mode 100644
index 000000000000..d592ec5e8fd7
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_font_serif.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_10.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_10.svg
new file mode 100644
index 000000000000..46fa23009991
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_10.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_18.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_18.svg
new file mode 100644
index 000000000000..35cdf277bf92
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontsize_18.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_italic.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_italic.svg
new file mode 100644
index 000000000000..eba2b09db887
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_italic.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_normal.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_normal.svg
new file mode 100644
index 000000000000..61e0f7a0dd18
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontstyle_normal.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_bold.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_bold.svg
new file mode 100644
index 000000000000..7b9b514ba6d4
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_bold.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_normal.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_normal.svg
new file mode 100644
index 000000000000..8c262b8983d5
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_fontweight_normal.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_10.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_10.svg
new file mode 100644
index 000000000000..d1dbd966dfb7
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_10.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_30.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_30.svg
new file mode 100644
index 000000000000..8d68f2e30e80
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_lineheight_30.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_0.svg
new file mode 100644
index 000000000000..f6ce16fb88ac
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_20.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_20.svg
new file mode 100644
index 000000000000..f972a7b3916a
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_subtitle_padding_20.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_text.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_text.svg
new file mode 100644
index 000000000000..a3870a5c88f6
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_text.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_0.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_0.svg
new file mode 100644
index 000000000000..b29884acfca5
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_2.svg b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_2.svg
new file mode 100644
index 000000000000..dfab88d9a0a5
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/docs/img/figure_title_zindex_2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/plot/vega/title/ctor/srv/scripts/fig_title.js b/lib/node_modules/@stdlib/plot/vega/title/ctor/srv/scripts/fig_title.js
new file mode 100644
index 000000000000..723bb27f6f4e
--- /dev/null
+++ b/lib/node_modules/@stdlib/plot/vega/title/ctor/srv/scripts/fig_title.js
@@ -0,0 +1,885 @@
+#!/usr/bin/env node
+
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/* eslint-disable max-lines, stdlib/no-unnecessary-nested-functions, n/no-sync */
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var join = require( 'path' ).join;
+var logger = require( 'debug' );
+var extname = require( '@stdlib/utils/extname' );
+var readdirSync = require( '@stdlib/fs/read-dir' ).sync;
+var unlinkSync = require( '@stdlib/fs/unlink' ).sync;
+var existsSync = require( '@stdlib/fs/exists' ).sync;
+var renderFig = require( '@stdlib/plot/vega/base/spec2svg-file' );
+
+
+// VARIABLES //
+
+var debug = logger( 'vega:title:figures' );
+
+var IMG_DIR = resolve( __dirname, '..', '..', 'docs', 'img' );
+var SCHEMA = 'https://vega.github.io/schema/vega/v6.json';
+var BASE_WIDTH = 600;
+var BASE_HEIGHT = 40;
+var BASE_PADDING = 20;
+
+// Marks definition for drawing a background rectangle box for the chart group area:
+var GROUP_RECT_MARKS = [
+ {
+ 'type': 'rect',
+ 'encode': {
+ 'enter': {
+ 'x': {
+ 'value': 0
+ },
+ 'y': {
+ 'value': 0
+ },
+ 'width': {
+ 'signal': 'width'
+ },
+ 'height': {
+ 'signal': 'height'
+ },
+ 'fill': {
+ 'value': '#f5f5f5'
+ },
+ 'stroke': {
+ 'value': '#ccc'
+ },
+ 'strokeWidth': {
+ 'value': 1
+ }
+ }
+ }
+ }
+];
+
+// Figure configuration array:
+var FIGURES = [
+ {
+ 'name': 'figure_title',
+ 'title': {
+ 'text': 'Monthly Revenue',
+ 'subtitle': 'Fiscal Year 2025',
+ 'anchor': 'middle',
+ 'fontSize': 18,
+ 'subtitleFontSize': 13,
+ 'subtitleColor': '#888'
+ },
+ 'width': 600,
+ 'height': 200,
+ 'padding': 25,
+ 'scales': [
+ {
+ 'name': 'x',
+ 'type': 'linear',
+ 'domain': [ 0, 10 ],
+ 'range': 'width'
+ },
+ {
+ 'name': 'y',
+ 'type': 'linear',
+ 'domain': [ 0, 100 ],
+ 'range': 'height'
+ }
+ ],
+ 'axes': [
+ {
+ 'scale': 'x',
+ 'orient': 'bottom',
+ 'title': 'Month',
+ 'grid': true,
+ 'gridOpacity': 0.15
+ },
+ {
+ 'scale': 'y',
+ 'orient': 'left',
+ 'title': 'Revenue ($K)',
+ 'grid': true,
+ 'gridOpacity': 0.15
+ }
+ ]
+ },
+
+ // align:
+ {
+ 'name': 'figure_title_align_left',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'left title alignment',
+ 'subtitleFontStyle': 'italic',
+ 'subtitleFontSize': 12,
+ 'subtitlePadding': 4,
+ 'align': 'left',
+ 'fontSize': 16,
+ 'dx': -70
+ }
+ },
+ {
+ 'name': 'figure_title_align_center',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'center title alignment',
+ 'subtitleFontStyle': 'italic',
+ 'subtitleFontSize': 12,
+ 'subtitlePadding': 4,
+ 'align': 'center',
+ 'fontSize': 16
+ }
+ },
+
+ // anchor:
+ {
+ 'name': 'figure_title_anchor_start',
+ 'title': {
+ 'text': 'anchor: start',
+ 'anchor': 'start',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_anchor_middle',
+ 'title': {
+ 'text': 'anchor: middle',
+ 'anchor': 'middle',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_anchor_end',
+ 'title': {
+ 'text': 'anchor: end',
+ 'anchor': 'end',
+ 'fontSize': 16
+ }
+ },
+
+ // angle:
+ {
+ 'name': 'figure_title_angle_0',
+ 'title': {
+ 'text': 'Title Text',
+ 'fontSize': 16,
+ 'angle': 0
+ }
+ },
+ {
+ 'name': 'figure_title_angle_180',
+ 'title': {
+ 'text': 'Title Text',
+ 'fontSize': 16,
+ 'angle': 180
+ }
+ },
+
+ // baseline:
+ {
+ 'name': 'figure_title_baseline_top',
+ 'title': {
+ 'text': 'baseline: top',
+ 'baseline': 'top',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_baseline_bottom',
+ 'title': {
+ 'text': 'baseline: bottom',
+ 'baseline': 'bottom',
+ 'fontSize': 16
+ }
+ },
+
+ // color:
+ {
+ 'name': 'figure_title_color_steelblue',
+ 'title': {
+ 'text': 'Title Text',
+ 'color': 'steelblue',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_color_red',
+ 'title': {
+ 'text': 'Title Text',
+ 'color': '#e74c3c',
+ 'fontSize': 16
+ }
+ },
+
+ // dx:
+ {
+ 'name': 'figure_title_dx_0',
+ 'title': {
+ 'text': 'dx: 0',
+ 'dx': 0,
+ 'anchor': 'start',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_dx_100',
+ 'title': {
+ 'text': 'dx: 100',
+ 'dx': 100,
+ 'anchor': 'start',
+ 'fontSize': 16
+ }
+ },
+
+ // dy:
+ {
+ 'name': 'figure_title_dy_0',
+ 'title': {
+ 'text': 'dy: 0',
+ 'dy': 0,
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_dy_100',
+ 'title': {
+ 'text': 'dy: 100',
+ 'dy': 100,
+ 'fontSize': 16
+ },
+ 'height': 80
+ },
+
+ // font:
+ {
+ 'name': 'figure_title_font_serif',
+ 'title': {
+ 'text': 'Serif Font Title',
+ 'font': 'serif',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_font_monospace',
+ 'title': {
+ 'text': 'Monospace Font Title',
+ 'font': 'monospace',
+ 'fontSize': 16
+ }
+ },
+
+ // fontSize:
+ {
+ 'name': 'figure_title_fontsize_12',
+ 'title': {
+ 'text': 'fontSize: 12',
+ 'fontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_fontsize_20',
+ 'title': {
+ 'text': 'fontSize: 20',
+ 'fontSize': 20
+ }
+ },
+ {
+ 'name': 'figure_title_fontsize_28',
+ 'title': {
+ 'text': 'fontSize: 28',
+ 'fontSize': 28
+ }
+ },
+
+ // fontStyle:
+ {
+ 'name': 'figure_title_fontstyle_normal',
+ 'title': {
+ 'text': 'Normal Style Title',
+ 'fontStyle': 'normal',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_fontstyle_italic',
+ 'title': {
+ 'text': 'Italic Style Title',
+ 'fontStyle': 'italic',
+ 'fontSize': 16
+ }
+ },
+
+ // fontWeight:
+ {
+ 'name': 'figure_title_fontweight_normal',
+ 'title': {
+ 'text': 'Normal Weight Title',
+ 'fontWeight': 'normal',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_fontweight_bold',
+ 'title': {
+ 'text': 'Bold Weight Title',
+ 'fontWeight': 'bold',
+ 'fontSize': 16
+ }
+ },
+
+ // frame:
+ {
+ 'name': 'figure_title_frame_bounds',
+ 'title': {
+ 'text': 'frame: bounds',
+ 'frame': 'bounds',
+ 'anchor': 'start',
+ 'fontSize': 16
+ },
+ 'height': 100,
+ 'padding': 25,
+ 'scales': [
+ {
+ 'name': 'y',
+ 'type': 'linear',
+ 'domain': [ 0, 100 ],
+ 'range': 'height'
+ }
+ ],
+ 'axes': [
+ {
+ 'scale': 'y',
+ 'orient': 'left',
+ 'title': 'Y Axis',
+ 'tickCount': 3
+ }
+ ]
+ },
+ {
+ 'name': 'figure_title_frame_group',
+ 'title': {
+ 'text': 'frame: group',
+ 'frame': 'group',
+ 'anchor': 'start',
+ 'fontSize': 16
+ },
+ 'height': 100,
+ 'padding': 25,
+ 'scales': [
+ {
+ 'name': 'y',
+ 'type': 'linear',
+ 'domain': [ 0, 100 ],
+ 'range': 'height'
+ }
+ ],
+ 'axes': [
+ {
+ 'scale': 'y',
+ 'orient': 'left',
+ 'title': 'Y Axis',
+ 'tickCount': 3
+ }
+ ]
+ },
+
+ // limit:
+ {
+ 'name': 'figure_title_limit_none',
+ 'title': {
+ 'text': 'A Very Long Title That Shows Without Limit',
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_limit_200',
+ 'title': {
+ 'text': 'A Very Long Title That Shows Without Limit',
+ 'limit': 200,
+ 'fontSize': 16
+ }
+ },
+
+ // lineHeight:
+ {
+ 'name': 'figure_title_lineheight_20',
+ 'title': {
+ 'text': [ 'First Line', 'Second Line' ],
+ 'lineHeight': 20,
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_lineheight_40',
+ 'title': {
+ 'text': [ 'First Line', 'Second Line' ],
+ 'lineHeight': 40,
+ 'fontSize': 16
+ }
+ },
+
+ // offset:
+ {
+ 'name': 'figure_title_offset_0',
+ 'title': {
+ 'text': 'offset: 0',
+ 'offset': 0,
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_offset_30',
+ 'title': {
+ 'text': 'offset: 30',
+ 'offset': 30,
+ 'fontSize': 16
+ }
+ },
+
+ // orient:
+ {
+ 'name': 'figure_title_orient_top',
+ 'title': {
+ 'text': 'orient: top',
+ 'orient': 'top',
+ 'fontSize': 16
+ },
+ 'height': 60,
+ 'padding': 25
+ },
+ {
+ 'name': 'figure_title_orient_bottom',
+ 'title': {
+ 'text': 'orient: bottom',
+ 'orient': 'bottom',
+ 'fontSize': 16
+ },
+ 'height': 60,
+ 'padding': 25
+ },
+
+ // subtitle:
+ {
+ 'name': 'figure_title_subtitle',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'This is the subtitle text',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitleColor:
+ {
+ 'name': 'figure_title_subtitle_color_blue',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'This is the subtitle text',
+ 'subtitleColor': '#3498db',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitleFontSize:
+ {
+ 'name': 'figure_title_subtitle_fontsize_10',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'subtitleFontSize: 10',
+ 'subtitleFontSize': 10,
+ 'fontSize': 16
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_fontsize_18',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'subtitleFontSize: 18',
+ 'subtitleFontSize': 18,
+ 'fontSize': 16
+ }
+ },
+
+ // subtitleFont:
+ {
+ 'name': 'figure_title_subtitle_font_serif',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Subtitle in serif font',
+ 'subtitleFont': 'serif',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_font_monospace',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Subtitle in monospace font',
+ 'subtitleFont': 'monospace',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitleFontStyle:
+ {
+ 'name': 'figure_title_subtitle_fontstyle_normal',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Normal style subtitle',
+ 'subtitleFontStyle': 'normal',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_fontstyle_italic',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Italic style subtitle',
+ 'subtitleFontStyle': 'italic',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitleFontWeight:
+ {
+ 'name': 'figure_title_subtitle_fontweight_normal',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Normal weight subtitle',
+ 'subtitleFontWeight': 'normal',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_fontweight_bold',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'Bold weight subtitle',
+ 'subtitleFontWeight': 'bold',
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitleLineHeight:
+ {
+ 'name': 'figure_title_subtitle_lineheight_10',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': [ 'First subtitle line', 'Second subtitle line' ],
+ 'subtitleLineHeight': 10,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_lineheight_30',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': [ 'First subtitle line', 'Second subtitle line' ],
+ 'subtitleLineHeight': 30,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // subtitlePadding:
+ {
+ 'name': 'figure_title_subtitle_padding_0',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'subtitlePadding: 0',
+ 'subtitlePadding': 0,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+ {
+ 'name': 'figure_title_subtitle_padding_20',
+ 'title': {
+ 'text': 'Title Text',
+ 'subtitle': 'subtitlePadding: 20',
+ 'subtitlePadding': 20,
+ 'fontSize': 16,
+ 'subtitleFontSize': 12
+ }
+ },
+
+ // text:
+ {
+ 'name': 'figure_title_text',
+ 'title': {
+ 'text': 'Title Text',
+ 'fontSize': 16
+ }
+ },
+
+ // zindex:
+ {
+ 'name': 'figure_title_zindex_0',
+ 'title': {
+ 'text': 'Title Text (zindex: 0)',
+ 'fontSize': 16,
+ 'zindex': 0,
+ 'dy': 15
+ },
+ 'marks': [
+ {
+ 'type': 'rect',
+ 'zindex': 1,
+ 'encode': {
+ 'enter': {
+ 'x': {
+ 'value': 0
+ },
+ 'y': {
+ 'value': 0
+ },
+ 'width': {
+ 'signal': 'width'
+ },
+ 'height': {
+ 'signal': 'height'
+ },
+ 'fill': {
+ 'value': '#e74c3c'
+ },
+ 'opacity': {
+ 'value': 0.7
+ }
+ }
+ }
+ }
+ ]
+ },
+ {
+ 'name': 'figure_title_zindex_2',
+ 'title': {
+ 'text': 'Title Text (zindex: 2)',
+ 'fontSize': 16,
+ 'zindex': 2,
+ 'dy': 15
+ },
+ 'marks': [
+ {
+ 'type': 'rect',
+ 'zindex': 1,
+ 'encode': {
+ 'enter': {
+ 'x': {
+ 'value': 0
+ },
+ 'y': {
+ 'value': 0
+ },
+ 'width': {
+ 'signal': 'width'
+ },
+ 'height': {
+ 'signal': 'height'
+ },
+ 'fill': {
+ 'value': '#e74c3c'
+ },
+ 'opacity': {
+ 'value': 0.7
+ }
+ }
+ }
+ }
+ ]
+ }
+];
+
+
+// FUNCTIONS //
+
+/**
+* Creates a Vega specification from a figure configuration.
+*
+* @private
+* @param {Object} config - figure configuration
+* @param {Object} config.title - Vega title object
+* @param {number} [config.width] - override width
+* @param {number} [config.height] - override height
+* @param {number} [config.padding] - override padding
+* @param {string} [config.background] - background color
+* @param {Array} [config.scales] - Vega scale definitions
+* @param {Array} [config.axes] - Vega axis definitions
+* @param {Array} [config.marks] - Vega mark definitions
+* @returns {Object} Vega specification
+*/
+function createSpec( config ) {
+ var spec;
+
+ spec = {
+ '$schema': SCHEMA,
+ 'width': config.width || BASE_WIDTH,
+ 'height': config.height || BASE_HEIGHT,
+ 'padding': config.padding || BASE_PADDING,
+ 'title': config.title,
+ 'background': config.background || '#ffffff',
+ 'marks': config.marks || GROUP_RECT_MARKS,
+ 'scales': config.scales || [],
+ 'axes': config.axes || []
+ };
+ return spec;
+}
+
+/**
+* Generates all figure SVGs sequentially.
+*
+* @private
+* @param {Array} figures - figure configuration array
+* @param {Callback} clbk - callback to invoke upon completion
+* @returns {void}
+*/
+function generateAll( figures, clbk ) {
+ var idx = 0;
+ next();
+
+ /**
+ * Processes the next figure in the queue.
+ *
+ * @private
+ * @returns {void}
+ */
+ function next() {
+ var outputPath;
+ var config;
+ var spec;
+
+ if ( idx >= figures.length ) {
+ return clbk( null );
+ }
+ config = figures[ idx ];
+ spec = createSpec( config );
+ outputPath = join( IMG_DIR, config.name + '.svg' );
+
+ debug( 'Rendering: %s', config.name );
+ renderFig( outputPath, spec, onDone );
+ }
+
+ /**
+ * Callback invoked upon completing a figure render.
+ *
+ * @private
+ * @param {(Error|null)} error - error object
+ * @returns {void}
+ */
+ function onDone( error ) {
+ if ( error ) {
+ return clbk( error );
+ }
+ debug( ' -> %s', join( IMG_DIR, figures[ idx ].name + '.svg' ) );
+ idx += 1;
+ next();
+ }
+}
+
+/**
+* Removes stale SVG files from a directory listing.
+*
+* @private
+* @param {Array} files - directory entries
+* @throws {Error} if unable to remove a stale file
+* @returns {void}
+*/
+function removeStaleFiles( files ) {
+ var valid;
+ var file;
+ var err;
+ var f;
+ var i;
+ var j;
+
+ for ( i = 0; i < files.length; i++ ) {
+ file = files[ i ];
+ if ( extname( file ) !== '.svg' ) {
+ continue;
+ }
+ valid = false;
+ for ( j = 0; j < FIGURES.length; j++ ) {
+ f = FIGURES[ j ].name + '.svg';
+ if ( file === f ) {
+ valid = true;
+ break;
+ }
+ }
+ if ( !valid ) {
+ debug( 'Removing stale SVG: %s', file );
+ err = unlinkSync( join( IMG_DIR, file ) );
+ if ( err instanceof Error ) {
+ throw err;
+ }
+ }
+ }
+}
+
+
+// MAIN //
+
+/**
+* Generates all title documentation figures.
+*
+* @private
+* @returns {void}
+*/
+function main() {
+ var files;
+
+ if ( existsSync( IMG_DIR ) ) {
+ files = readdirSync( IMG_DIR );
+ if ( files instanceof Error ) {
+ console.error( 'Error reading directory: %s', files.message ); // eslint-disable-line no-console
+ process.exitCode = 1;
+ return;
+ }
+ removeStaleFiles( files );
+ }
+ // Generate all figure SVGs:
+ generateAll( FIGURES, onComplete );
+
+ /**
+ * Callback invoked upon completing all figure generation.
+ *
+ * @private
+ * @param {(Error|null)} error - error object
+ * @returns {void}
+ */
+ function onComplete( error ) {
+ if ( error ) {
+ console.error( 'Error generating figures: %s', error.message ); // eslint-disable-line no-console
+ process.exitCode = 1;
+ return;
+ }
+ console.log( 'Successfully generated %d title figures.', FIGURES.length ); // eslint-disable-line no-console
+ }
+}
+
+main();