swiftplot 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","title":"swiftplot easy chart","description":"An easy chart from swiftplot/charts as JSON: its kind, such as `line` for lineChart(), and the props it takes. #/$defs/<kind> holds the props of one kind.","type":"object","oneOf":[{"type":"object","properties":{"chart":{"const":"line"},"props":{"$ref":"#/$defs/line"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"area"},"props":{"$ref":"#/$defs/area"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"bar"},"props":{"$ref":"#/$defs/bar"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"scatter"},"props":{"$ref":"#/$defs/scatter"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"pie"},"props":{"$ref":"#/$defs/pie"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"funnel"},"props":{"$ref":"#/$defs/funnel"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"radialBar"},"props":{"$ref":"#/$defs/radialBar"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"radar"},"props":{"$ref":"#/$defs/radar"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"heatmap"},"props":{"$ref":"#/$defs/heatmap"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"histogram"},"props":{"$ref":"#/$defs/histogram"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"boxPlot"},"props":{"$ref":"#/$defs/boxPlot"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"candlestick"},"props":{"$ref":"#/$defs/candlestick"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"combo"},"props":{"$ref":"#/$defs/combo"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"sankey"},"props":{"$ref":"#/$defs/sankey"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"treemap"},"props":{"$ref":"#/$defs/treemap"}},"required":["chart","props"],"additionalProperties":false},{"type":"object","properties":{"chart":{"const":"sunburst"},"props":{"$ref":"#/$defs/sunburst"}},"required":["chart","props"],"additionalProperties":false}],"$defs":{"line":{"type":"object","properties":{"xAxis":{"description":"Settings for the x axis; which apply depends on whether x is numbers, dates or text.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"rules":{"description":"Lines across the plot over the data, each `{ x }` or `{ y }` with an optional `text`, `dashed` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"x":{"description":"Where the line stands on the x axis; one not on it is not drawn.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"y":{"description":"Where the line lies on the y axis.","type":"number"}},"required":["y"],"additionalProperties":false}]}},"zones":{"description":"Shaded bands under the data, each `{ x: [from, to] }` or `{ y: [from, to] }` with an optional `text` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"x":{"description":"The band's two edges on the x axis; two categories cover both in full.","type":"array","prefixItems":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"anyOf":[{"type":"string"},{"type":"number"}]}],"minItems":2,"items":false}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"y":{"description":"The band's two edges on the y axis.","type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false}},"required":["y"],"additionalProperties":false}]}},"brush":{"description":"A drag marks out a range, on x unless `{ axes }` says otherwise; with `zoom`, its release shows the range.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"The axes a drag marks out a range on.","enum":["x","y","xy"]}},"additionalProperties":false}]},"curve":{"description":"How the points are joined: straight, stepped or smooth.","enum":["linear","step","smooth"]},"join":{"description":"Draws straight across a missing value instead of leaving a gap.","type":"boolean"},"fill":{"description":"Shades the area under each line down to the bottom of the plot: `true` for a faint fade of its colour, or a gradient.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]},"toward":{"enum":["right","left","down","up"]}},"required":["from","to","toward"],"additionalProperties":false}]},"cumulative":{"description":"Draws each series as its running total in x order, a missing value adding zero, and takes no errorBars; the tooltip gives the total and then the row's own value.","type":"boolean"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"x":{"description":"The x field, by name or as an accessor `(row, index) => value`; guessed when left out.","type":"string"},"y":{"description":"The field or fields of numbers drawn, one series each, by name or accessor; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The field or fields of numbers drawn against a right-hand axis, one more series each, by name or accessor; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the field whose distinct values each give a series.","type":"string"},"errorBars":{"description":"An upright bar from low to high at each x, under the line and in its colour; takes one y, with series or without.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"x":{"description":"The x column, by name; guessed when left out.","type":"string"},"y":{"description":"The column or columns of numbers drawn, one series each; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The column or columns of numbers drawn against a right-hand axis, one more series each; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the column whose distinct values each give a series.","type":"string"},"errorBars":{"description":"An upright bar from low to high at each x, under the line and in its colour; takes one y, with series or without.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"Numbers drawn against their index as the series `value`; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[x, y]` pairs drawn as the series `y`; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"area":{"type":"object","properties":{"xAxis":{"description":"Settings for the x axis; which apply depends on whether x is numbers, dates or text.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"rules":{"description":"Lines across the plot over the data, each `{ x }` or `{ y }` with an optional `text`, `dashed` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"x":{"description":"Where the line stands on the x axis; one not on it is not drawn.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"y":{"description":"Where the line lies on the y axis.","type":"number"}},"required":["y"],"additionalProperties":false}]}},"zones":{"description":"Shaded bands under the data, each `{ x: [from, to] }` or `{ y: [from, to] }` with an optional `text` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"x":{"description":"The band's two edges on the x axis; two categories cover both in full.","type":"array","prefixItems":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"anyOf":[{"type":"string"},{"type":"number"}]}],"minItems":2,"items":false}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"y":{"description":"The band's two edges on the y axis.","type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false}},"required":["y"],"additionalProperties":false}]}},"brush":{"description":"A drag marks out a range, on x unless `{ axes }` says otherwise; with `zoom`, its release shows the range.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"The axes a drag marks out a range on.","enum":["x","y","xy"]}},"additionalProperties":false}]},"curve":{"description":"How the points are joined: straight, stepped or smooth.","enum":["linear","step","smooth"]},"join":{"description":"Draws straight across a missing value instead of leaving a gap.","type":"boolean"},"stack":{"description":"Stacks the series of each y axis, a missing value counting as zero; unstacked areas overlap, half transparent.","type":"boolean"},"cumulative":{"description":"Draws each series as its running total in x order, a missing value adding zero, before stack lays them on each other; the tooltip gives the total and then the row's own value.","type":"boolean"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"}},"additionalProperties":false},"x":{"description":"The x field, by name or as an accessor `(row, index) => value`; guessed when left out.","type":"string"},"y":{"description":"The field or fields of numbers drawn, one series each, by name or accessor; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The field or fields of numbers drawn against a right-hand axis, one more series each, by name or accessor; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the field whose distinct values each give a series.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"}},"additionalProperties":false},"x":{"description":"The x column, by name; guessed when left out.","type":"string"},"y":{"description":"The column or columns of numbers drawn, one series each; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The column or columns of numbers drawn against a right-hand axis, one more series each; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the column whose distinct values each give a series.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers drawn against their index as the series `value`; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[x, y]` pairs drawn as the series `y`; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"bar":{"type":"object","properties":{"xAxis":{"description":"Settings for the x axis; which apply depends on whether x is numbers, dates or text.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"rules":{"description":"Lines across the plot over the data, each `{ x }` or `{ y }` with an optional `text`, `dashed` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"x":{"description":"Where the line stands on the x axis; one not on it is not drawn.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"y":{"description":"Where the line lies on the y axis.","type":"number"}},"required":["y"],"additionalProperties":false}]}},"zones":{"description":"Shaded bands under the data, each `{ x: [from, to] }` or `{ y: [from, to] }` with an optional `text` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"x":{"description":"The band's two edges on the x axis; two categories cover both in full.","type":"array","prefixItems":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"anyOf":[{"type":"string"},{"type":"number"}]}],"minItems":2,"items":false}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"y":{"description":"The band's two edges on the y axis.","type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false}},"required":["y"],"additionalProperties":false}]}},"brush":{"description":"A drag marks out a range, on x unless `{ axes }` says otherwise; with `zoom`, its release shows the range.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"The axes a drag marks out a range on.","enum":["x","y","xy"]}},"additionalProperties":false}]},"stack":{"description":"Stacks the series, not with `y2`; unstacked bars stand side by side.","type":"boolean"},"cumulative":{"description":"Draws each series as its running total in the order of its categories, a missing value adding zero, before stack lays them on each other, and takes no errorBars; the tooltip gives the total and then the row's own value.","type":"boolean"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"}},"additionalProperties":false},"x":{"description":"The x field, by name or as an accessor `(row, index) => value`; guessed when left out.","type":"string"},"y":{"description":"The field or fields of numbers drawn, one series each, by name or accessor; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The field or fields of numbers drawn against a right-hand axis, one more series each, by name or accessor; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the field whose distinct values each give a series.","type":"string"},"errorBars":{"description":"An upright bar from low to high over each bar, in the text colour; takes one y, and no stacked series.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"}},"additionalProperties":false},"x":{"description":"The x column, by name; guessed when left out.","type":"string"},"y":{"description":"The column or columns of numbers drawn, one series each; guessed when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2":{"description":"The column or columns of numbers drawn against a right-hand axis, one more series each; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the column whose distinct values each give a series.","type":"string"},"errorBars":{"description":"An upright bar from low to high over each bar, in the text colour; takes one y, and no stacked series.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"Numbers drawn against their index as the series `value`; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[x, y]` pairs drawn as the series `y`; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"scatter":{"type":"object","properties":{"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"xAxis":{"description":"Settings for the x axis; which apply depends on whether x is numbers, dates or text.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"rules":{"description":"Lines across the plot over the data, each `{ x }` or `{ y }` with an optional `text`, `dashed` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"x":{"description":"Where the line stands on the x axis; one not on it is not drawn.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"y":{"description":"Where the line lies on the y axis.","type":"number"}},"required":["y"],"additionalProperties":false}]}},"zones":{"description":"Shaded bands under the data, each `{ x: [from, to] }` or `{ y: [from, to] }` with an optional `text` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"x":{"description":"The band's two edges on the x axis; two categories cover both in full.","type":"array","prefixItems":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"anyOf":[{"type":"string"},{"type":"number"}]}],"minItems":2,"items":false}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"y":{"description":"The band's two edges on the y axis.","type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false}},"required":["y"],"additionalProperties":false}]}},"brush":{"description":"A drag marks out a range, on x unless `{ axes }` says otherwise; with `zoom`, its release shows the range.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"The axes a drag marks out a range on.","enum":["x","y","xy"]}},"additionalProperties":false}]},"shape":{"description":"A tick is an upright line that answers no tooltip, click or selection, and takes no `ring` and no field of `r`.","enum":["dot","tick"]},"alpha":{"description":"The dots' opacity, from 0 to 1.","type":"number"},"ring":{"description":"Draws each dot as a ring of its colour this many CSS pixels wide; filled when left out.","type":"number"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The x field, by name or as an accessor `(row, index) => value`; guessed when left out.","type":"string"},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"y2":{"description":"The field or fields of numbers drawn against a right-hand axis, one more series each, by name or accessor; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the field whose distinct values each give a series.","type":"string"},"y":{"description":"The one y field, of numbers, or of text for a band per category in order of first appearance, by name or, on rows, an accessor; the next number field when left out. A text y takes only `label` from `yAxis`.","type":"string"},"r":{"description":"The dot radius in CSS pixels, or a field of radii, where a row with a missing r is dropped; how far a tick reaches above and below its point.","anyOf":[{"type":"string"},{"type":"number"}]},"errorBars":{"description":"A bar from low to high at each dot, under the dots and in their colour: upright, or lying down with `axis: 'x'` or a text y, where low and high are values on the x axis and x is numbers; takes one y, with series or without.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"},"axis":{"description":"The axis low and high are values on, the bars running along it.","enum":["x","y"]}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The x column, by name; guessed when left out.","type":"string"},"y2Axis":{"description":"Settings for the right-hand axis of `y2`, which is drawn only with it.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"y2":{"description":"The column or columns of numbers drawn against a right-hand axis, one more series each; never guessed, and not with `series` or `errorBars`.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"series":{"description":"For long data, the column whose distinct values each give a series.","type":"string"},"y":{"description":"The one y field, of numbers, or of text for a band per category in order of first appearance, by name or, on rows, an accessor; the next number field when left out. A text y takes only `label` from `yAxis`.","type":"string"},"r":{"description":"The dot radius in CSS pixels, or a field of radii, where a row with a missing r is dropped; how far a tick reaches above and below its point.","anyOf":[{"type":"string"},{"type":"number"}]},"errorBars":{"description":"A bar from low to high at each dot, under the dots and in their colour: upright, or lying down with `axis: 'x'` or a text y, where low and high are values on the x axis and x is numbers; takes one y, with series or without.","type":"object","properties":{"low":{"description":"The field of numbers each error bar starts at, as a value on the y axis and not a distance from y; a row without it has no bar.","type":"string"},"high":{"description":"The field of numbers each error bar ends at, as a value on the y axis.","type":"string"},"cap":{"description":"Half the length of the line across each end, in CSS pixels; 0 leaves the bare bar.","type":"number"},"width":{"description":"The width of the lines in CSS pixels.","type":"number"},"axis":{"description":"The axis low and high are values on, the bars running along it.","enum":["x","y"]}},"required":["low","high"],"additionalProperties":false}}},{"type":"object","properties":{"data":{"description":"Numbers drawn against their index as the series `value`; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}},"r":{"description":"The dot radius in CSS pixels, or a field of radii, where a row with a missing r is dropped; how far a tick reaches above and below its point.","type":"number"}}},{"type":"object","properties":{"data":{"description":"`[x, y]` pairs drawn as the series `y`; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}},"r":{"description":"The dot radius in CSS pixels, or a field of radii, where a row with a missing r is dropped; how far a tick reaches above and below its point.","type":"number"}}}],"unevaluatedProperties":false},"pie":{"type":"object","properties":{"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"inner":{"description":"The hole's share of the radius, from 0 to 1; above 0 the pie is a donut.","type":"number"},"text":{"description":"Writes each slice's share on it, where there is room.","type":"boolean"},"sweep":{"description":"Each slice starts at this opacity, from 0 to 1, and reaches its full colour at its end; solid when left out.","type":"number"},"center":{"description":"Text in the middle of the donut, or a function of the total of the positive values. A share it would cover is dropped; with `inner` 0 it is drawn over the slices.","type":"string"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"label":{"description":"The field that names each part, by name or as an accessor `(row, index) => value`; the first text field when left out.","type":"string"},"value":{"description":"The field of numbers the parts stand for, by name or accessor; the only number field when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a part per index; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"label":{"description":"The column that names each part; the first text column when left out.","type":"string"},"value":{"description":"The column of numbers the parts stand for; the only number column when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers, one unnamed part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[label, value]` pairs, one part each; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"funnel":{"type":"object","properties":{"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"text":{"description":"Writes each stage's name and its share of the first stage.","type":"boolean"},"fill":{"description":"One blend over the whole funnel in place of a colour per stage.","type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]},"toward":{"enum":["right","left","down","up"]}},"required":["from","to","toward"],"additionalProperties":false}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"label":{"description":"The field that names each part, by name or as an accessor `(row, index) => value`; the first text field when left out.","type":"string"},"value":{"description":"The field of numbers the parts stand for, by name or accessor; the only number field when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a part per index; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"label":{"description":"The column that names each part; the first text column when left out.","type":"string"},"value":{"description":"The column of numbers the parts stand for; the only number column when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers, one unnamed part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[label, value]` pairs, one part each; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"radialBar":{"type":"object","properties":{"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"max":{"description":"What three quarters of a turn stand for, capping larger values; the largest rounded up when left out.","type":"number"},"sweep":{"description":"Each bar starts at this opacity, from 0 to 1, and reaches its full colour at its end; solid when left out.","type":"number"},"inner":{"description":"The share of the radius left empty in the middle.","type":"number"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"label":{"description":"The field that names each part, by name or as an accessor `(row, index) => value`; the first text field when left out.","type":"string"},"value":{"description":"The field of numbers the parts stand for, by name or accessor; the only number field when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a part per index; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"label":{"description":"The column that names each part; the first text column when left out.","type":"string"},"value":{"description":"The column of numbers the parts stand for; the only number column when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers, one unnamed part each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[label, value]` pairs, one part each; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"radar":{"type":"object","properties":{"colors":{"description":"Series colours in order; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"max":{"description":"What the rim stands for, capping larger values; the largest rounded up to a whole step when left out.","type":"number"},"fill":{"description":"The opacity of each shape's filling, from 0 to 1; 0 leaves only the outline.","type":"number"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one spoke each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The field that names each spoke, by name or as an accessor `(row, index) => value`; the first text field when left out.","type":"string"},"y":{"description":"The field or fields of numbers drawn, one shape each, by name or accessor; every number field left when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a spoke per index; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The column that names each spoke; the first text column when left out.","type":"string"},"y":{"description":"The column or columns of numbers drawn, one shape each; every number column left when left out.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},{"type":"object","properties":{"data":{"description":"Numbers, one unnamed spoke each, drawn as the shape `value`; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[name, value]` pairs, one spoke each, drawn as the shape `y`; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"heatmap":{"type":"object","properties":{"colors":{"description":"Not used: the cells take their colours from `color`.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The strip of colours with the lowest and the highest value, or the legend's options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"xAxis":{"description":"The x axis, which names every column.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"}},"additionalProperties":false},"yAxis":{"description":"The y axis, which names every row of the grid.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"}},"additionalProperties":false}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one cell each, a later row for the same cell winning; a grid over 10,000,000 cells throws; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The field whose distinct values are the columns, text in order of first appearance, numbers and dates ascending, by name or as an accessor `(row, index) => value`; the first field of text or dates left when left out.","type":"string"},"y":{"description":"The field whose distinct values are the rows of the grid, from the bottom up, text in order of first appearance, numbers and dates ascending, by name or accessor; the next field of text or dates when left out.","type":"string"},"value":{"description":"The field of numbers the cells are coloured by, by name or accessor; the only number field left when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a cell per index, a later one for the same cell winning; a grid over 10,000,000 cells throws; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The column whose distinct values are the columns of the grid, text in order of first appearance, numbers and dates ascending; the first column of text or dates left when left out.","type":"string"},"y":{"description":"The column whose distinct values are the rows of the grid, from the bottom up, text in order of first appearance, numbers and dates ascending; the next column of text or dates when left out.","type":"string"},"value":{"description":"The column of numbers the cells are coloured by; the only number column left when left out.","type":"string"}}}],"unevaluatedProperties":false},"histogram":{"type":"object","properties":{"yAxis":{"description":"The y axis of the counts, titled `count`, `cumulative count` or `cumulative share` unless given a label.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"The bars' colour, as the first of a list.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"xAxis":{"description":"Settings for the x axis of the values counted.","type":"object","properties":{"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"}},"additionalProperties":false},"bins":{"description":"How many equal bins span the values, at most 1,000,000, or the bin edges in ascending order; Sturges' rule when left out.","anyOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]},"cumulative":{"description":"Each bar holds every value up to its bin's upper edge: `true` for the count, `'share'` for the share of all values counted, from 0 to 1.","anyOf":[{"const":"share"},{"type":"boolean"}]}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The field of numbers counted, by name or as an accessor `(row, index) => value`; the only number field when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The column of numbers counted; the only number column when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers to count; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}}],"unevaluatedProperties":false},"boxPlot":{"type":"object","properties":{"colors":{"description":"The boxes' colour, as the first of a list.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"fill":{"description":"What the boxes are filled with: a colour, drawn faint, or a blend down each box; faint in the boxes' colour when left out.","anyOf":[{"type":"string"},{"type":"object","properties":{"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]},"toward":{"enum":["right","left","down","up"]}},"required":["from","to","toward"],"additionalProperties":false}]},"xAxis":{"description":"The x axis, which names every box.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]}},"additionalProperties":false}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one value each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The field whose distinct values each give a box, in order of first appearance, by name or as an accessor `(row, index) => value`; the only text field when left out, where its values repeat; one box with no text field, or null.","anyOf":[{"type":"null"},{"type":"string"}]},"y":{"description":"The field of numbers the boxes sum up, by name or accessor; the only number field when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The column whose distinct values each give a box, in order of first appearance; the only text column when left out, where its values repeat; one box with no text column, or null.","anyOf":[{"type":"null"},{"type":"string"}]},"y":{"description":"The column of numbers the boxes sum up; the only number column when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"Numbers, drawn as one box; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":["number","null"]}}}},{"type":"object","properties":{"data":{"description":"`[group, value]` pairs; a row of any other length throws.","type":["array","null"],"items":{"type":"array","minItems":2,"maxItems":2}}}}],"unevaluatedProperties":false},"candlestick":{"type":"object","properties":{"xAxis":{"description":"The x axis: dates, a category per candle for text, or a scale of numbers.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"colors":{"description":"The candles' colour where `up` or `down` is left out, as the first of a list.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"up":{"description":"The colour of a candle whose close is not below its open; the first of `colors` when left out.","type":"string"},"down":{"description":"The colour of a candle whose close is below its open; the first of `colors` when left out.","type":"string"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one candle each; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"Where each candle stands, by name or as an accessor `(row, index) => value`; the first field of dates, else of text, when left out.","type":"string"},"open":{"description":"The field of prices each candle opens at, by name or accessor; the one called open, in any case, when left out.","type":"string"},"high":{"description":"The field of highest prices, by name or accessor; the one called high, in any case, when left out.","type":"string"},"low":{"description":"The field of lowest prices, by name or accessor; the one called low, in any case, when left out.","type":"string"},"close":{"description":"The field of prices each candle closes at, by name or accessor; the one called close, in any case, when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a candle per index; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The column of where each candle stands; the first column of dates, else of text, when left out.","type":"string"},"open":{"description":"The column of prices each candle opens at; the one called open, in any case, when left out.","type":"string"},"high":{"description":"The column of highest prices; the one called high, in any case, when left out.","type":"string"},"low":{"description":"The column of lowest prices; the one called low, in any case, when left out.","type":"string"},"close":{"description":"The column of prices each candle closes at; the one called close, in any case, when left out.","type":"string"}}}],"unevaluatedProperties":false},"combo":{"type":"object","properties":{"xAxis":{"description":"Settings for the x axis: a category per row for text, else a scale of dates or numbers, on which the bars of one x take 0.6 of the smallest gap.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"On numbers, ticks at the multiples of this, thinned to every k-th when their labels do not fit; dates, text and bars ignore it.","type":"number"},"fit":{"description":"On numbers and dates, which series the automatic extent covers: those shown or all of them; text and bars ignore it.","enum":["shown","all","window"]},"domain":{"description":"On numbers 'nice' (the default) widens to whole steps, 'data' keeps it exact and `[0, 'nice']` fixes one end; dates fit the data unless given `[from, to]` in ms; text and bars ignore it, but reject one open end.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"utc":{"description":"Reads dates without a zone, and labels the axis, in UTC; `false` uses local time, except on bars, which are always UTC.","type":"boolean"},"unit":{"description":"Puts date ticks on the boundaries of this unit; left out, the step is chosen for the span shown.","enum":["year","month","day","hour","minute","second"]},"every":{"description":"With `unit`, a tick every this many units.","type":"number"}},"additionalProperties":false},"yAxis":{"description":"Settings for the y axis; a log scale is for lines alone.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]}},"additionalProperties":false},"zoom":{"description":"Zoom and pan, or their options.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"'x' when left out.","enum":["x","y","xy"]},"wheel":{"description":"'ctrl' when left out: ctrl or cmd and the wheel zoom, and a plain wheel scrolls the page.","enum":[false,"ctrl","plain"]},"drag":{"description":"Which drag pans: a plain one, or one with shift held. Left out, a plain drag pans unless a brush is in use. 'pan' takes every mouse drag, so a brush() beside it gets none.","enum":[false,"pan","shift"]},"min":{"description":"The narrowest x span the wheel, a pinch and `brush({ zoom })` reach, in axis units: milliseconds on a time axis.","type":"number"},"max":{"description":"The widest x span the wheel and a pinch zoom out to, in axis units. A view already wider, such as the whole domain, is left as it is.","type":"number"}},"additionalProperties":false}]},"y2Axis":{"description":"Settings for the right-hand axis of `y2Lines` and `y2Bars`, drawn only with one of them; a log scale is for lines alone.","type":"object","properties":{"label":{"description":"The axis title; the field's name by default, none for the row index, an accessor or several y fields.","type":"string"},"step":{"description":"Ticks at the multiples of this, thinned to every k-th when their labels do not fit.","type":"number"},"fit":{"description":"Which series the automatic extent covers: those shown, all of them, or those inside the x window.","enum":["shown","all","window"]},"domain":{"description":"'nice' widens the extent to whole steps, 'data' keeps it exact; `[0, 'nice']` fixes one end and fits the other.","anyOf":[{"enum":["nice","data"]},{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"type":"number"},{"enum":["nice","data"]}],"minItems":2,"items":false},{"type":"array","prefixItems":[{"enum":["nice","data"]},{"type":"number"}],"minItems":2,"items":false}]},"scale":{"description":"'log' spaces equal ratios equally; a value at or below zero is then a gap, and `step` does not apply.","enum":["linear","log"]},"align":{"description":"'zero' puts zero at the same height on y and y2, widening each to take it in; a number given in `domain` is never moved, and both axes must be linear.","const":"zero"}},"additionalProperties":false},"rules":{"description":"Lines across the plot over the data, each `{ x }` or `{ y }` with an optional `text`, `dashed` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"x":{"description":"Where the line stands on the x axis; one not on it is not drawn.","anyOf":[{"type":"string"},{"type":"number"}]}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written beside the line, where it fits.","type":"string"},"dashed":{"description":"Draws the line dashed.","type":"boolean"},"color":{"description":"A CSS colour; the theme's text colour when left out.","type":"string"},"y":{"description":"Where the line lies on the y axis.","type":"number"}},"required":["y"],"additionalProperties":false}]}},"zones":{"description":"Shaded bands under the data, each `{ x: [from, to] }` or `{ y: [from, to] }` with an optional `text` and `color`.","type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"x":{"description":"The band's two edges on the x axis; two categories cover both in full.","type":"array","prefixItems":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"anyOf":[{"type":"string"},{"type":"number"}]}],"minItems":2,"items":false}},"required":["x"],"additionalProperties":false},{"type":"object","properties":{"text":{"description":"Written in the band's top left corner, where it fits.","type":"string"},"color":{"description":"A CSS colour, drawn faint; the theme's muted colour when left out.","type":"string"},"y":{"description":"The band's two edges on the y axis.","type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"minItems":2,"items":false}},"required":["y"],"additionalProperties":false}]}},"brush":{"description":"A drag marks out a range, on x unless `{ axes }` says otherwise; with `zoom`, its release shows the range.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"axes":{"description":"The axes a drag marks out a range on.","enum":["x","y","xy"]}},"additionalProperties":false}]},"colors":{"description":"Series colours in the order `lines`, `bars`, `y2Lines`, `y2Bars`; `palette`, or `paletteDark` on the dark theme, by default.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"The legend, which hides and shows series, or its options; shown with two or more series.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"stack":{"description":"Stacks the bars, not with both `bars` and `y2Bars`; unstacked bars stand side by side.","type":"boolean"},"cumulative":{"description":"Draws each series as its running total in x order, or in the order of the categories for a text x, a missing value adding zero, before stack lays the bars on each other; the tooltip gives the total and then the row's own value.","type":"boolean"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"x":{"description":"The x field, by name or as an accessor `(row, index) => value`; the first field of dates, else of text, else of numbers left, else the row index, when left out.","type":"string"},"lines":{"description":"The field or fields of numbers drawn as lines, by name or accessor.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bars":{"description":"The field or fields of numbers drawn as bars, by name or accessor.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2Lines":{"description":"The field or fields of numbers drawn as lines against a right-hand axis, by name or accessor.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2Bars":{"description":"The field or fields of numbers drawn as bars against a right-hand axis, by name or accessor.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"x":{"description":"The x column; the first column of dates, else of text, else of numbers left, else the row index, when left out.","type":"string"},"lines":{"description":"The column or columns of numbers drawn as lines.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bars":{"description":"The column or columns of numbers drawn as bars.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2Lines":{"description":"The column or columns of numbers drawn as lines against a right-hand axis.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"y2Bars":{"description":"The column or columns of numbers drawn as bars against a right-hand axis.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}}],"unevaluatedProperties":false},"sankey":{"type":"object","properties":{"colors":{"description":"The nodes' colours in the order the links first name them, repeated when there are fewer.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"Not used: the nodes are named on the chart.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"blend":{"description":"Each ribbon runs from the colour of the node it leaves into the colour of the one it reaches.","type":"boolean"},"text":{"description":"Writes the node names beside the nodes.","type":"boolean"}},"anyOf":[{"type":"object","properties":{"data":{"description":"Row objects, one link each, a row without a source or a target dropped; missing, null or empty draws an empty frame.","type":["array","null"],"items":{"type":"object"}},"source":{"description":"The field that names the node each link leaves, by name or as an accessor `(row, index) => value`; the first text field left when left out.","type":"string"},"target":{"description":"The field that names the node each link reaches, by name or accessor; the next text field when left out.","type":"string"},"value":{"description":"The field of numbers the ribbons are as wide as, by name or accessor; the only number field left when left out.","type":"string"}}},{"type":"object","properties":{"data":{"description":"An object of columns, arrays or typed arrays of one length, a link per index, one without a source or a target dropped; missing, null or empty draws an empty frame.","type":["object","null"],"additionalProperties":{"type":"array"}},"source":{"description":"The column that names the node each link leaves; the first text column left when left out.","type":"string"},"target":{"description":"The column that names the node each link reaches; the next text column when left out.","type":"string"},"value":{"description":"The column of numbers the ribbons are as wide as; the only number column left when left out.","type":"string"}}}],"unevaluatedProperties":false},"treemap":{"$defs":{"Nested":{"type":"object","properties":{"name":{"description":"The node's name.","type":"string"},"value":{"description":"The node's size; only a node without children counts.","type":"number"},"children":{"description":"The nodes under this one.","type":"array","items":{"$ref":"#/$defs/treemap/$defs/Nested"}}},"required":["name"],"additionalProperties":false}},"type":"object","properties":{"colors":{"description":"A colour for each root, or for each child of a single root, repeated when there are fewer.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"Not used: the nodes are named on the chart.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"data":{"description":"A root `{ name, value, children }`, or a list of roots, where only a node without children counts by its value; missing, null or empty draws an empty frame.","anyOf":[{"type":"null"},{"$ref":"#/$defs/treemap/$defs/Nested"},{"type":"array","items":{"$ref":"#/$defs/treemap/$defs/Nested"}}]},"text":{"description":"Writes each node's name on it, where there is room.","type":"boolean"},"shade":{"description":"Each branch starts at this opacity, from 0 to 1, at its top and reaches its full colour at the bottom; solid when left out.","type":"number"}},"additionalProperties":false},"sunburst":{"$defs":{"Nested":{"type":"object","properties":{"name":{"description":"The node's name.","type":"string"},"value":{"description":"The node's size; only a node without children counts.","type":"number"},"children":{"description":"The nodes under this one.","type":"array","items":{"$ref":"#/$defs/sunburst/$defs/Nested"}}},"required":["name"],"additionalProperties":false}},"type":"object","properties":{"colors":{"description":"A colour for each root, or for each child of a single root, repeated when there are fewer.","type":"array","items":{"type":"string"}},"theme":{"description":"'auto' follows the CSS `color-scheme` of the chart's element, then a `dark` or `light` marker on `<body>` or `<html>` (a class, `data-theme` and the like), then the system when that `color-scheme` allows both light and dark, else light. A change to those two elements' attributes is followed, and re-reads CSS variables, whatever the theme.","anyOf":[{"enum":["auto","light","dark"]},{"type":"object","properties":{"text":{"type":"string"},"muted":{"type":"string"},"grid":{"type":"string"},"surface":{"type":"string"},"border":{"type":"string"}},"required":["text","muted","grid","surface","border"],"additionalProperties":false}]},"tooltip":{"description":"The hover tooltip, with each value in the format of its axis, else two decimals at most.","type":"boolean"},"legend":{"description":"Not used: the nodes are named on the chart.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"toggle":{"description":"Whether a click, Enter or Space on an entry hides or shows its series; true when left out.","type":"boolean"},"rows":{"description":"Caps the rows of entries, by default at what fits in a third of the chart's height.","type":"number"}},"additionalProperties":false}]},"animate":{"description":"Animation, or its options: marks are revealed on the first paint and move or cross-fade when the data changes.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"duration":{"description":"Milliseconds; nothing animates when it is 0 or not finite.","type":"number"},"enter":{"description":"How marks appear on the first paint: uncovered (the default), from the left, from the top where a mark asks for it, or round the clock in a polar frame; or all at once from transparent.","enum":["reveal","fade"]}},"additionalProperties":false}]},"dim":{"description":"The opacity of everything else while one series, or one part of a single series, is pointed at; `false` leaves it as it is.","anyOf":[{"const":false},{"type":"number"}]},"width":{"description":"Width in CSS pixels; the chart follows its container when it is left out.","type":"number"},"height":{"description":"Height in CSS pixels; the chart follows its container when it is left out.","type":"number"},"margin":{"description":"CSS pixels around the plot area; a side left out is sized from the labels.","type":"object","properties":{"top":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"}},"additionalProperties":false},"description":{"description":"What assistive technology reads for the chart; by default the axis labels and the series names.","type":"string"},"empty":{"description":"Text written in the middle of the frame while there is no data to draw, such as 'No data'.","type":"string"},"hidden":{"description":"The series not drawn, by name; kept by the chart unless given.","type":"array","items":{"type":"string"}},"data":{"description":"A root `{ name, value, children }`, or a list of roots, where only a node without children counts by its value; missing, null or empty draws an empty frame.","anyOf":[{"type":"null"},{"$ref":"#/$defs/sunburst/$defs/Nested"},{"type":"array","items":{"$ref":"#/$defs/sunburst/$defs/Nested"}}]},"text":{"description":"Writes each node's name on it, where there is room.","type":"boolean"},"shade":{"description":"Each branch runs smoothly from its full colour at the centre to this opacity at the rim; lighter ring by ring when left out.","type":"number"}},"additionalProperties":false}}}
@@ -20,6 +20,12 @@ export declare function stack(series: Col[]): {
20
20
  y1: Float64Array<ArrayBuffer>;
21
21
  y2: Float64Array<ArrayBuffer>;
22
22
  }[];
23
+ /**
24
+ * The running total of the values in their order, NaN and missing counting as zero, as in `stack()`.
25
+ * @param values The values to add up.
26
+ * @param out Filled and returned, with its rows past the values left as they are, when it holds at least as many.
27
+ */
28
+ export declare function cumulate(values: Col, out?: Float64Array): Float64Array;
23
29
  /**
24
30
  * The two bounds of one bar per category on a band axis, where category i sits at i.
25
31
  * @param at A count for categories 0 to n - 1, or the indices themselves.
@@ -76,6 +76,19 @@ export function stack(series) {
76
76
  return { y1, y2 };
77
77
  });
78
78
  }
79
+ /**
80
+ * The running total of the values in their order, NaN and missing counting as zero, as in `stack()`.
81
+ * @param values The values to add up.
82
+ * @param out Filled and returned, with its rows past the values left as they are, when it holds at least as many.
83
+ */
84
+ export function cumulate(values, out) {
85
+ const n = values.length;
86
+ const sums = out && out.length >= n ? out : new Float64Array(n);
87
+ let total = 0;
88
+ for (let i = 0; i < n; i++)
89
+ sums[i] = total += values[i] || 0;
90
+ return sums;
91
+ }
79
92
  /**
80
93
  * The two bounds of one bar per category on a band axis, where category i sits at i.
81
94
  * @param at A count for categories 0 to n - 1, or the indices themselves.
package/dist/types.d.ts CHANGED
@@ -186,8 +186,11 @@ export type Resolved = {
186
186
  };
187
187
  /** What x, y and y2 take: a linear axis unless `scale` replaces it, as the axes time(), log(), band() and bare() return do. */
188
188
  export type Axis = {
189
- /** 'nice' widens the extent of the marks' columns to whole steps; 'data' keeps it exact. */
190
- domain: [number, number] | 'nice' | 'data';
189
+ /**
190
+ * 'nice' widens the extent of the marks' columns to whole steps; 'data' keeps it exact. A pair with one number
191
+ * fixes that end and fits the other, as `[0, 'nice']`, on a linear axis only.
192
+ */
193
+ domain: [number, number] | [number, 'nice' | 'data'] | ['nice' | 'data', number] | 'nice' | 'data';
191
194
  /** The axis title; an empty string shows none. */
192
195
  label: string;
193
196
  /**
@@ -275,7 +278,15 @@ export type Options = {
275
278
  * A second y axis, drawn on the right, for the marks given `yAxis: 'y2'`: it takes its extent from
276
279
  * those marks alone. Grid lines come from `y` only. Left out, there is none and every mark is on `y`.
277
280
  */
278
- y2?: Axis;
281
+ y2?: Axis & {
282
+ /**
283
+ * 'zero' puts zero at the same height on y and y2, widening y2, and y where y2 cannot reach, to take it in;
284
+ * with x zoomed, an axis fitted to the window widens and the other stays as shown.
285
+ * It moves no number given in a `domain` and waits while either axis has a window of its own;
286
+ * both axes must be linear.
287
+ */
288
+ align?: 'zero';
289
+ };
279
290
  /**
280
291
  * 'polar' and 'blank' have no axes: a mark is given the plot rectangle only, and reports a hit
281
292
  * as fractions of it, x from the left and y from the bottom. 'polar' is for marks drawn round
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swiftplot",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Small, fast charts on Canvas 2D and WebGL2",
5
5
  "keywords": [
6
6
  "chart",
@@ -33,7 +33,8 @@
33
33
  "./charts": {
34
34
  "types": "./dist/charts/index.d.ts",
35
35
  "default": "./dist/charts/index.js"
36
- }
36
+ },
37
+ "./schema.json": "./dist/schema.json"
37
38
  },
38
39
  "files": [
39
40
  "dist"
@@ -45,7 +46,7 @@
45
46
  "vitest": "^5.1.1"
46
47
  },
47
48
  "scripts": {
48
- "build": "tsc -p tsconfig.build.json",
49
+ "build": "tsc -p tsconfig.build.json && node -e \"const fs = process.getBuiltinModule('fs'); fs.writeFileSync('dist/schema.json', JSON.stringify(JSON.parse(fs.readFileSync('schema.json', 'utf8'))))\"",
49
50
  "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.node.json",
50
51
  "test": "vitest run",
51
52
  "test:import": "node test/import.mjs"