diff --git a/src/_components/Area-D3.svelte b/src/_components/Area-D3.svelte
index 88f84742..243b51e7 100644
--- a/src/_components/Area-D3.svelte
+++ b/src/_components/Area-D3.svelte
@@ -8,7 +8,7 @@
const { data, xGet, yGet, yScale } = getContext('LayerCake');
- /** @type {String} [fill='#ab00d610'] - The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
+ /** @type {string} [fill='#ab00d610'] - The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
export let fill = '#ab00d610';
/** @type {Function} [curve=curveLinear] - An optional D3 interpolation function. See [d3-shape](https://github.com/d3/d3-shape#curves) for options. Pass this function in uncalled, i.e. without the open-close parentheses. */
diff --git a/src/_components/Area.svelte b/src/_components/Area.svelte
index 9c499f5b..6b0a30ca 100644
--- a/src/_components/Area.svelte
+++ b/src/_components/Area.svelte
@@ -7,7 +7,7 @@
const { data, xGet, yGet, xScale, yScale, extents } = getContext('LayerCake');
- /** @type {String} [fill='#ab00d610'] The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
+ /** @type {string} [fill='#ab00d610'] The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
export let fill = '#ab00d610';
$: path =
@@ -18,7 +18,7 @@
})
.join('L');
- /** @type {String} **/
+ /** @type {string} **/
let area;
$: {
diff --git a/src/_components/ArrowheadMarker.svelte b/src/_components/ArrowheadMarker.svelte
index 40a9a85a..e19c81f6 100644
--- a/src/_components/ArrowheadMarker.svelte
+++ b/src/_components/ArrowheadMarker.svelte
@@ -3,10 +3,10 @@
Generates an SVG marker containing a marker for a triangle makes a nice arrowhead. Add it to the named slot called "defs" on the SVG layout component.
-->
diff --git a/src/_components/Arrows.svelte b/src/_components/Arrows.svelte
index b31272f2..818dabf8 100644
--- a/src/_components/Arrows.svelte
+++ b/src/_components/Arrows.svelte
@@ -9,10 +9,10 @@
/** @type {Array} annotations - A list of annotation objects. See the [Column](https://layercake.graphics/example/Column) chart example for the schema and options. */
export let annotations = [];
- /** @type {String} [annotationClass='.layercake-annotation'] - The class name of the text annotation divs. */
+ /** @type {string} [annotationClass='.layercake-annotation'] - The class name of the text annotation divs. */
export let containerClass = '.chart-container';
- /** @type {String} [containerClass='.chart-container'] - The class name / CSS selector of the parent element of the `` component. This is used to crawl the DOM for the text annotations. */
+ /** @type {string} [containerClass='.chart-container'] - The class name / CSS selector of the parent element of the `` component. This is used to crawl the DOM for the text annotations. */
export let annotationClass = '.layercake-annotation';
let container;
diff --git a/src/_components/AxisRadial.svelte b/src/_components/AxisRadial.svelte
index 2ba77607..e1fb8864 100644
--- a/src/_components/AxisRadial.svelte
+++ b/src/_components/AxisRadial.svelte
@@ -7,10 +7,10 @@
const { width, height, xScale, extents, config } = getContext('LayerCake');
- /** @type {Number} [lineLengthFactor=1.1] - How far to extend the lines from the circle's center. A value of `1` puts them at the circle's circumference. */
+ /** @type {number} [lineLengthFactor=1.1] - How far to extend the lines from the circle's center. A value of `1` puts them at the circle's circumference. */
export let lineLengthFactor = 1.1;
- /** @type {Number} [labelPlacementFactor=1.25] - How far to place the labels from the circle's center. A value of `1` puts them at the circle's circumference. */
+ /** @type {number} [labelPlacementFactor=1.25] - How far to place the labels from the circle's center. A value of `1` puts them at the circle's circumference. */
export let labelPlacementFactor = 1.25;
$: max = $xScale(Math.max(...$extents.x));
@@ -20,8 +20,8 @@
$: angleSlice = (Math.PI * 2) / $config.x.length;
- /** @param {Number} total
- * @param {Number} i */
+ /** @param {number} total
+ * @param {number} i */
function anchor(total, i) {
if (i === 0 || i === total / 2) {
return 'middle';
diff --git a/src/_components/AxisX.percent-range.html.svelte b/src/_components/AxisX.percent-range.html.svelte
index efd2294e..cb99c17b 100644
--- a/src/_components/AxisX.percent-range.html.svelte
+++ b/src/_components/AxisX.percent-range.html.svelte
@@ -15,7 +15,7 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number} [tickMarkLength=6] - The length of the tick mark. */
+ /** @type {number} [tickMarkLength=6] - The length of the tick mark. */
export let tickMarkLength = 6;
/** @type {boolean} [baseline=false] – Show a solid line at the bottom. */
@@ -27,19 +27,19 @@
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
+ /** @type {number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
export let ticks = undefined;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = 0;
- /** @type {String} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
+ /** @type {string} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
export let units = $percentRange === true ? '%' : 'px';
$: tickLen = tickMarks === true ? tickMarkLength ?? 6 : 0;
diff --git a/src/_components/AxisX.svelte b/src/_components/AxisX.svelte
index da7bb3cc..e587dac7 100644
--- a/src/_components/AxisX.svelte
+++ b/src/_components/AxisX.svelte
@@ -13,7 +13,7 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number} [tickMarkLength=6] - The length of the tick mark. */
+ /** @type {number} [tickMarkLength=6] - The length of the tick mark. */
export let tickMarkLength = 6;
/** @type {boolean} [baseline=false] – Show a solid line at the bottom. */
@@ -25,20 +25,21 @@
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
+ /** @type {number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
export let ticks = undefined;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=12] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=12] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = 12;
- /**@param {Number} i
- * @param {boolean} sl */
+
+ /** @param {number} i
+ * @param {boolean} sl */
function textAnchor(i, sl) {
if (sl === true) {
if (i === 0) {
diff --git a/src/_components/AxisXTop.percent-range.html.svelte b/src/_components/AxisXTop.percent-range.html.svelte
index 01c00fc5..099e6918 100644
--- a/src/_components/AxisXTop.percent-range.html.svelte
+++ b/src/_components/AxisXTop.percent-range.html.svelte
@@ -15,7 +15,7 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number} [tickMarkLength=6] - The length of the tick mark. */
+ /** @type {number} [tickMarkLength=6] - The length of the tick mark. */
export let tickMarkLength = 6;
/** @type {boolean} [baseline=false] – Show a solid line at the bottom. */
@@ -27,19 +27,19 @@
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
+ /** @type {number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
export let ticks = undefined;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the yRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = 0;
- /** @type {String} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
+ /** @type {string} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
export let units = $percentRange === true ? '%' : 'px';
$: tickLen = tickMarks === true ? tickMarkLength ?? 6 : 0;
diff --git a/src/_components/AxisXTop.svelte b/src/_components/AxisXTop.svelte
index 42095dfd..76a1513b 100644
--- a/src/_components/AxisXTop.svelte
+++ b/src/_components/AxisXTop.svelte
@@ -13,7 +13,7 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number} [tickMarkLength=6] - The length of the tick mark. */
+ /** @type {number} [tickMarkLength=6] - The length of the tick mark. */
export let tickMarkLength = 6;
/** @type {boolean} [baseline=false] – Show a solid line at the bottom. */
@@ -25,20 +25,20 @@
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
+ /** @type {number|Array|Function|undefined} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
export let ticks = undefined;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=-4] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=-4] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = -4;
- /**@param {Number} i
- * @param {boolean} sl */
+ /** @param {number} i
+ * @param {boolean} sl */
function textAnchor(i, sl) {
if (sl === true) {
if (i === 0) {
diff --git a/src/_components/AxisY.percent-range.html.svelte b/src/_components/AxisY.percent-range.html.svelte
index abab2f24..7a34960a 100644
--- a/src/_components/AxisY.percent-range.html.svelte
+++ b/src/_components/AxisY.percent-range.html.svelte
@@ -12,7 +12,7 @@
/** @type {boolean} [tickMarks=false] - Show marks next to the tick label. */
export let tickMarks = false;
- /** @type {String} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
+ /** @type {string} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
export let labelPosition = 'even';
/** @type {boolean} [snapBaselineLabel=false] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
@@ -21,28 +21,28 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
+ /** @type {number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
export let tickMarkLength = undefined;
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
+ /** @type {number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
export let ticks = 4;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=-3] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=-3] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = -3;
- /** @type {Number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
+ /** @type {number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
export let charPixelWidth = 7.25;
- /** @type {String} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
+ /** @type {string} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
export let units = $percentRange === true ? '%' : 'px';
$: isBandwidth = typeof $yScale.bandwidth === 'function';
@@ -56,7 +56,7 @@
? ticks($yScale.ticks())
: $yScale.ticks(ticks);
- /** @param {Number} sum
+ /** @param {number} sum
* @param {String} val */
function calcStringLength(sum, val) {
if (val === ',' || val === '.') return sum + charPixelWidth * 0.5;
diff --git a/src/_components/AxisY.svelte b/src/_components/AxisY.svelte
index e3773c3a..1c1c212c 100644
--- a/src/_components/AxisY.svelte
+++ b/src/_components/AxisY.svelte
@@ -10,7 +10,7 @@
/** @type {boolean} [tickMarks=false] - Show marks next to the tick label. */
export let tickMarks = false;
- /** @type {String} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
+ /** @type {string} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
export let labelPosition = 'even';
/** @type {boolean} [snapBaselineLabel=false] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
@@ -19,25 +19,25 @@
/** @type {boolean} [gridlines=true] - Show gridlines extending into the chart area. */
export let gridlines = true;
- /** @type {Number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
+ /** @type {number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
export let tickMarkLength = undefined;
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
+ /** @type {number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
export let ticks = 4;
- /** @type {Number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
+ /** @type {number} [tickGutter=0] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
export let tickGutter = 0;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = 0;
- /** @type {Number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
+ /** @type {number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
export let charPixelWidth = 7.25;
$: isBandwidth = typeof $yScale.bandwidth === 'function';
@@ -51,7 +51,7 @@
? ticks($yScale.ticks())
: $yScale.ticks(ticks);
- /** @param {Number} sum
+ /** @param {number} sum
* @param {String} val */
function calcStringLength(sum, val) {
if (val === ',' || val === '.') return sum + charPixelWidth * 0.5;
diff --git a/src/_components/AxisYRight.percent-range.html.svelte b/src/_components/AxisYRight.percent-range.html.svelte
index 367f37ff..4398efa6 100644
--- a/src/_components/AxisYRight.percent-range.html.svelte
+++ b/src/_components/AxisYRight.percent-range.html.svelte
@@ -12,7 +12,7 @@
/** @type {boolean} [tickMarks=true] - Show marks next to the tick label. */
export let tickMarks = true;
- /** @type {String} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
+ /** @type {string} [labelPosition='even'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. Default is 'even'. */
export let labelPosition = 'even';
/** @type {boolean} [snapBaselineLabel=false] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
@@ -21,28 +21,28 @@
/** @type {boolean} [gridlines=true] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
export let gridlines = true;
- /** @type {Number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
+ /** @type {number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
export let tickMarkLength = undefined;
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
+ /** @type {number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
export let ticks = 4;
- /** @type {Number} [tickGutter=5] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
+ /** @type {number} [tickGutter=5] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
export let tickGutter = 5;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=-3] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=-3] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = -3;
- /** @type {Number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
+ /** @type {number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
export let charPixelWidth = 7.25;
- /** @type {String} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
+ /** @type {string} units - Whether this component should use percentage or pixel values. If `percentRange={true}` it defaults to `'%'`. Options: `'%'` or `'px'`. */
export let units = $percentRange === true ? '%' : 'px';
$: isBandwidth = typeof $yScale.bandwidth === 'function';
@@ -56,7 +56,7 @@
? ticks($yScale.ticks())
: $yScale.ticks(ticks);
- /** @param {Number} sum
+ /** @param {number} sum
* @param {String} val */
function calcStringLength(sum, val) {
if (val === ',' || val === '.') return sum + charPixelWidth * 0.5;
diff --git a/src/_components/AxisYRight.svelte b/src/_components/AxisYRight.svelte
index 6e6694e2..139a5be0 100644
--- a/src/_components/AxisYRight.svelte
+++ b/src/_components/AxisYRight.svelte
@@ -10,7 +10,7 @@
/** @type {boolean} [tickMarks=false] - Show marks next to the tick label. */
export let tickMarks = false;
- /** @type {String} [labelPosition='above'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. */
+ /** @type {string} [labelPosition='above'] - Whether the label sits even with its value ('even') or sits on top ('above') the tick mark. */
export let labelPosition = 'above';
/** @type {boolean} [snapBaselineLabel=false] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
@@ -19,25 +19,25 @@
/** @type {boolean} [gridlines=true] - When labelPosition='even', adjust the lowest label so that it sits above the tick mark. */
export let gridlines = true;
- /** @type {Number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
+ /** @type {number|undefined} [tickMarkLength=undefined] - The length of the tick mark. If not set, becomes the length of the widest tick. */
export let tickMarkLength = undefined;
/** @type {(d: any) => string} [format=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let format = d => d;
- /** @type {Number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
+ /** @type {number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
export let ticks = 4;
- /** @type {Number} [tickGutter=5] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
+ /** @type {number} [tickGutter=5] - The amount of whitespace between the start of the tick and the chart drawing area (the xRange min). */
export let tickGutter = 5;
- /** @type {Number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
+ /** @type {number} [dx=0] - Any optional value passed to the `dx` attribute on the text label. */
export let dx = 0;
- /** @type {Number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
+ /** @type {number} [dy=0] - Any optional value passed to the `dy` attribute on the text label. */
export let dy = 0;
- /** @type {Number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
+ /** @type {number} [charPixelWidth=7.25] - Used to calculate the widest label length to offset labels. Adjust if the automatic tick length doesn't look right because you have a bigger font (or just set `tickMarkLength` to a pixel value). */
export let charPixelWidth = 7.25;
$: isBandwidth = typeof $yScale.bandwidth === 'function';
@@ -51,7 +51,7 @@
? ticks($yScale.ticks())
: $yScale.ticks(ticks);
- /** @param {Number} sum
+ /** @param {number} sum
* @param {String} val */
function calcStringLength(sum, val) {
if (val === ',' || val === '.') return sum + charPixelWidth * 0.5;
diff --git a/src/_components/Bar.svelte b/src/_components/Bar.svelte
index 9ff9cc9b..69513fdb 100644
--- a/src/_components/Bar.svelte
+++ b/src/_components/Bar.svelte
@@ -7,7 +7,7 @@
const { data, xGet, yGet, xScale, yScale } = getContext('LayerCake');
- /** @type {String} [fill='#00bbff'] - The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
+ /** @type {string} [fill='#00bbff'] - The shape's fill color. This is technically optional because it comes with a default value but you'll likely want to replace it with your own color. */
export let fill = '#00bbff';
diff --git a/src/_components/Beeswarm.html.svelte b/src/_components/Beeswarm.html.svelte
index 86276cae..0a4f7a68 100644
--- a/src/_components/Beeswarm.html.svelte
+++ b/src/_components/Beeswarm.html.svelte
@@ -7,16 +7,16 @@
const { data, xGet, zGet, height, config } = getContext('LayerCake');
- /** @type {Number} [r=3] - The circle radius size in pixels. */
+ /** @type {number} [r=3] - The circle radius size in pixels. */
export let r = 3;
- /** @type {Number} [strokeWidth=0] - The circle's stroke width in pixels. */
+ /** @type {number} [strokeWidth=0] - The circle's stroke width in pixels. */
export let strokeWidth = 0;
- /** @type {String} [stroke='#fff'] - The circle's stroke color. */
+ /** @type {string} [stroke='#fff'] - The circle's stroke color. */
export let stroke = '#fff';
- /** @type {Number} [spacing=1.5] - Spacing, in pixels, between each circle. */
+ /** @type {number} [spacing=1.5] - Spacing, in pixels, between each circle. */
export let spacing = 1.5;
/** @type {Function} [getTitle] — An accessor function to get the field on the data element to display as a hover label. Mostly useful for debugging, needs better styling for production. */
diff --git a/src/_components/Beeswarm.svelte b/src/_components/Beeswarm.svelte
index 2f5f6091..513210ef 100644
--- a/src/_components/Beeswarm.svelte
+++ b/src/_components/Beeswarm.svelte
@@ -7,16 +7,16 @@
const { data, xGet, zGet, height, config } = getContext('LayerCake');
- /** @type {Number} [r=3] - The circle radius size in pixels. */
+ /** @type {number} [r=3] - The circle radius size in pixels. */
export let r = 3;
- /** @type {Number} [strokeWidth=0] - The circle's stroke width in pixels. */
+ /** @type {number} [strokeWidth=0] - The circle's stroke width in pixels. */
export let strokeWidth = 0;
- /** @type {String} [stroke='#fff'] - The circle's stroke color. */
+ /** @type {string} [stroke='#fff'] - The circle's stroke color. */
export let stroke = '#fff';
- /** @type {Number} [spacing=1.5] - Whitespace padding between each circle, in pixels */
+ /** @type {number} [spacing=1.5] - Whitespace padding between each circle, in pixels */
export let spacing = 1.5;
/** @type {Function|undefined} [getTitle] — An accessor function to get the field on the data element to display as a hover label using a `` tag. */
diff --git a/src/_components/BeeswarmForce.html.svelte b/src/_components/BeeswarmForce.html.svelte
index 206c1bdb..e4e681e1 100644
--- a/src/_components/BeeswarmForce.html.svelte
+++ b/src/_components/BeeswarmForce.html.svelte
@@ -10,19 +10,19 @@
const nodes = $data.map(d => ({ ...d }));
- /** @type {Number} [r=4] - The circle radius size in pixels. */
+ /** @type {number} [r=4] - The circle radius size in pixels. */
export let r = 4;
- /** @type {Number} [strokeWidth=0.5] - The circle's stroke width in pixels. */
+ /** @type {number} [strokeWidth=0.5] - The circle's stroke width in pixels. */
export let strokeWidth = 0.5;
- /** @type {String} [stroke='#fff'] - The circle's stroke color. */
+ /** @type {string} [stroke='#fff'] - The circle's stroke color. */
export let stroke = '#fff';
- /** @type {Number} [xStrength=0.95] - The value passed into the `.strength` method on `forceX`, which is used as the `'x'` property on the simulation. See [the documentation](https://github.com/d3/d3-force#x_strength) for more. */
+ /** @type {number} [xStrength=0.95] - The value passed into the `.strength` method on `forceX`, which is used as the `'x'` property on the simulation. See [the documentation](https://github.com/d3/d3-force#x_strength) for more. */
export let xStrength = 0.95;
- /** @type {Number} [yStrength=0.075] - The value passed into the `.strength` method on `forceY`, which is used as the `'y'` property on the simulation. See [the documentation](https://github.com/d3/d3-force#y_strength) for more. */
+ /** @type {number} [yStrength=0.075] - The value passed into the `.strength` method on `forceY`, which is used as the `'y'` property on the simulation. See [the documentation](https://github.com/d3/d3-force#y_strength) for more. */
export let yStrength = 0.075;
/** @type {Function|undefined} [getTitle] — An accessor function to get the field on the data element to display as a hover label. Mostly useful for debugging, needs better styling for production. */
diff --git a/src/_components/BeeswarmForce.svelte b/src/_components/BeeswarmForce.svelte
index 7e5ac18c..394addb9 100644
--- a/src/_components/BeeswarmForce.svelte
+++ b/src/_components/BeeswarmForce.svelte
@@ -10,19 +10,19 @@
const nodes = $data.map(d => ({ ...d }));
- /** @type {Number} [r=4] - The circle radius size in pixels. */
+ /** @type {number} [r=4] - The circle radius size in pixels. */
export let r = 4;
- /** @type {Number} [strokeWidth=1] - The circle's stroke width in pixels. */
+ /** @type {number} [strokeWidth=1] - The circle's stroke width in pixels. */
export let strokeWidth = 1;
- /** @type {String} [stroke='#fff'] - The circle's stroke color. */
+ /** @type {string} [stroke='#fff'] - The circle's stroke color. */
export let stroke = '#fff';
- /** @type {Number} [xStrength=0.95] - The value passed into the `.strength` method on `forceX`. See [the documentation](https://github.com/d3/d3-force#x_strength). */
+ /** @type {number} [xStrength=0.95] - The value passed into the `.strength` method on `forceX`. See [the documentation](https://github.com/d3/d3-force#x_strength). */
export let xStrength = 0.95;
- /** @type {Number} [yStrength=0.075] - The value passed into the `.strength` method on `forceY`. See [the documentation](https://github.com/d3/d3-force#y_strength). */
+ /** @type {number} [yStrength=0.075] - The value passed into the `.strength` method on `forceY`. See [the documentation](https://github.com/d3/d3-force#y_strength). */
export let yStrength = 0.075;
/** @type {Function|undefined} [getTitle] — An accessor function to get the field on the data element to display as a hover label using a `` tag. */
diff --git a/src/_components/Brush.html.svelte b/src/_components/Brush.html.svelte
index f792d632..27057d90 100644
--- a/src/_components/Brush.html.svelte
+++ b/src/_components/Brush.html.svelte
@@ -5,10 +5,10 @@
diff --git a/src/_components/Scatter.svg.svelte b/src/_components/Scatter.svg.svelte
index 1a874378..c6984f14 100644
--- a/src/_components/Scatter.svg.svelte
+++ b/src/_components/Scatter.svg.svelte
@@ -7,16 +7,16 @@
const { data, xGet, yGet, xScale, yScale } = getContext('LayerCake');
- /** @type {Number} [r=5] – The circle's radius. */
+ /** @type {number} [r=5] – The circle's radius. */
export let r = 5;
- /** @type {String} [fill='#0cf'] – The circle's fill color. */
+ /** @type {string} [fill='#0cf'] – The circle's fill color. */
export let fill = '#0cf';
- /** @type {String} [stroke='#000'] – The circle's stroke color. */
+ /** @type {string} [stroke='#000'] – The circle's stroke color. */
export let stroke = '#000';
- /** @type {Number} [strokeWidth=0] – The circle's stroke width. */
+ /** @type {number} [strokeWidth=0] – The circle's stroke width. */
export let strokeWidth = 0;
diff --git a/src/_components/Scatter.webgl.svelte b/src/_components/Scatter.webgl.svelte
index a688205d..11a899d5 100644
--- a/src/_components/Scatter.webgl.svelte
+++ b/src/_components/Scatter.webgl.svelte
@@ -8,10 +8,10 @@
const { data, xGet, yGet, width, height } = getContext('LayerCake');
- /** @type {Number} [r=5] - The circle's radius. */
+ /** @type {number} [r=5] - The circle's radius. */
export let r = 5;
- /** @type {String} [fill='#0cf'] - The circle's fill color. */
+ /** @type {string} [fill='#0cf'] - The circle's fill color. */
export let fill = '#0cf';
export let stroke = '#000'; // Not yet implemented
diff --git a/src/_components/SharedTooltip.html.svelte b/src/_components/SharedTooltip.html.svelte
index cb5cc035..ea7fcf92 100644
--- a/src/_components/SharedTooltip.html.svelte
+++ b/src/_components/SharedTooltip.html.svelte
@@ -22,7 +22,7 @@
/** @type {Function} [formatKey=d => titleCase(d)] - A function to format the series name. */
export let formatKey = d => titleCase(d);
- /** @type {Number} [offset=-20] - A y-offset from the hover point, in pixels. */
+ /** @type {number} [offset=-20] - A y-offset from the hover point, in pixels. */
export let offset = -20;
/** @type {Array