@tabler/charts 0.0.1-alpha.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/dist/{sweep-WSgn2etB.js → arc-BXpLrt9b.cjs} +25 -58
- package/dist/arc-BXpLrt9b.cjs.map +1 -0
- package/dist/{sweep-Duowaput.cjs → arc-a1tRTEw7.js} +2 -93
- package/dist/arc-a1tRTEw7.js.map +1 -0
- package/dist/{area-DaO4MQl4.d.ts → area-CF__HOwL.d.ts} +3 -3
- package/dist/{area-BFvkc-ZM.d.cts → area-DIxaAbYZ.d.cts} +3 -3
- package/dist/area.d.cts +1 -1
- package/dist/area.d.ts +1 -1
- package/dist/{bar-DdsDxk3W.d.ts → bar-BBM8RhoL.d.ts} +2 -2
- package/dist/{bar-a0h9KC8A.d.cts → bar-CRKLDg98.d.cts} +2 -2
- package/dist/bar.d.cts +1 -1
- package/dist/bar.d.ts +1 -1
- package/dist/{candlestick-BnUG1SGi.d.ts → candlestick-D_vV0_XZ.d.ts} +2 -2
- package/dist/{candlestick-BKdPyorY.d.cts → candlestick-__pXl_pV.d.cts} +2 -2
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/{chart-Qa417fJo.d.cts → chart-D7ooEFnk.d.cts} +7 -1
- package/dist/{chart-iJGxMz9z.d.ts → chart-DyN7bcx8.d.ts} +7 -1
- package/dist/{core-plobgBC7.js → core-CegR_j55.js} +16 -7
- package/dist/core-CegR_j55.js.map +1 -0
- package/dist/{core-CnGFKojH.d.cts → core-D1vO1LrC.d.cts} +4 -3
- package/dist/{core-CjgbhS_v.d.ts → core-DcbemzGf.d.ts} +4 -3
- package/dist/{core-C7fPm6t7.cjs → core-RzS9IQO5.cjs} +16 -7
- package/dist/core-RzS9IQO5.cjs.map +1 -0
- package/dist/core.cjs +9 -7
- package/dist/core.d.cts +15 -14
- package/dist/core.d.ts +15 -14
- package/dist/core.js +6 -5
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/{gauge-CEfkWXSu.cjs → gauge-D-FYhuds.cjs} +7 -6
- package/dist/{gauge-CEfkWXSu.cjs.map → gauge-D-FYhuds.cjs.map} +1 -1
- package/dist/{gauge-Cu_OFxBd.d.cts → gauge-DP_EB2z3.d.cts} +2 -2
- package/dist/{gauge-_ljQHrMN.js → gauge-Dh423FHh.js} +3 -2
- package/dist/{gauge-_ljQHrMN.js.map → gauge-Dh423FHh.js.map} +1 -1
- package/dist/{gauge-Cu9jttC0.d.ts → gauge-zpia05t2.d.ts} +2 -2
- package/dist/gauge.cjs +1 -1
- package/dist/gauge.d.cts +1 -1
- package/dist/gauge.d.ts +1 -1
- package/dist/gauge.js +1 -1
- package/dist/{heatmap-PhLPXIg1.d.ts → heatmap-BectCEeE.d.ts} +2 -2
- package/dist/{heatmap-BwS-y0c6.d.cts → heatmap-CCso6m61.d.cts} +2 -2
- package/dist/heatmap.d.cts +1 -1
- package/dist/heatmap.d.ts +1 -1
- package/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -14
- package/dist/index.d.ts +15 -14
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/{line-D5kb8e6w.d.ts → line-CN4uZ9ZX.d.ts} +2 -2
- package/dist/{line-CMDGH6q5.d.cts → line-W7VD_qs1.d.cts} +2 -2
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/parliament-1Zv2Xh0D.d.ts +69 -0
- package/dist/parliament-CpWnoEvG.cjs +308 -0
- package/dist/parliament-CpWnoEvG.cjs.map +1 -0
- package/dist/parliament-DdrLVZwt.d.cts +69 -0
- package/dist/parliament-Dw0sOERi.js +303 -0
- package/dist/parliament-Dw0sOERi.js.map +1 -0
- package/dist/parliament.cjs +3 -0
- package/dist/parliament.d.cts +2 -0
- package/dist/parliament.d.ts +2 -0
- package/dist/parliament.js +2 -0
- package/dist/patterns.d.cts +1 -1
- package/dist/patterns.d.ts +1 -1
- package/dist/{pie-B8UlOZiq.d.ts → pie-5z1fDdKO.d.ts} +2 -2
- package/dist/{pie-DnQQmxkk.d.cts → pie-BF9yI5mE.d.cts} +2 -2
- package/dist/{pie-C1Pa6W_l.cjs → pie-BxTZt6Go.cjs} +9 -8
- package/dist/{pie-C1Pa6W_l.cjs.map → pie-BxTZt6Go.cjs.map} +1 -1
- package/dist/{pie-RnMTQWMS.js → pie-DzUXDTcn.js} +3 -2
- package/dist/{pie-RnMTQWMS.js.map → pie-DzUXDTcn.js.map} +1 -1
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +1 -1
- package/dist/pie.d.ts +1 -1
- package/dist/pie.js +1 -1
- package/dist/point-shapes.d.cts +1 -1
- package/dist/point-shapes.d.ts +1 -1
- package/dist/{radar-pFI6fvOq.d.ts → radar-1-EryihA.d.ts} +2 -2
- package/dist/{radar-BB13CGmq.d.cts → radar-DBW4O0Vt.d.cts} +2 -2
- package/dist/radar.d.cts +1 -1
- package/dist/radar.d.ts +1 -1
- package/dist/{sankey-B9JYnx7e.d.cts → sankey-DuGI3Qc5.d.cts} +2 -2
- package/dist/{sankey-Bm518bqL.d.ts → sankey-OV_WoPrl.d.ts} +2 -2
- package/dist/sankey.d.cts +1 -1
- package/dist/sankey.d.ts +1 -1
- package/dist/{scatter-Bl7nasE6.d.ts → scatter-BqzgJqdX.d.ts} +2 -2
- package/dist/{scatter-DrJ8xYz4.d.cts → scatter-DbxLyZX0.d.cts} +2 -2
- package/dist/scatter.d.cts +1 -1
- package/dist/scatter.d.ts +1 -1
- package/dist/{sparkline-iWuXbKpd.d.ts → sparkline-BfyO_oNM.d.ts} +2 -2
- package/dist/{sparkline-BG13V4Pz.d.cts → sparkline-CWlJDKyh.d.cts} +2 -2
- package/dist/sparkline.d.cts +1 -1
- package/dist/sparkline.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/sweep-CbfR7--d.js +60 -0
- package/dist/sweep-CbfR7--d.js.map +1 -0
- package/dist/sweep-DaTEDDuC.cjs +71 -0
- package/dist/sweep-DaTEDDuC.cjs.map +1 -0
- package/dist/value-labels.d.cts +1 -1
- package/dist/value-labels.d.ts +1 -1
- package/package.json +11 -1
- package/dist/core-C7fPm6t7.cjs.map +0 -1
- package/dist/core-plobgBC7.js.map +0 -1
- package/dist/sweep-Duowaput.cjs.map +0 -1
- package/dist/sweep-WSgn2etB.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-CegR_j55.js","names":[],"sources":["../src/plugins/download.ts","../src/components/hover.ts","../src/plugins/pointer.ts","../src/plugins/highlight.ts","../src/a11y.ts","../src/plugins/keyboard.ts","../src/plugins/legend.ts","../src/plugins/sync.ts","../src/idle.ts","../src/plugins/table.ts","../src/tooltip.ts","../src/plugins/tooltip.ts","../src/plugins/index.ts","../package.json","../src/core.ts"],"sourcesContent":["import { feature } from '../features.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { h } from '../vnode.ts'\n\n/** A file format of the download menu. */\nexport type DownloadFormat = 'png' | 'svg' | 'jpeg' | 'webp'\n\n/** The `download` option as an object. */\nexport interface DownloadMenuOptions {\n /** Formats offered, in this order. Defaults to `['png', 'svg']`. */\n formats?: readonly DownloadFormat[]\n /** File name without the extension. Defaults to the chart's title, or `chart`. */\n filename?: string\n /** Accessible name of the menu button. Defaults to `'Download'`. */\n label?: string\n /**\n * Background color, `'auto'` for the chart's surface (`--tc-surface`), or\n * `false` for none (transparent). Defaults to `'auto'`.\n */\n background?: string | false\n /** Draw the legend into the file. Defaults to `true`. */\n legend?: boolean\n /** Pixels per chart pixel in images. Defaults to `2`. */\n scale?: number\n}\n\n/** The `download` option: on, a list of formats, or the options. */\nexport type DownloadOption = boolean | readonly DownloadFormat[] | DownloadMenuOptions\n\nconst NAMES: Record<DownloadFormat, string> = { png: 'PNG', svg: 'SVG', jpeg: 'JPEG', webp: 'WebP' }\nconst DEFAULT_FORMATS: readonly DownloadFormat[] = ['png', 'svg']\n\nfunction resolve(option: DownloadOption): DownloadMenuOptions {\n return option === true\n ? {}\n : Array.isArray(option)\n ? { formats: option }\n : (option as DownloadMenuOptions)\n}\n\n/**\n * A download menu in the chart's corner (`.tc-download`): a button that opens\n * a list of file formats, PNG and SVG by default. Shown with the `download`\n * option. The files come from `@tabler/charts/export`, which must be imported\n * (the chart says so otherwise): that way charts without a download never\n * carry the export code.\n */\nexport function download(): ChartPlugin {\n return {\n name: 'download',\n install(chart) {\n const host = chart.element\n const doc = host.ownerDocument\n let el: HTMLElement | undefined\n let options: DownloadMenuOptions = {}\n // The menu overlays the chart: the container is the positioning context.\n const addedClass = !host.classList.contains('tc-container')\n\n const toggle = () => el?.querySelector<HTMLElement>('.tc-download-toggle')\n const menu = () => el?.querySelector<HTMLElement>('.tc-download-menu')\n const items = () => Array.from(el?.querySelectorAll<HTMLElement>('.tc-download-item') ?? [])\n\n const setOpen = (open: boolean) => {\n const list = menu()\n if (!list) return\n list.hidden = !open\n toggle()?.setAttribute('aria-expanded', String(open))\n if (open) doc.addEventListener('pointerdown', onOutside, true)\n else doc.removeEventListener('pointerdown', onOutside, true)\n }\n const isOpen = () => menu()?.hidden === false\n\n const onOutside = (event: Event) => {\n if (!el?.contains(event.target as Node)) setOpen(false)\n }\n\n const onClick = (event: Event) => {\n const target = event.target as Element\n if (target.closest('.tc-download-toggle')) {\n setOpen(!isOpen())\n if (isOpen()) items()[0]?.focus()\n return\n }\n const format = target.closest('.tc-download-item')?.getAttribute('data-format')\n if (!format) return\n setOpen(false)\n toggle()?.focus()\n void feature('export')(chart, { ...options, format: format as DownloadFormat })\n }\n\n const onKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen()) {\n event.preventDefault()\n setOpen(false)\n toggle()?.focus()\n return\n }\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return\n const list = items()\n if (!list.length) return\n event.preventDefault()\n if (!isOpen()) setOpen(true)\n const at = list.indexOf(doc.activeElement as HTMLElement)\n const step = event.key === 'ArrowDown' ? 1 : -1\n list[(at + step + list.length) % list.length]?.focus()\n }\n\n // Tabbing out of the menu closes it.\n const onBlur = (event: FocusEvent) => {\n if (!el?.contains(event.relatedTarget as Node)) setOpen(false)\n }\n\n const remove = () => {\n if (!el) return\n setOpen(false)\n render(el, null)\n el.remove()\n el = undefined\n if (addedClass) host.classList.remove('tc-container')\n }\n\n return {\n afterRender({ config, changed }) {\n const option = config.download\n if (!option || typeof document === 'undefined') {\n remove()\n return\n }\n // Resizing and hovering change nothing in the menu.\n if (!changed && el?.isConnected) return\n // Fail early, at render, when the export entry is not imported.\n feature('export')\n options = resolve(option)\n const formats = options.formats?.length ? options.formats : DEFAULT_FORMATS\n if (!el) {\n el = doc.createElement('div')\n el.className = 'tc-download'\n el.addEventListener('click', onClick)\n el.addEventListener('keydown', onKey)\n el.addEventListener('focusout', onBlur)\n }\n render(\n el,\n h(\n 'div',\n { class: 'tc-download-box' },\n h(\n 'button',\n {\n type: 'button',\n class: 'tc-download-toggle',\n 'aria-label': options.label ?? 'Download',\n 'aria-haspopup': 'menu',\n 'aria-expanded': 'false',\n },\n h(\n 'svg',\n {\n viewBox: '0 0 24 24',\n width: '16',\n height: '16',\n 'aria-hidden': 'true',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': '2',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n },\n h('path', {\n d: 'M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12',\n }),\n ),\n ),\n h(\n 'div',\n { class: 'tc-download-menu', role: 'menu', hidden: '' },\n formats.map((format) =>\n h(\n 'button',\n {\n key: format,\n type: 'button',\n role: 'menuitem',\n class: 'tc-download-item',\n 'data-format': format,\n },\n NAMES[format] ?? format,\n ),\n ),\n ),\n ),\n )\n host.classList.add('tc-container')\n if (!el.isConnected) host.appendChild(el)\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { Hit } from '../interaction.ts'\nimport { round } from '../layout.ts'\nimport { h, type VNode } from '../vnode.ts'\n\n/** Series wrapper so hover marks pick up the series color from CSS. */\nfunction seriesGroup(seriesIndex: number, color: string | undefined, child: VNode): VNode {\n return h(\n 'g',\n {\n key: seriesIndex,\n class: ['tc-series', `tc-series-${seriesIndex + 1}`],\n style: { '--tc-series-color': color },\n },\n child,\n )\n}\n\n/**\n * Hover marks drawn below the series: a band behind the hovered category of\n * band charts (bars), or a vertical crosshair for point charts (lines).\n */\nexport function hoverUnderlay(hit: Hit, crosshair = true): VNode {\n const { area } = hit\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n hit.mark\n ? null\n : hit.band\n ? h('rect', {\n class: 'tc-hover-band',\n x: round(hit.band.x),\n y: round(hit.band.y),\n width: round(hit.band.width),\n height: round(hit.band.height),\n })\n : crosshair &&\n h(\n 'line',\n hit.guide\n ? {\n class: 'tc-crosshair',\n x1: round(hit.guide.x1),\n x2: round(hit.guide.x2),\n y1: round(hit.guide.y1),\n y2: round(hit.guide.y2),\n }\n : {\n class: 'tc-crosshair',\n x1: round(hit.x),\n x2: round(hit.x),\n y1: round(area.y),\n y2: round(area.y + area.height),\n },\n ),\n )\n}\n\n/**\n * Hover marks drawn above the series: the hit's own mark (pie slices), or\n * an active dot on every point of point charts (of the series' `shape`, if given).\n */\nexport function hoverOverlay(\n hit: Hit,\n radius = 4,\n shape?: (slot: number, x: number, y: number, r: number) => string,\n): VNode {\n const { mark } = hit\n if (mark) {\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n item &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n h('path', {\n class: 'tc-hover-mark',\n d: mark.d,\n style: `transform:translate(${round(mark.x)}px,${round(mark.y)}px)`,\n }),\n ),\n )\n }\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n !hit.band &&\n hit.items.map(\n (item) =>\n item.y !== null &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n shape\n ? h('path', {\n class: 'tc-point tc-point-active tc-marker',\n d: shape(item.seriesIndex, item.x, item.y, radius),\n })\n : h('circle', {\n class: 'tc-point tc-point-active',\n cx: round(item.x),\n cy: round(item.y),\n r: radius,\n }),\n ),\n ),\n )\n}\n","import type { Chart } from '../chart.ts'\nimport { toChartPoint } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\nconst listening = /* @__PURE__ */ new WeakSet<object>()\n\n/**\n * Turn pointer input on the chart's element into highlights and `hover` /\n * `click` events (once per chart, however many plugins ask). Returns the\n * function that stops listening, or nothing when already listening.\n */\nexport function listenPointer(chart: Chart<object>): (() => void) | undefined {\n const el = chart.element\n if (listening.has(chart) || typeof el.addEventListener !== 'function') return undefined\n listening.add(chart)\n const local = (event: MouseEvent) => {\n const svg = el.querySelector('svg.tc-chart')\n if (!svg) return undefined\n const { width, height } = chart.size\n return toChartPoint(svg, event.clientX, event.clientY, width, height)\n }\n // Controls laid over the chart (the download menu) are not the chart:\n // hovering them clears the highlight, so the tooltip never covers them.\n const overControl = (event: Event) =>\n !!(event.target as Element | null)?.closest?.('.tc-download')\n const onLeave = (event: PointerEvent) => {\n // On touch, keep the last highlight after the finger lifts.\n if (event.pointerType !== 'touch' && chart.highlightSource === 'pointer') {\n chart.clearHighlight(event)\n }\n }\n const onMove = (event: PointerEvent) => {\n if (overControl(event)) {\n onLeave(event)\n return\n }\n const point = local(event)\n if (point) chart.highlightAt(point.x, point.y, event)\n }\n const onClick = (event: MouseEvent) => {\n if (overControl(event)) return\n const point = local(event)\n const hit = point ? chart.hitTest(point.x, point.y) : null\n if (hit) chart.emit('click', { hit, event })\n }\n el.addEventListener('pointermove', onMove as EventListener)\n el.addEventListener('pointerdown', onMove as EventListener)\n el.addEventListener('pointerleave', onLeave as EventListener)\n el.addEventListener('click', onClick as EventListener)\n return () => {\n listening.delete(chart)\n el.removeEventListener('pointermove', onMove as EventListener)\n el.removeEventListener('pointerdown', onMove as EventListener)\n el.removeEventListener('pointerleave', onLeave as EventListener)\n el.removeEventListener('click', onClick as EventListener)\n }\n}\n\n/**\n * Pointer input: hovering highlights what is under the pointer and emits\n * `hover`, clicking emits `click`. The highlight and tooltip plugins turn it\n * on themselves; add it to a bare `Chart` that only needs the events.\n */\nexport function pointer(): ChartPlugin {\n return {\n name: 'pointer',\n install(chart) {\n const stop = listenPointer(chart)\n return stop ? { destroy: stop } : {}\n },\n }\n}\n","import { markerShape } from '../charts/cartesian.ts'\nimport { hoverOverlay, hoverUnderlay } from '../components/hover.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Draws the highlighted category: a crosshair (or a band behind bars) under\n * the series and active dots above them. `crosshair: false` keeps the dots.\n */\nexport function highlight(): ChartPlugin {\n return {\n name: 'highlight',\n install(chart) {\n const stop = listenPointer(chart)\n return {\n layers: (hit, config) => ({\n under: hoverUnderlay(hit, config.crosshair !== false),\n over: hoverOverlay(hit, 4, markerShape(config)),\n }),\n ...(stop ? { destroy: stop } : {}),\n }\n },\n }\n}\n","import type { Hit } from './interaction.ts'\nimport { h, type VNode } from './vnode.ts'\n\n/** The data behind a chart as text: header cells and one row per category. */\nexport interface DataTable {\n /** Column headers; the first one labels the row headers (may be empty). */\n columns: string[]\n /** Rows of display text; the first cell of each row is its header. */\n rows: string[][]\n /** Total number of rows when `rows` was cut to a limit. */\n total?: number\n}\n\n/**\n * An HTML table of the chart data, for screen readers (visually hidden by\n * default) or as a visible fallback. Every cell is text, escaped by the renderer.\n */\nexport function tableContent(table: DataTable, caption?: string): VNode {\n const [corner = '', ...headers] = table.columns\n return h(\n 'table',\n { class: 'tc-table' },\n caption && h('caption', null, caption),\n h(\n 'thead',\n null,\n h(\n 'tr',\n null,\n h('th', { scope: 'col' }, corner),\n headers.map((name, i) => h('th', { key: i, scope: 'col' }, name)),\n ),\n ),\n h(\n 'tbody',\n null,\n table.rows.map(([head = '', ...cells], i) =>\n h(\n 'tr',\n { key: i },\n h('th', { scope: 'row' }, head),\n cells.map((cell, j) => h('td', { key: j }, cell)),\n ),\n ),\n ),\n )\n}\n\n/** Short sentence describing a hit, announced during keyboard navigation. */\nexport function describeHit(hit: Hit): string {\n const items =\n hit.seriesIndex === undefined\n ? hit.items\n : hit.items.filter((item) => item.seriesIndex === hit.seriesIndex)\n const values = items.map((item) => `${item.name} ${item.text}`).join(', ')\n return hit.title ? `${hit.title}: ${values}` : values\n}\n","import { describeHit } from '../a11y.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/**\n * Keyboard navigation: the SVG becomes focusable; arrow keys walk\n * categories, Up/Down walk series, Home/End jump, Escape (or leaving)\n * clears. Every step is announced through a polite live region.\n */\n/** The config's `keyboard` option, else the chart type's default, else on. */\nconst enabled = (config: { keyboard?: boolean; type: { keyboard?: boolean } }): boolean =>\n config.keyboard ?? config.type.keyboard ?? true\n\nexport function keyboard(): ChartPlugin {\n return {\n name: 'keyboard',\n install(chart) {\n const host = chart.element\n let live: HTMLElement | undefined\n\n /**\n * The live region, added when the chart takes focus: screen readers only\n * announce changes of a region that was already there, so one created\n * with its first message would stay silent for that message.\n */\n const region = (): HTMLElement => {\n if (!live) {\n live = host.ownerDocument.createElement('div')\n live.className = 'tc-sr-only'\n live.setAttribute('aria-live', 'polite')\n live.setAttribute('aria-atomic', 'true')\n host.appendChild(live)\n }\n return live\n }\n const announce = (text: string) => {\n region().textContent = text\n }\n\n const go = (index: number, seriesIndex?: number) => {\n const hit = chart.highlightIndex(index, seriesIndex)\n if (hit) announce(describeHit(hit))\n }\n\n /** Returns whether the key was handled. */\n const handle = (key: string): boolean => {\n const interaction = chart.interaction\n if (!interaction || interaction.count === 0) return false\n const current = chart.highlightSource === 'index' ? chart.active : null\n const last = interaction.count - 1\n const index = current?.index\n const focused = current?.seriesIndex\n const series = current?.items.map((item) => item.seriesIndex) ?? []\n const at = focused === undefined ? -1 : series.indexOf(focused)\n\n switch (key) {\n case 'ArrowRight':\n go(index === undefined ? 0 : Math.min(last, index + 1), focused)\n return true\n case 'ArrowLeft':\n go(index === undefined ? last : Math.max(0, index - 1), focused)\n return true\n case 'Home':\n go(0, focused)\n return true\n case 'End':\n go(last, focused)\n return true\n case 'ArrowDown':\n case 'ArrowUp': {\n if (index === undefined || series.length === 0) {\n go(0)\n return true\n }\n const step = key === 'ArrowDown' ? 1 : -1\n const next = at === -1 ? (step > 0 ? 0 : series.length - 1) : at + step\n go(index, next < 0 || next >= series.length ? undefined : series[next])\n return true\n }\n case 'Escape':\n if (!current) return false\n chart.clearHighlight()\n return true\n default:\n return false\n }\n }\n\n const isChart = (target: EventTarget | null) =>\n (target as Element | null)?.matches?.('svg.tc-chart') === true\n const onKey = (event: Event) => {\n const { key } = event as KeyboardEvent\n if (!enabled(chart.config) || !isChart(event.target)) return\n if (handle(key)) event.preventDefault()\n }\n const onBlur = (event: Event) => {\n if (isChart(event.target) && chart.highlightSource === 'index') chart.clearHighlight()\n }\n const onFocus = (event: Event) => {\n if (enabled(chart.config) && isChart(event.target)) region()\n }\n host.addEventListener('keydown', onKey)\n host.addEventListener('focusin', onFocus)\n host.addEventListener('focusout', onBlur)\n\n return {\n svgAttrs: (config) => (enabled(config) ? { tabindex: 0 } : undefined),\n destroy() {\n host.removeEventListener('keydown', onKey)\n host.removeEventListener('focusin', onFocus)\n host.removeEventListener('focusout', onBlur)\n live?.remove()\n },\n }\n },\n }\n}\n","import { legendContent } from '../legend.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/**\n * An HTML legend (`.tc-legend`) with toggle buttons, above or below the SVG.\n * Shown for two or more entries unless the `legend` option says otherwise.\n */\nexport function legend(): ChartPlugin {\n return {\n name: 'legend',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered legend instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-legend') ?? undefined\n let adopt = el?.firstElementChild ?? null\n let bound = false\n const onClick = (event: Event) => {\n const button = (event.target as Element).closest?.('.tc-legend-item')\n const key = button?.getAttribute('data-key')\n if (key != null) chart.toggleSeries(key)\n }\n\n const remove = () => {\n if (!el) return\n render(el, null)\n el.removeEventListener('click', onClick)\n bound = false\n el.remove()\n el = undefined\n }\n\n /** Keep the legend right before or after the SVG, whatever else lives in the container. */\n const place = () => {\n if (!el) return\n const svg = host.querySelector(':scope > svg.tc-chart')\n if (el.dataset.position === 'bottom') {\n if (!svg) {\n if (!el.isConnected) host.appendChild(el)\n } else if (svg.nextElementSibling !== el) {\n svg.after(el)\n }\n } else if (!el.isConnected || el.nextElementSibling !== svg) {\n host.insertBefore(el, svg ?? host.firstChild)\n }\n }\n\n return {\n beforeRender({ legend, hidden }) {\n if (!legend.show || typeof document === 'undefined') {\n remove()\n return\n }\n if (!el) {\n el = host.ownerDocument.createElement('div')\n el.className = 'tc-legend'\n }\n if (!bound) {\n el.addEventListener('click', onClick)\n bound = true\n }\n el.dataset.position = legend.position\n render(el, legendContent(legend.items, hidden), adopt)\n adopt = null\n place()\n },\n // With its margin: the gap to the chart is taken from the container too.\n reservedHeight() {\n if (!el?.isConnected) return 0\n const { marginTop, marginBottom } = getComputedStyle(el)\n return (\n el.offsetHeight +\n (Number.parseFloat(marginTop) || 0) +\n (Number.parseFloat(marginBottom) || 0)\n )\n },\n afterRender: place,\n destroy: remove,\n }\n },\n }\n}\n","import type { Chart } from '../chart.ts'\nimport type { Interaction } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/** Charts by `sync` group, held weakly: a chart taken out without destroy() is let go. */\nconst groups = /* @__PURE__ */ new Map<string, Set<WeakRef<Chart<object>>>>()\n\n/** The index of each category label, per render of a chart. */\nconst indexes = /* @__PURE__ */ new WeakMap<Interaction, Map<string | number, number>>()\n\n/** Set while a highlight is passed on, so the charts it reaches do not pass it on again. */\nlet passing = false\n\n/** The index of the category with `label` in a chart's current render, if it has one. */\nfunction indexOf(interaction: Interaction, label: string | number): number | undefined {\n let index = indexes.get(interaction)\n if (!index) {\n index = new Map()\n for (let i = 0; i < interaction.count; i++) {\n const hit = interaction.hitIndex(i)\n if (hit && !index.has(hit.label)) index.set(hit.label, i)\n }\n indexes.set(interaction, index)\n }\n return index.get(label)\n}\n\n/**\n * Shared hover across charts: charts with the same `sync` group highlight\n * the category under the pointer in any of them (with its crosshair and\n * tooltip), matched by label, and clear together when it leaves. Keyboard\n * highlights stay in their own chart.\n */\nexport function sync(): ChartPlugin {\n return {\n name: 'sync',\n install(chart) {\n const self = new WeakRef(chart)\n let group: Set<WeakRef<Chart<object>>> | undefined\n /** The name of the group joined: the config may have moved on before the next render. */\n let joined: string | undefined\n /** Leave the group, and take it off the list when it is empty. */\n const leave = () => {\n group?.delete(self)\n if (joined && group?.size === 0 && groups.get(joined) === group) groups.delete(joined)\n }\n /** Join the group of the current config, leaving the one before. */\n const join = () => {\n const name = chart.config.sync\n const next = name ? (groups.get(name) ?? new Set()) : undefined\n if (next === group) return\n leave()\n if (name && next) {\n next.add(self)\n groups.set(name, next)\n }\n group = next\n joined = name\n }\n join()\n const off = chart.on('hover', ({ hit }) => {\n // Only the pointer leads; keyboard highlights and highlights passed on do not.\n if (passing || !group || (hit && chart.highlightSource !== 'pointer')) return\n passing = true\n try {\n for (const ref of group) {\n const other = ref.deref()\n if (!other) group.delete(ref)\n if (!other || other === chart) continue\n const index = hit && other.interaction && indexOf(other.interaction, hit.label)\n if (index === undefined || index === null) other.clearHighlight()\n else other.highlightIndex(index)\n }\n } finally {\n passing = false\n }\n })\n return {\n afterRender: join,\n destroy() {\n off()\n leave()\n },\n }\n },\n }\n}\n","/**\n * Work that can wait until the browser is idle, such as hidden data tables:\n * it runs in an idle callback (within a second at the latest), or with\n * `flush()`. A module of its own, so charts without such work do not ship it.\n */\nimport { flushHooks, run } from './scheduler.ts'\n\nconst idle = /* @__PURE__ */ new Map<object, () => void>()\nlet pending = false\n\nfunction drain(): number {\n pending = false\n let count = 0\n while (idle.size > 0) {\n const tasks = Array.from(idle.values())\n idle.clear()\n for (const task of tasks) {\n run(task)\n count++\n }\n }\n return count\n}\n\n/** Run `task` once the browser is idle, replacing any idle task already queued for `key`. */\nexport function scheduleIdle(key: object, task: () => void): void {\n flushHooks.idle = drain\n idle.set(key, task)\n if (pending) return\n pending = true\n if (typeof requestIdleCallback === 'function') requestIdleCallback(drain, { timeout: 1000 })\n else setTimeout(drain, 100)\n}\n\n/** Drop the idle task queued for `key`, if any. */\nexport function cancelIdle(key: object): void {\n idle.delete(key)\n}\n","import { tableContent } from '../a11y.ts'\nimport { type ChartConfig, renderContext, type Size } from '../chart.ts'\nimport { getNumberFormat } from '../format.ts'\nimport { cancelIdle, scheduleIdle } from '../idle.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/**\n * The chart data as an HTML table next to the SVG: visually hidden for\n * screen readers by default, visible with `table: 'visible'`.\n */\nconst DEFAULT_MAX_ROWS = 1000\n\nexport function dataTable(): ChartPlugin {\n return {\n name: 'table',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered table instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-table-wrap') ?? undefined\n let adopt = el?.firstElementChild ?? null\n\n /** The table option of the last table, to tell its changes from new data. */\n let shown: unknown\n const key = {}\n\n const remove = () => {\n cancelIdle(key)\n if (!el) return\n render(el, null)\n el.remove()\n el = undefined\n }\n\n const update = (config: ChartConfig<object>, size: Size, hidden: ReadonlySet<string>) => {\n const option = config.table ?? true\n const maxRows =\n typeof option === 'object' && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS\n const table =\n option !== false && typeof document !== 'undefined'\n ? config.type.table?.(\n config,\n renderContext(config, size, chart.id, () => {}, hidden, chart.fontSize),\n maxRows,\n )\n : undefined\n if (!table) {\n remove()\n return\n }\n const visible =\n option === 'visible' || (typeof option === 'object' && option.visible === true)\n // Huge tables help nobody and cost real time to build; keep the first rows.\n let caption = config.title\n const total = table.total ?? table.rows.length\n const rows =\n table.rows.length > maxRows\n ? { columns: table.columns, rows: table.rows.slice(0, maxRows) }\n : table\n if (total > rows.rows.length) {\n const n = getNumberFormat(config.locale)\n const note = `${n.format(rows.rows.length)} of ${n.format(total)} rows`\n caption = caption ? `${caption} (${note})` : note\n }\n if (!el) el = host.ownerDocument.createElement('div')\n el.className = visible ? 'tc-table-wrap' : 'tc-table-wrap tc-sr-only'\n render(el, tableContent(rows, caption), adopt)\n adopt = null\n const svg = host.querySelector(':scope > svg.tc-chart')\n const bottomLegend = host.querySelector(':scope > .tc-legend[data-position=\"bottom\"]')\n const after = bottomLegend ?? svg\n if (after && after.nextElementSibling !== el) after.after(el)\n else if (!el.isConnected) host.appendChild(el)\n }\n\n return {\n afterRender({ config, size, hidden, changed }) {\n // Resizing changes nothing in the table.\n if (!changed && el?.isConnected) return\n const option = config.table ?? true\n const same = shown === option\n shown = option\n // A hidden table only serves screen readers: rebuilding thousands of\n // cells for new data can wait until the browser is idle instead of\n // delaying the frame that animates the chart. The first table, visible\n // ones and changes of the table option itself are built right away.\n if (same && el?.isConnected && el.classList.contains('tc-sr-only')) {\n scheduleIdle(key, () => update(config, size, hidden))\n } else {\n cancelIdle(key)\n update(config, size, hidden)\n }\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { Hit } from './interaction.ts'\nimport { type ChildInput, h, type VNode } from './vnode.ts'\n\n/**\n * Where a tooltip for `hit` belongs, in chart pixels: the pointer when it\n * drives the highlight, otherwise the focused value (keyboard).\n */\nexport function hitAnchor(hit: Hit, pointer?: { x: number; y: number }): { x: number; y: number } {\n if (pointer) return pointer\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n if (hit.guide && item?.y != null) return { x: item.x, y: item.y }\n if (hit.axis === 'y') return { x: item?.x ?? hit.x, y: hit.y ?? hit.area.y }\n return { x: hit.x, y: item?.y ?? hit.area.y + hit.area.height / 2 }\n}\n\nexport interface TooltipOptions {\n /**\n * Colors of the tooltip: `'dark'` (the default) is a dark box with light\n * text, `'light'` a white one with dark text. Both keep their colors in\n * dark mode; the `--tc-tooltip-*` tokens tune them.\n */\n theme?: 'dark' | 'light'\n /**\n * Custom content for a hit: VNodes built with `h()` or plain text.\n * Rendered safely (no HTML parsing), inside `.tc-tooltip`.\n */\n format?: (hit: Hit) => ChildInput\n /** Extra content below the default rows (e.g. a total), in `.tc-tooltip-footer`. */\n footer?: (hit: Hit) => ChildInput\n}\n\n/** Default tooltip content: the category title and one row per series. */\nexport function tooltipContent(hit: Hit, options: TooltipOptions = {}): VNode {\n const body: ChildInput = options.format\n ? options.format(hit)\n : [\n hit.title && h('div', { class: 'tc-tooltip-title' }, hit.title),\n hit.items.map((item) =>\n h(\n 'div',\n {\n key: item.seriesIndex,\n class: [\n 'tc-tooltip-item',\n 'tc-series',\n `tc-series-${item.seriesIndex + 1}`,\n hit.seriesIndex === item.seriesIndex && 'tc-tooltip-item-active',\n ],\n style: { '--tc-series-color': item.color },\n },\n h('span', { class: 'tc-tooltip-swatch' }),\n h('span', { class: 'tc-tooltip-name' }, item.name),\n h('span', { class: 'tc-tooltip-value' }, item.text),\n ),\n ),\n options.footer && h('div', { class: 'tc-tooltip-footer' }, options.footer(hit)),\n ]\n return h('div', { class: 'tc-tooltip-content' }, body)\n}\n\nexport interface TooltipPlacement {\n x: number\n y: number\n side: 'left' | 'right'\n}\n\n/**\n * Place a `width × height` tooltip next to an anchor within `bounds` (from\n * `bounds.x`, `bounds.y`, 0 by default): right of the anchor, or left when it\n * would overflow, vertically centered on the pointer and clamped.\n */\nexport function placeTooltip(\n anchor: { x: number; y: number },\n size: { width: number; height: number },\n bounds: { x?: number; y?: number; width: number; height: number },\n offset = 12,\n): TooltipPlacement {\n const { x: left = 0, y: top = 0 } = bounds\n const fitsRight = anchor.x + offset + size.width <= left + bounds.width\n const fitsLeft = anchor.x - offset - size.width >= left\n const side = fitsRight || !fitsLeft ? 'right' : 'left'\n const rawX = side === 'right' ? anchor.x + offset : anchor.x - offset - size.width\n const x = Math.max(left, Math.min(rawX, left + bounds.width - size.width))\n const y = Math.max(top, Math.min(anchor.y - size.height / 2, top + bounds.height - size.height))\n return { x: Math.round(x), y: Math.round(y), side }\n}\n","import type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { schedule } from '../scheduler.ts'\nimport { hitAnchor, placeTooltip, tooltipContent } from '../tooltip.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Where a tooltip in `el` can show without being cut off: the box of the\n * nearest element that clips its overflow (`el` itself, an ancestor, across\n * shadow roots), within the viewport.\n */\nfunction room(el: Element): { left: number; top: number; right: number; bottom: number } {\n let left = 0\n let top = 0\n let right = innerWidth\n let bottom = innerHeight\n for (let node: Element | null = el; node; ) {\n const style = getComputedStyle(node)\n if (style.overflowX !== 'visible' || style.overflowY !== 'visible') {\n const box = node.getBoundingClientRect()\n left = Math.max(left, box.left)\n top = Math.max(top, box.top)\n right = Math.min(right, box.right)\n bottom = Math.min(bottom, box.bottom)\n break\n }\n node = node.parentElement ?? ((node.getRootNode() as ShadowRoot).host || null)\n }\n return { left, top, right, bottom }\n}\n\n/** Tooltips to place: each measures where it goes, and returns what moves it there. */\nconst waiting: (() => (() => void) | undefined)[] = []\n\n/**\n * Place the waiting tooltips, in the frame that rendered their charts: all\n * are measured before any is moved, so the page is laid out once for the\n * frame. Measured and moved one by one, twelve charts sharing a hover laid\n * the page out twelve times.\n */\nfunction placeAll(): void {\n for (const move of waiting.splice(0).map((measure) => measure())) move?.()\n}\n\n/**\n * An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next\n * to it inside the chart element. Configure it with the `tooltip` option;\n * `theme: 'light'` adds `.tc-tooltip-light` for the white variant.\n */\nexport function tooltip(): ChartPlugin {\n return {\n name: 'tooltip',\n install(chart) {\n const stop = listenPointer(chart)\n const el = chart.element as HTMLElement\n // Positioning context for the tooltip (zero specificity in CSS, so page styles win).\n const addedClass = !el.classList.contains('tc-container')\n el.classList.add('tc-container')\n let tip: HTMLElement | undefined\n /** Counts the renders, so a placement still waiting knows when it is out of date. */\n let turns = 0\n\n return {\n afterRender() {\n const option = chart.config.tooltip\n const hit = chart.active\n const anchor = hit && hitAnchor(hit, chart.pointer)\n if (\n option === false ||\n typeof document === 'undefined' ||\n !hit ||\n !anchor ||\n !Number.isFinite(anchor.x) ||\n !Number.isFinite(anchor.y)\n ) {\n turns++\n tip?.removeAttribute('data-visible')\n return\n }\n if (!tip) {\n tip = el.ownerDocument.createElement('div')\n tip.className = 'tc-tooltip'\n tip.setAttribute('aria-hidden', 'true')\n el.appendChild(tip)\n }\n const options = typeof option === 'object' ? option : undefined\n tip.classList.toggle('tc-tooltip-light', options?.theme === 'light')\n render(tip, tooltipContent(hit, options))\n\n // Placed with the tooltips of the other charts of this frame (see placeAll).\n const shown = tip\n const turn = ++turns\n waiting.push(() => {\n const svg = el.querySelector('svg.tc-chart')\n // A later render of this chart, or its end, overtook this one.\n if (!svg || turn !== turns) return undefined\n const { width, height } = chart.size\n const box = el.getBoundingClientRect()\n const rect = svg.getBoundingClientRect()\n // Screen pixels per pixel of the container (transformed or zoomed ancestors).\n const k = box.width > 0 && el.offsetWidth > 0 ? box.width / el.offsetWidth : 1\n const sx = rect.width > 0 ? rect.width / width / k : 1\n const sy = rect.height > 0 ? rect.height / height / k : 1\n const origin = {\n x: (rect.left - box.left) / k - el.clientLeft,\n y: (rect.top - box.top) / k - el.clientTop,\n }\n // Snap to the category, follow the pointer along the values\n // (a radar spoke runs both ways, so there it follows the pointer).\n const ax = hit.axis === 'y' || hit.guide ? anchor.x : hit.x\n const ay = hit.axis === 'y' ? (hit.y ?? anchor.y) : anchor.y\n // The tooltip may leave the container, up to what would cut it off.\n const clip = room(el)\n const place = placeTooltip(\n { x: origin.x + ax * sx, y: origin.y + ay * sy },\n { width: shown.offsetWidth, height: shown.offsetHeight },\n {\n x: (clip.left - box.left) / k - el.clientLeft,\n y: (clip.top - box.top) / k - el.clientTop,\n width: (clip.right - clip.left) / k,\n height: (clip.bottom - clip.top) / k,\n },\n )\n return () => {\n shown.style.transform = `translate(${place.x}px, ${place.y}px)`\n shown.dataset.side = place.side\n if (!shown.hasAttribute('data-visible')) {\n // Commit the position before becoming visible, so it does not glide in from the old spot.\n void getComputedStyle(shown).transform\n shown.setAttribute('data-visible', '')\n }\n }\n })\n schedule(waiting, placeAll)\n },\n destroy() {\n turns++\n if (tip) {\n render(tip, null)\n tip.remove()\n }\n if (addedClass) el.classList.remove('tc-container')\n stop?.()\n },\n }\n },\n }\n}\n","import type { ChartPlugin } from '../plugin.ts'\nimport { download } from './download.ts'\nimport { highlight } from './highlight.ts'\nimport { keyboard } from './keyboard.ts'\nimport { legend } from './legend.ts'\nimport { pointer } from './pointer.ts'\nimport { sync } from './sync.ts'\nimport { dataTable } from './table.ts'\nimport { tooltip } from './tooltip.ts'\n\nexport { dataTable, download, highlight, keyboard, legend, pointer, sync, tooltip }\n\n/** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */\nexport function defaultPlugins(): ChartPlugin[] {\n return [highlight(), legend(), tooltip(), dataTable(), keyboard(), sync(), download()]\n}\n","","import { version } from '../package.json'\n\n/** Version of the `@tabler/charts` package. */\nexport const VERSION: string = version\n\nexport type { DataTable } from './a11y.ts'\nexport { describeHit, tableContent } from './a11y.ts'\nexport type {\n BaseOptions,\n ChartConfig,\n ChartEvents,\n ChartType,\n RenderContext,\n ResolvedLegend,\n Size,\n} from './chart.ts'\nexport {\n buildChart,\n Chart,\n chartEvents,\n chartLabel,\n chartToString,\n renderContext,\n resolveLegend,\n resolveSize,\n} from './chart.ts'\nexport type { Annotation } from './charts/annotations.ts'\nexport type { AreaOptions } from './charts/area.ts'\nexport { area } from './charts/area.ts'\nexport type { BarOptions } from './charts/bar.ts'\nexport { bar } from './charts/bar.ts'\nexport type { Candle, CandlestickOptions } from './charts/candlestick.ts'\nexport { candlestick } from './charts/candlestick.ts'\nexport type {\n CartesianData,\n CartesianOptions,\n CategoryAxisOptions,\n Label,\n Series,\n ValueAxisOptions,\n} from './charts/cartesian.ts'\nexport {\n categoryInteraction,\n domainOf,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './charts/cartesian.ts'\nexport type { GaugeOptions, GaugeRing } from './charts/gauge.ts'\nexport { gauge } from './charts/gauge.ts'\nexport type { HeatmapOptions, HeatmapRange } from './charts/heatmap.ts'\nexport { heatmap } from './charts/heatmap.ts'\nexport type { LineOptions } from './charts/line.ts'\nexport { line } from './charts/line.ts'\nexport type { ParliamentOptions, ParliamentParty } from './charts/parliament.ts'\nexport { parliament } from './charts/parliament.ts'\nexport type { PieOptions, PieSlice } from './charts/pie.ts'\nexport { donut, pie } from './charts/pie.ts'\nexport type { RadarOptions, RadialAxisOptions } from './charts/radar.ts'\nexport { radar } from './charts/radar.ts'\nexport type { SankeyData, SankeyLink, SankeyNode, SankeyOptions } from './charts/sankey.ts'\nexport { sankey } from './charts/sankey.ts'\nexport type { ScatterOptions, ScatterPoint, ScatterSeries } from './charts/scatter.ts'\nexport { scatter } from './charts/scatter.ts'\nexport type { SparklineOptions } from './charts/sparkline.ts'\nexport { sparkline } from './charts/sparkline.ts'\nexport type { AxisOptions, AxisPosition, LinearTicksOptions, Tick } from './components/axis.ts'\nexport { axis, axisSize, bandTicks, linearTicks, thinTicks } from './components/axis.ts'\nexport type { GridOptions } from './components/grid.ts'\nexport { grid } from './components/grid.ts'\nexport { hoverOverlay, hoverUnderlay } from './components/hover.ts'\nexport type { Features } from './features.ts'\nexport { feature, features, register } from './features.ts'\nexport type { DateFormat, Locale, NumberFormat, NumberFormatOptions } from './format.ts'\nexport {\n formatDate,\n formatDetail,\n formatNumber,\n formatTicks,\n getDateFormat,\n getNumberFormat,\n stepPrecision,\n} from './format.ts'\nexport type { Hit, HitItem, HitTester, Interaction } from './interaction.ts'\nexport type { Insets, InsetsInput, Rect } from './layout.ts'\nexport { estimateTextWidth, innerRect, insets, LINE_HEIGHT } from './layout.ts'\nexport type { LegendItem, LegendOptions } from './legend.ts'\nexport { defaultHidden, legendContent } from './legend.ts'\nexport type {\n AfterRenderState,\n BeforeRenderState,\n ChartPlugin,\n PluginInstance,\n} from './plugin.ts'\nexport type { DownloadFormat, DownloadMenuOptions, DownloadOption } from './plugins/download.ts'\nexport {\n dataTable,\n defaultPlugins,\n download,\n highlight,\n keyboard,\n legend,\n pointer,\n sync,\n tooltip,\n} from './plugins/index.ts'\nexport { render } from './render/dom.ts'\nexport type { RenderToStringOptions } from './render/string.ts'\nexport { escapeAttr, escapeText, renderToString } from './render/string.ts'\nexport type { BandKey, BandScale, BandScaleOptions } from './scales/band.ts'\nexport { band, point } from './scales/band.ts'\nexport { extent } from './scales/extent.ts'\nexport type { LinearScale, LinearScaleOptions } from './scales/linear.ts'\nexport { linear } from './scales/linear.ts'\nexport { niceDomain, tickIncrement, tickStep, ticks } from './scales/ticks.ts'\nexport { cancel, flush, schedule } from './scheduler.ts'\nexport type { ArcOptions } from './shapes/arc.ts'\nexport { arcCentroid, arcPathStable, padAngleForGap } from './shapes/arc.ts'\nexport { barPath, hbarPath } from './shapes/bar.ts'\nexport type { Curve, PathOptions, Point } from './shapes/path.ts'\nexport { areaPath, linePath } from './shapes/path.ts'\nexport type { TooltipOptions, TooltipPlacement } from './tooltip.ts'\nexport { hitAnchor, placeTooltip, tooltipContent } from './tooltip.ts'\nexport type {\n Attrs,\n AttrValue,\n Child,\n ChildInput,\n ClassValue,\n Key,\n Props,\n StyleValue,\n VNode,\n} from './vnode.ts'\nexport { h, normalizeClass, normalizeStyle } from './vnode.ts'\n"],"mappings":";;;;;;;;AA8BA,MAAM,QAAwC;CAAE,KAAK;CAAO,KAAK;CAAO,MAAM;CAAQ,MAAM;AAAO;AACnG,MAAM,kBAA6C,CAAC,OAAO,KAAK;AAEhE,SAAS,QAAQ,QAA6C;CAC5D,OAAO,WAAW,OACd,CAAC,IACD,MAAM,QAAQ,MAAM,IAClB,EAAE,SAAS,OAAO,IACjB;AACT;;;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ClD,OAAO;IACT;GACF;EACF;CACF;AACF;;;;ACtIA,SAAgB,iBAAgC;CAC9C,OAAO;EAAC,UAAU;EAAG,OAAO;EAAG,QAAQ;EAAG,UAAU;EAAG,SAAS;EAAG,KAAK;EAAG,SAAS;CAAC;AACvF;;;;AEZA,MAAa,UAAkB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as Rect } from "./annotations-lyt0I3HU.cjs";
|
|
2
2
|
import { l as VNode, r as Child } from "./vnode-BUflsBsa.cjs";
|
|
3
|
-
import { D as ChartPlugin, ft as Tick, xt as Hit } from "./chart-
|
|
3
|
+
import { D as ChartPlugin, ft as Tick, xt as Hit } from "./chart-D7ooEFnk.cjs";
|
|
4
4
|
//#region src/shapes/arc.d.ts
|
|
5
5
|
interface ArcOptions {
|
|
6
6
|
innerRadius: number;
|
|
@@ -94,7 +94,8 @@ declare function dataTable(): ChartPlugin;
|
|
|
94
94
|
//#region src/plugins/tooltip.d.ts
|
|
95
95
|
/**
|
|
96
96
|
* An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next
|
|
97
|
-
* to it inside the chart element. Configure it with the `tooltip` option
|
|
97
|
+
* to it inside the chart element. Configure it with the `tooltip` option;
|
|
98
|
+
* `theme: 'light'` adds `.tc-tooltip-light` for the white variant.
|
|
98
99
|
*/
|
|
99
100
|
declare function tooltip(): ChartPlugin;
|
|
100
101
|
//#endregion
|
|
@@ -216,4 +217,4 @@ declare function hbarPath(y: number, height: number, baseline: number, value: nu
|
|
|
216
217
|
declare const VERSION: string;
|
|
217
218
|
//#endregion
|
|
218
219
|
export { arcCentroid as A, keyboard as C, GridOptions as D, hoverUnderlay as E, padAngleForGap as M, grid as O, legend as S, hoverOverlay as T, defaultPlugins as _, flush as a, sync as b, tickIncrement as c, extent as d, RenderToStringOptions as f, render as g, renderToString as h, cancel as i, arcPathStable as j, ArcOptions as k, tickStep as l, escapeText as m, barPath as n, schedule as o, escapeAttr as p, hbarPath as r, niceDomain as s, VERSION as t, ticks as u, tooltip as v, highlight as w, pointer as x, dataTable as y };
|
|
219
|
-
//# sourceMappingURL=core-
|
|
220
|
+
//# sourceMappingURL=core-D1vO1LrC.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as Rect } from "./annotations-Bp7HwtF5.js";
|
|
2
2
|
import { l as VNode, r as Child } from "./vnode-BUflsBsa.js";
|
|
3
|
-
import { D as ChartPlugin, ft as Tick, xt as Hit } from "./chart-
|
|
3
|
+
import { D as ChartPlugin, ft as Tick, xt as Hit } from "./chart-DyN7bcx8.js";
|
|
4
4
|
//#region src/shapes/arc.d.ts
|
|
5
5
|
interface ArcOptions {
|
|
6
6
|
innerRadius: number;
|
|
@@ -94,7 +94,8 @@ declare function dataTable(): ChartPlugin;
|
|
|
94
94
|
//#region src/plugins/tooltip.d.ts
|
|
95
95
|
/**
|
|
96
96
|
* An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next
|
|
97
|
-
* to it inside the chart element. Configure it with the `tooltip` option
|
|
97
|
+
* to it inside the chart element. Configure it with the `tooltip` option;
|
|
98
|
+
* `theme: 'light'` adds `.tc-tooltip-light` for the white variant.
|
|
98
99
|
*/
|
|
99
100
|
declare function tooltip(): ChartPlugin;
|
|
100
101
|
//#endregion
|
|
@@ -216,4 +217,4 @@ declare function hbarPath(y: number, height: number, baseline: number, value: nu
|
|
|
216
217
|
declare const VERSION: string;
|
|
217
218
|
//#endregion
|
|
218
219
|
export { arcCentroid as A, keyboard as C, GridOptions as D, hoverUnderlay as E, padAngleForGap as M, grid as O, legend as S, hoverOverlay as T, defaultPlugins as _, flush as a, sync as b, tickIncrement as c, extent as d, RenderToStringOptions as f, render as g, renderToString as h, cancel as i, arcPathStable as j, ArcOptions as k, tickStep as l, escapeText as m, barPath as n, schedule as o, escapeAttr as p, hbarPath as r, niceDomain as s, VERSION as t, ticks as u, tooltip as v, highlight as w, pointer as x, dataTable as y };
|
|
219
|
-
//# sourceMappingURL=core-
|
|
220
|
+
//# sourceMappingURL=core-DcbemzGf.d.ts.map
|
|
@@ -228,14 +228,20 @@ function listenPointer(chart) {
|
|
|
228
228
|
const { width, height } = chart.size;
|
|
229
229
|
return require_chart.toChartPoint(svg, event.clientX, event.clientY, width, height);
|
|
230
230
|
};
|
|
231
|
+
const overControl = (event) => !!event.target?.closest?.(".tc-download");
|
|
232
|
+
const onLeave = (event) => {
|
|
233
|
+
if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
|
|
234
|
+
};
|
|
231
235
|
const onMove = (event) => {
|
|
236
|
+
if (overControl(event)) {
|
|
237
|
+
onLeave(event);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
232
240
|
const point = local(event);
|
|
233
241
|
if (point) chart.highlightAt(point.x, point.y, event);
|
|
234
242
|
};
|
|
235
|
-
const onLeave = (event) => {
|
|
236
|
-
if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
|
|
237
|
-
};
|
|
238
243
|
const onClick = (event) => {
|
|
244
|
+
if (overControl(event)) return;
|
|
239
245
|
const point = local(event);
|
|
240
246
|
const hit = point ? chart.hitTest(point.x, point.y) : null;
|
|
241
247
|
if (hit) chart.emit("click", {
|
|
@@ -767,7 +773,8 @@ function placeAll() {
|
|
|
767
773
|
}
|
|
768
774
|
/**
|
|
769
775
|
* An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next
|
|
770
|
-
* to it inside the chart element. Configure it with the `tooltip` option
|
|
776
|
+
* to it inside the chart element. Configure it with the `tooltip` option;
|
|
777
|
+
* `theme: 'light'` adds `.tc-tooltip-light` for the white variant.
|
|
771
778
|
*/
|
|
772
779
|
function tooltip() {
|
|
773
780
|
return {
|
|
@@ -796,7 +803,9 @@ function tooltip() {
|
|
|
796
803
|
tip.setAttribute("aria-hidden", "true");
|
|
797
804
|
el.appendChild(tip);
|
|
798
805
|
}
|
|
799
|
-
|
|
806
|
+
const options = typeof option === "object" ? option : void 0;
|
|
807
|
+
tip.classList.toggle("tc-tooltip-light", options?.theme === "light");
|
|
808
|
+
require_dom.render(tip, tooltipContent(hit, options));
|
|
800
809
|
const shown = tip;
|
|
801
810
|
const turn = ++turns;
|
|
802
811
|
waiting.push(() => {
|
|
@@ -868,7 +877,7 @@ function defaultPlugins() {
|
|
|
868
877
|
//#endregion
|
|
869
878
|
//#region src/core.ts
|
|
870
879
|
/** Version of the `@tabler/charts` package. */
|
|
871
|
-
const VERSION = "0.
|
|
880
|
+
const VERSION = "0.1.0";
|
|
872
881
|
//#endregion
|
|
873
882
|
Object.defineProperty(exports, "VERSION", {
|
|
874
883
|
enumerable: true,
|
|
@@ -973,4 +982,4 @@ Object.defineProperty(exports, "tooltipContent", {
|
|
|
973
982
|
}
|
|
974
983
|
});
|
|
975
984
|
|
|
976
|
-
//# sourceMappingURL=core-
|
|
985
|
+
//# sourceMappingURL=core-RzS9IQO5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-RzS9IQO5.cjs","names":["feature","h","h","round","toChartPoint","markerShape","h","legendContent","renderContext","getNumberFormat","h"],"sources":["../src/plugins/download.ts","../src/components/hover.ts","../src/plugins/pointer.ts","../src/plugins/highlight.ts","../src/a11y.ts","../src/plugins/keyboard.ts","../src/plugins/legend.ts","../src/plugins/sync.ts","../src/idle.ts","../src/plugins/table.ts","../src/tooltip.ts","../src/plugins/tooltip.ts","../src/plugins/index.ts","../package.json","../src/core.ts"],"sourcesContent":["import { feature } from '../features.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { h } from '../vnode.ts'\n\n/** A file format of the download menu. */\nexport type DownloadFormat = 'png' | 'svg' | 'jpeg' | 'webp'\n\n/** The `download` option as an object. */\nexport interface DownloadMenuOptions {\n /** Formats offered, in this order. Defaults to `['png', 'svg']`. */\n formats?: readonly DownloadFormat[]\n /** File name without the extension. Defaults to the chart's title, or `chart`. */\n filename?: string\n /** Accessible name of the menu button. Defaults to `'Download'`. */\n label?: string\n /**\n * Background color, `'auto'` for the chart's surface (`--tc-surface`), or\n * `false` for none (transparent). Defaults to `'auto'`.\n */\n background?: string | false\n /** Draw the legend into the file. Defaults to `true`. */\n legend?: boolean\n /** Pixels per chart pixel in images. Defaults to `2`. */\n scale?: number\n}\n\n/** The `download` option: on, a list of formats, or the options. */\nexport type DownloadOption = boolean | readonly DownloadFormat[] | DownloadMenuOptions\n\nconst NAMES: Record<DownloadFormat, string> = { png: 'PNG', svg: 'SVG', jpeg: 'JPEG', webp: 'WebP' }\nconst DEFAULT_FORMATS: readonly DownloadFormat[] = ['png', 'svg']\n\nfunction resolve(option: DownloadOption): DownloadMenuOptions {\n return option === true\n ? {}\n : Array.isArray(option)\n ? { formats: option }\n : (option as DownloadMenuOptions)\n}\n\n/**\n * A download menu in the chart's corner (`.tc-download`): a button that opens\n * a list of file formats, PNG and SVG by default. Shown with the `download`\n * option. The files come from `@tabler/charts/export`, which must be imported\n * (the chart says so otherwise): that way charts without a download never\n * carry the export code.\n */\nexport function download(): ChartPlugin {\n return {\n name: 'download',\n install(chart) {\n const host = chart.element\n const doc = host.ownerDocument\n let el: HTMLElement | undefined\n let options: DownloadMenuOptions = {}\n // The menu overlays the chart: the container is the positioning context.\n const addedClass = !host.classList.contains('tc-container')\n\n const toggle = () => el?.querySelector<HTMLElement>('.tc-download-toggle')\n const menu = () => el?.querySelector<HTMLElement>('.tc-download-menu')\n const items = () => Array.from(el?.querySelectorAll<HTMLElement>('.tc-download-item') ?? [])\n\n const setOpen = (open: boolean) => {\n const list = menu()\n if (!list) return\n list.hidden = !open\n toggle()?.setAttribute('aria-expanded', String(open))\n if (open) doc.addEventListener('pointerdown', onOutside, true)\n else doc.removeEventListener('pointerdown', onOutside, true)\n }\n const isOpen = () => menu()?.hidden === false\n\n const onOutside = (event: Event) => {\n if (!el?.contains(event.target as Node)) setOpen(false)\n }\n\n const onClick = (event: Event) => {\n const target = event.target as Element\n if (target.closest('.tc-download-toggle')) {\n setOpen(!isOpen())\n if (isOpen()) items()[0]?.focus()\n return\n }\n const format = target.closest('.tc-download-item')?.getAttribute('data-format')\n if (!format) return\n setOpen(false)\n toggle()?.focus()\n void feature('export')(chart, { ...options, format: format as DownloadFormat })\n }\n\n const onKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen()) {\n event.preventDefault()\n setOpen(false)\n toggle()?.focus()\n return\n }\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return\n const list = items()\n if (!list.length) return\n event.preventDefault()\n if (!isOpen()) setOpen(true)\n const at = list.indexOf(doc.activeElement as HTMLElement)\n const step = event.key === 'ArrowDown' ? 1 : -1\n list[(at + step + list.length) % list.length]?.focus()\n }\n\n // Tabbing out of the menu closes it.\n const onBlur = (event: FocusEvent) => {\n if (!el?.contains(event.relatedTarget as Node)) setOpen(false)\n }\n\n const remove = () => {\n if (!el) return\n setOpen(false)\n render(el, null)\n el.remove()\n el = undefined\n if (addedClass) host.classList.remove('tc-container')\n }\n\n return {\n afterRender({ config, changed }) {\n const option = config.download\n if (!option || typeof document === 'undefined') {\n remove()\n return\n }\n // Resizing and hovering change nothing in the menu.\n if (!changed && el?.isConnected) return\n // Fail early, at render, when the export entry is not imported.\n feature('export')\n options = resolve(option)\n const formats = options.formats?.length ? options.formats : DEFAULT_FORMATS\n if (!el) {\n el = doc.createElement('div')\n el.className = 'tc-download'\n el.addEventListener('click', onClick)\n el.addEventListener('keydown', onKey)\n el.addEventListener('focusout', onBlur)\n }\n render(\n el,\n h(\n 'div',\n { class: 'tc-download-box' },\n h(\n 'button',\n {\n type: 'button',\n class: 'tc-download-toggle',\n 'aria-label': options.label ?? 'Download',\n 'aria-haspopup': 'menu',\n 'aria-expanded': 'false',\n },\n h(\n 'svg',\n {\n viewBox: '0 0 24 24',\n width: '16',\n height: '16',\n 'aria-hidden': 'true',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': '2',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n },\n h('path', {\n d: 'M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12',\n }),\n ),\n ),\n h(\n 'div',\n { class: 'tc-download-menu', role: 'menu', hidden: '' },\n formats.map((format) =>\n h(\n 'button',\n {\n key: format,\n type: 'button',\n role: 'menuitem',\n class: 'tc-download-item',\n 'data-format': format,\n },\n NAMES[format] ?? format,\n ),\n ),\n ),\n ),\n )\n host.classList.add('tc-container')\n if (!el.isConnected) host.appendChild(el)\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { Hit } from '../interaction.ts'\nimport { round } from '../layout.ts'\nimport { h, type VNode } from '../vnode.ts'\n\n/** Series wrapper so hover marks pick up the series color from CSS. */\nfunction seriesGroup(seriesIndex: number, color: string | undefined, child: VNode): VNode {\n return h(\n 'g',\n {\n key: seriesIndex,\n class: ['tc-series', `tc-series-${seriesIndex + 1}`],\n style: { '--tc-series-color': color },\n },\n child,\n )\n}\n\n/**\n * Hover marks drawn below the series: a band behind the hovered category of\n * band charts (bars), or a vertical crosshair for point charts (lines).\n */\nexport function hoverUnderlay(hit: Hit, crosshair = true): VNode {\n const { area } = hit\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n hit.mark\n ? null\n : hit.band\n ? h('rect', {\n class: 'tc-hover-band',\n x: round(hit.band.x),\n y: round(hit.band.y),\n width: round(hit.band.width),\n height: round(hit.band.height),\n })\n : crosshair &&\n h(\n 'line',\n hit.guide\n ? {\n class: 'tc-crosshair',\n x1: round(hit.guide.x1),\n x2: round(hit.guide.x2),\n y1: round(hit.guide.y1),\n y2: round(hit.guide.y2),\n }\n : {\n class: 'tc-crosshair',\n x1: round(hit.x),\n x2: round(hit.x),\n y1: round(area.y),\n y2: round(area.y + area.height),\n },\n ),\n )\n}\n\n/**\n * Hover marks drawn above the series: the hit's own mark (pie slices), or\n * an active dot on every point of point charts (of the series' `shape`, if given).\n */\nexport function hoverOverlay(\n hit: Hit,\n radius = 4,\n shape?: (slot: number, x: number, y: number, r: number) => string,\n): VNode {\n const { mark } = hit\n if (mark) {\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n item &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n h('path', {\n class: 'tc-hover-mark',\n d: mark.d,\n style: `transform:translate(${round(mark.x)}px,${round(mark.y)}px)`,\n }),\n ),\n )\n }\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n !hit.band &&\n hit.items.map(\n (item) =>\n item.y !== null &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n shape\n ? h('path', {\n class: 'tc-point tc-point-active tc-marker',\n d: shape(item.seriesIndex, item.x, item.y, radius),\n })\n : h('circle', {\n class: 'tc-point tc-point-active',\n cx: round(item.x),\n cy: round(item.y),\n r: radius,\n }),\n ),\n ),\n )\n}\n","import type { Chart } from '../chart.ts'\nimport { toChartPoint } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\nconst listening = /* @__PURE__ */ new WeakSet<object>()\n\n/**\n * Turn pointer input on the chart's element into highlights and `hover` /\n * `click` events (once per chart, however many plugins ask). Returns the\n * function that stops listening, or nothing when already listening.\n */\nexport function listenPointer(chart: Chart<object>): (() => void) | undefined {\n const el = chart.element\n if (listening.has(chart) || typeof el.addEventListener !== 'function') return undefined\n listening.add(chart)\n const local = (event: MouseEvent) => {\n const svg = el.querySelector('svg.tc-chart')\n if (!svg) return undefined\n const { width, height } = chart.size\n return toChartPoint(svg, event.clientX, event.clientY, width, height)\n }\n // Controls laid over the chart (the download menu) are not the chart:\n // hovering them clears the highlight, so the tooltip never covers them.\n const overControl = (event: Event) =>\n !!(event.target as Element | null)?.closest?.('.tc-download')\n const onLeave = (event: PointerEvent) => {\n // On touch, keep the last highlight after the finger lifts.\n if (event.pointerType !== 'touch' && chart.highlightSource === 'pointer') {\n chart.clearHighlight(event)\n }\n }\n const onMove = (event: PointerEvent) => {\n if (overControl(event)) {\n onLeave(event)\n return\n }\n const point = local(event)\n if (point) chart.highlightAt(point.x, point.y, event)\n }\n const onClick = (event: MouseEvent) => {\n if (overControl(event)) return\n const point = local(event)\n const hit = point ? chart.hitTest(point.x, point.y) : null\n if (hit) chart.emit('click', { hit, event })\n }\n el.addEventListener('pointermove', onMove as EventListener)\n el.addEventListener('pointerdown', onMove as EventListener)\n el.addEventListener('pointerleave', onLeave as EventListener)\n el.addEventListener('click', onClick as EventListener)\n return () => {\n listening.delete(chart)\n el.removeEventListener('pointermove', onMove as EventListener)\n el.removeEventListener('pointerdown', onMove as EventListener)\n el.removeEventListener('pointerleave', onLeave as EventListener)\n el.removeEventListener('click', onClick as EventListener)\n }\n}\n\n/**\n * Pointer input: hovering highlights what is under the pointer and emits\n * `hover`, clicking emits `click`. The highlight and tooltip plugins turn it\n * on themselves; add it to a bare `Chart` that only needs the events.\n */\nexport function pointer(): ChartPlugin {\n return {\n name: 'pointer',\n install(chart) {\n const stop = listenPointer(chart)\n return stop ? { destroy: stop } : {}\n },\n }\n}\n","import { markerShape } from '../charts/cartesian.ts'\nimport { hoverOverlay, hoverUnderlay } from '../components/hover.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Draws the highlighted category: a crosshair (or a band behind bars) under\n * the series and active dots above them. `crosshair: false` keeps the dots.\n */\nexport function highlight(): ChartPlugin {\n return {\n name: 'highlight',\n install(chart) {\n const stop = listenPointer(chart)\n return {\n layers: (hit, config) => ({\n under: hoverUnderlay(hit, config.crosshair !== false),\n over: hoverOverlay(hit, 4, markerShape(config)),\n }),\n ...(stop ? { destroy: stop } : {}),\n }\n },\n }\n}\n","import type { Hit } from './interaction.ts'\nimport { h, type VNode } from './vnode.ts'\n\n/** The data behind a chart as text: header cells and one row per category. */\nexport interface DataTable {\n /** Column headers; the first one labels the row headers (may be empty). */\n columns: string[]\n /** Rows of display text; the first cell of each row is its header. */\n rows: string[][]\n /** Total number of rows when `rows` was cut to a limit. */\n total?: number\n}\n\n/**\n * An HTML table of the chart data, for screen readers (visually hidden by\n * default) or as a visible fallback. Every cell is text, escaped by the renderer.\n */\nexport function tableContent(table: DataTable, caption?: string): VNode {\n const [corner = '', ...headers] = table.columns\n return h(\n 'table',\n { class: 'tc-table' },\n caption && h('caption', null, caption),\n h(\n 'thead',\n null,\n h(\n 'tr',\n null,\n h('th', { scope: 'col' }, corner),\n headers.map((name, i) => h('th', { key: i, scope: 'col' }, name)),\n ),\n ),\n h(\n 'tbody',\n null,\n table.rows.map(([head = '', ...cells], i) =>\n h(\n 'tr',\n { key: i },\n h('th', { scope: 'row' }, head),\n cells.map((cell, j) => h('td', { key: j }, cell)),\n ),\n ),\n ),\n )\n}\n\n/** Short sentence describing a hit, announced during keyboard navigation. */\nexport function describeHit(hit: Hit): string {\n const items =\n hit.seriesIndex === undefined\n ? hit.items\n : hit.items.filter((item) => item.seriesIndex === hit.seriesIndex)\n const values = items.map((item) => `${item.name} ${item.text}`).join(', ')\n return hit.title ? `${hit.title}: ${values}` : values\n}\n","import { describeHit } from '../a11y.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/**\n * Keyboard navigation: the SVG becomes focusable; arrow keys walk\n * categories, Up/Down walk series, Home/End jump, Escape (or leaving)\n * clears. Every step is announced through a polite live region.\n */\n/** The config's `keyboard` option, else the chart type's default, else on. */\nconst enabled = (config: { keyboard?: boolean; type: { keyboard?: boolean } }): boolean =>\n config.keyboard ?? config.type.keyboard ?? true\n\nexport function keyboard(): ChartPlugin {\n return {\n name: 'keyboard',\n install(chart) {\n const host = chart.element\n let live: HTMLElement | undefined\n\n /**\n * The live region, added when the chart takes focus: screen readers only\n * announce changes of a region that was already there, so one created\n * with its first message would stay silent for that message.\n */\n const region = (): HTMLElement => {\n if (!live) {\n live = host.ownerDocument.createElement('div')\n live.className = 'tc-sr-only'\n live.setAttribute('aria-live', 'polite')\n live.setAttribute('aria-atomic', 'true')\n host.appendChild(live)\n }\n return live\n }\n const announce = (text: string) => {\n region().textContent = text\n }\n\n const go = (index: number, seriesIndex?: number) => {\n const hit = chart.highlightIndex(index, seriesIndex)\n if (hit) announce(describeHit(hit))\n }\n\n /** Returns whether the key was handled. */\n const handle = (key: string): boolean => {\n const interaction = chart.interaction\n if (!interaction || interaction.count === 0) return false\n const current = chart.highlightSource === 'index' ? chart.active : null\n const last = interaction.count - 1\n const index = current?.index\n const focused = current?.seriesIndex\n const series = current?.items.map((item) => item.seriesIndex) ?? []\n const at = focused === undefined ? -1 : series.indexOf(focused)\n\n switch (key) {\n case 'ArrowRight':\n go(index === undefined ? 0 : Math.min(last, index + 1), focused)\n return true\n case 'ArrowLeft':\n go(index === undefined ? last : Math.max(0, index - 1), focused)\n return true\n case 'Home':\n go(0, focused)\n return true\n case 'End':\n go(last, focused)\n return true\n case 'ArrowDown':\n case 'ArrowUp': {\n if (index === undefined || series.length === 0) {\n go(0)\n return true\n }\n const step = key === 'ArrowDown' ? 1 : -1\n const next = at === -1 ? (step > 0 ? 0 : series.length - 1) : at + step\n go(index, next < 0 || next >= series.length ? undefined : series[next])\n return true\n }\n case 'Escape':\n if (!current) return false\n chart.clearHighlight()\n return true\n default:\n return false\n }\n }\n\n const isChart = (target: EventTarget | null) =>\n (target as Element | null)?.matches?.('svg.tc-chart') === true\n const onKey = (event: Event) => {\n const { key } = event as KeyboardEvent\n if (!enabled(chart.config) || !isChart(event.target)) return\n if (handle(key)) event.preventDefault()\n }\n const onBlur = (event: Event) => {\n if (isChart(event.target) && chart.highlightSource === 'index') chart.clearHighlight()\n }\n const onFocus = (event: Event) => {\n if (enabled(chart.config) && isChart(event.target)) region()\n }\n host.addEventListener('keydown', onKey)\n host.addEventListener('focusin', onFocus)\n host.addEventListener('focusout', onBlur)\n\n return {\n svgAttrs: (config) => (enabled(config) ? { tabindex: 0 } : undefined),\n destroy() {\n host.removeEventListener('keydown', onKey)\n host.removeEventListener('focusin', onFocus)\n host.removeEventListener('focusout', onBlur)\n live?.remove()\n },\n }\n },\n }\n}\n","import { legendContent } from '../legend.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/**\n * An HTML legend (`.tc-legend`) with toggle buttons, above or below the SVG.\n * Shown for two or more entries unless the `legend` option says otherwise.\n */\nexport function legend(): ChartPlugin {\n return {\n name: 'legend',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered legend instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-legend') ?? undefined\n let adopt = el?.firstElementChild ?? null\n let bound = false\n const onClick = (event: Event) => {\n const button = (event.target as Element).closest?.('.tc-legend-item')\n const key = button?.getAttribute('data-key')\n if (key != null) chart.toggleSeries(key)\n }\n\n const remove = () => {\n if (!el) return\n render(el, null)\n el.removeEventListener('click', onClick)\n bound = false\n el.remove()\n el = undefined\n }\n\n /** Keep the legend right before or after the SVG, whatever else lives in the container. */\n const place = () => {\n if (!el) return\n const svg = host.querySelector(':scope > svg.tc-chart')\n if (el.dataset.position === 'bottom') {\n if (!svg) {\n if (!el.isConnected) host.appendChild(el)\n } else if (svg.nextElementSibling !== el) {\n svg.after(el)\n }\n } else if (!el.isConnected || el.nextElementSibling !== svg) {\n host.insertBefore(el, svg ?? host.firstChild)\n }\n }\n\n return {\n beforeRender({ legend, hidden }) {\n if (!legend.show || typeof document === 'undefined') {\n remove()\n return\n }\n if (!el) {\n el = host.ownerDocument.createElement('div')\n el.className = 'tc-legend'\n }\n if (!bound) {\n el.addEventListener('click', onClick)\n bound = true\n }\n el.dataset.position = legend.position\n render(el, legendContent(legend.items, hidden), adopt)\n adopt = null\n place()\n },\n // With its margin: the gap to the chart is taken from the container too.\n reservedHeight() {\n if (!el?.isConnected) return 0\n const { marginTop, marginBottom } = getComputedStyle(el)\n return (\n el.offsetHeight +\n (Number.parseFloat(marginTop) || 0) +\n (Number.parseFloat(marginBottom) || 0)\n )\n },\n afterRender: place,\n destroy: remove,\n }\n },\n }\n}\n","import type { Chart } from '../chart.ts'\nimport type { Interaction } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/** Charts by `sync` group, held weakly: a chart taken out without destroy() is let go. */\nconst groups = /* @__PURE__ */ new Map<string, Set<WeakRef<Chart<object>>>>()\n\n/** The index of each category label, per render of a chart. */\nconst indexes = /* @__PURE__ */ new WeakMap<Interaction, Map<string | number, number>>()\n\n/** Set while a highlight is passed on, so the charts it reaches do not pass it on again. */\nlet passing = false\n\n/** The index of the category with `label` in a chart's current render, if it has one. */\nfunction indexOf(interaction: Interaction, label: string | number): number | undefined {\n let index = indexes.get(interaction)\n if (!index) {\n index = new Map()\n for (let i = 0; i < interaction.count; i++) {\n const hit = interaction.hitIndex(i)\n if (hit && !index.has(hit.label)) index.set(hit.label, i)\n }\n indexes.set(interaction, index)\n }\n return index.get(label)\n}\n\n/**\n * Shared hover across charts: charts with the same `sync` group highlight\n * the category under the pointer in any of them (with its crosshair and\n * tooltip), matched by label, and clear together when it leaves. Keyboard\n * highlights stay in their own chart.\n */\nexport function sync(): ChartPlugin {\n return {\n name: 'sync',\n install(chart) {\n const self = new WeakRef(chart)\n let group: Set<WeakRef<Chart<object>>> | undefined\n /** The name of the group joined: the config may have moved on before the next render. */\n let joined: string | undefined\n /** Leave the group, and take it off the list when it is empty. */\n const leave = () => {\n group?.delete(self)\n if (joined && group?.size === 0 && groups.get(joined) === group) groups.delete(joined)\n }\n /** Join the group of the current config, leaving the one before. */\n const join = () => {\n const name = chart.config.sync\n const next = name ? (groups.get(name) ?? new Set()) : undefined\n if (next === group) return\n leave()\n if (name && next) {\n next.add(self)\n groups.set(name, next)\n }\n group = next\n joined = name\n }\n join()\n const off = chart.on('hover', ({ hit }) => {\n // Only the pointer leads; keyboard highlights and highlights passed on do not.\n if (passing || !group || (hit && chart.highlightSource !== 'pointer')) return\n passing = true\n try {\n for (const ref of group) {\n const other = ref.deref()\n if (!other) group.delete(ref)\n if (!other || other === chart) continue\n const index = hit && other.interaction && indexOf(other.interaction, hit.label)\n if (index === undefined || index === null) other.clearHighlight()\n else other.highlightIndex(index)\n }\n } finally {\n passing = false\n }\n })\n return {\n afterRender: join,\n destroy() {\n off()\n leave()\n },\n }\n },\n }\n}\n","/**\n * Work that can wait until the browser is idle, such as hidden data tables:\n * it runs in an idle callback (within a second at the latest), or with\n * `flush()`. A module of its own, so charts without such work do not ship it.\n */\nimport { flushHooks, run } from './scheduler.ts'\n\nconst idle = /* @__PURE__ */ new Map<object, () => void>()\nlet pending = false\n\nfunction drain(): number {\n pending = false\n let count = 0\n while (idle.size > 0) {\n const tasks = Array.from(idle.values())\n idle.clear()\n for (const task of tasks) {\n run(task)\n count++\n }\n }\n return count\n}\n\n/** Run `task` once the browser is idle, replacing any idle task already queued for `key`. */\nexport function scheduleIdle(key: object, task: () => void): void {\n flushHooks.idle = drain\n idle.set(key, task)\n if (pending) return\n pending = true\n if (typeof requestIdleCallback === 'function') requestIdleCallback(drain, { timeout: 1000 })\n else setTimeout(drain, 100)\n}\n\n/** Drop the idle task queued for `key`, if any. */\nexport function cancelIdle(key: object): void {\n idle.delete(key)\n}\n","import { tableContent } from '../a11y.ts'\nimport { type ChartConfig, renderContext, type Size } from '../chart.ts'\nimport { getNumberFormat } from '../format.ts'\nimport { cancelIdle, scheduleIdle } from '../idle.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/**\n * The chart data as an HTML table next to the SVG: visually hidden for\n * screen readers by default, visible with `table: 'visible'`.\n */\nconst DEFAULT_MAX_ROWS = 1000\n\nexport function dataTable(): ChartPlugin {\n return {\n name: 'table',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered table instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-table-wrap') ?? undefined\n let adopt = el?.firstElementChild ?? null\n\n /** The table option of the last table, to tell its changes from new data. */\n let shown: unknown\n const key = {}\n\n const remove = () => {\n cancelIdle(key)\n if (!el) return\n render(el, null)\n el.remove()\n el = undefined\n }\n\n const update = (config: ChartConfig<object>, size: Size, hidden: ReadonlySet<string>) => {\n const option = config.table ?? true\n const maxRows =\n typeof option === 'object' && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS\n const table =\n option !== false && typeof document !== 'undefined'\n ? config.type.table?.(\n config,\n renderContext(config, size, chart.id, () => {}, hidden, chart.fontSize),\n maxRows,\n )\n : undefined\n if (!table) {\n remove()\n return\n }\n const visible =\n option === 'visible' || (typeof option === 'object' && option.visible === true)\n // Huge tables help nobody and cost real time to build; keep the first rows.\n let caption = config.title\n const total = table.total ?? table.rows.length\n const rows =\n table.rows.length > maxRows\n ? { columns: table.columns, rows: table.rows.slice(0, maxRows) }\n : table\n if (total > rows.rows.length) {\n const n = getNumberFormat(config.locale)\n const note = `${n.format(rows.rows.length)} of ${n.format(total)} rows`\n caption = caption ? `${caption} (${note})` : note\n }\n if (!el) el = host.ownerDocument.createElement('div')\n el.className = visible ? 'tc-table-wrap' : 'tc-table-wrap tc-sr-only'\n render(el, tableContent(rows, caption), adopt)\n adopt = null\n const svg = host.querySelector(':scope > svg.tc-chart')\n const bottomLegend = host.querySelector(':scope > .tc-legend[data-position=\"bottom\"]')\n const after = bottomLegend ?? svg\n if (after && after.nextElementSibling !== el) after.after(el)\n else if (!el.isConnected) host.appendChild(el)\n }\n\n return {\n afterRender({ config, size, hidden, changed }) {\n // Resizing changes nothing in the table.\n if (!changed && el?.isConnected) return\n const option = config.table ?? true\n const same = shown === option\n shown = option\n // A hidden table only serves screen readers: rebuilding thousands of\n // cells for new data can wait until the browser is idle instead of\n // delaying the frame that animates the chart. The first table, visible\n // ones and changes of the table option itself are built right away.\n if (same && el?.isConnected && el.classList.contains('tc-sr-only')) {\n scheduleIdle(key, () => update(config, size, hidden))\n } else {\n cancelIdle(key)\n update(config, size, hidden)\n }\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { Hit } from './interaction.ts'\nimport { type ChildInput, h, type VNode } from './vnode.ts'\n\n/**\n * Where a tooltip for `hit` belongs, in chart pixels: the pointer when it\n * drives the highlight, otherwise the focused value (keyboard).\n */\nexport function hitAnchor(hit: Hit, pointer?: { x: number; y: number }): { x: number; y: number } {\n if (pointer) return pointer\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n if (hit.guide && item?.y != null) return { x: item.x, y: item.y }\n if (hit.axis === 'y') return { x: item?.x ?? hit.x, y: hit.y ?? hit.area.y }\n return { x: hit.x, y: item?.y ?? hit.area.y + hit.area.height / 2 }\n}\n\nexport interface TooltipOptions {\n /**\n * Colors of the tooltip: `'dark'` (the default) is a dark box with light\n * text, `'light'` a white one with dark text. Both keep their colors in\n * dark mode; the `--tc-tooltip-*` tokens tune them.\n */\n theme?: 'dark' | 'light'\n /**\n * Custom content for a hit: VNodes built with `h()` or plain text.\n * Rendered safely (no HTML parsing), inside `.tc-tooltip`.\n */\n format?: (hit: Hit) => ChildInput\n /** Extra content below the default rows (e.g. a total), in `.tc-tooltip-footer`. */\n footer?: (hit: Hit) => ChildInput\n}\n\n/** Default tooltip content: the category title and one row per series. */\nexport function tooltipContent(hit: Hit, options: TooltipOptions = {}): VNode {\n const body: ChildInput = options.format\n ? options.format(hit)\n : [\n hit.title && h('div', { class: 'tc-tooltip-title' }, hit.title),\n hit.items.map((item) =>\n h(\n 'div',\n {\n key: item.seriesIndex,\n class: [\n 'tc-tooltip-item',\n 'tc-series',\n `tc-series-${item.seriesIndex + 1}`,\n hit.seriesIndex === item.seriesIndex && 'tc-tooltip-item-active',\n ],\n style: { '--tc-series-color': item.color },\n },\n h('span', { class: 'tc-tooltip-swatch' }),\n h('span', { class: 'tc-tooltip-name' }, item.name),\n h('span', { class: 'tc-tooltip-value' }, item.text),\n ),\n ),\n options.footer && h('div', { class: 'tc-tooltip-footer' }, options.footer(hit)),\n ]\n return h('div', { class: 'tc-tooltip-content' }, body)\n}\n\nexport interface TooltipPlacement {\n x: number\n y: number\n side: 'left' | 'right'\n}\n\n/**\n * Place a `width × height` tooltip next to an anchor within `bounds` (from\n * `bounds.x`, `bounds.y`, 0 by default): right of the anchor, or left when it\n * would overflow, vertically centered on the pointer and clamped.\n */\nexport function placeTooltip(\n anchor: { x: number; y: number },\n size: { width: number; height: number },\n bounds: { x?: number; y?: number; width: number; height: number },\n offset = 12,\n): TooltipPlacement {\n const { x: left = 0, y: top = 0 } = bounds\n const fitsRight = anchor.x + offset + size.width <= left + bounds.width\n const fitsLeft = anchor.x - offset - size.width >= left\n const side = fitsRight || !fitsLeft ? 'right' : 'left'\n const rawX = side === 'right' ? anchor.x + offset : anchor.x - offset - size.width\n const x = Math.max(left, Math.min(rawX, left + bounds.width - size.width))\n const y = Math.max(top, Math.min(anchor.y - size.height / 2, top + bounds.height - size.height))\n return { x: Math.round(x), y: Math.round(y), side }\n}\n","import type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { schedule } from '../scheduler.ts'\nimport { hitAnchor, placeTooltip, tooltipContent } from '../tooltip.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Where a tooltip in `el` can show without being cut off: the box of the\n * nearest element that clips its overflow (`el` itself, an ancestor, across\n * shadow roots), within the viewport.\n */\nfunction room(el: Element): { left: number; top: number; right: number; bottom: number } {\n let left = 0\n let top = 0\n let right = innerWidth\n let bottom = innerHeight\n for (let node: Element | null = el; node; ) {\n const style = getComputedStyle(node)\n if (style.overflowX !== 'visible' || style.overflowY !== 'visible') {\n const box = node.getBoundingClientRect()\n left = Math.max(left, box.left)\n top = Math.max(top, box.top)\n right = Math.min(right, box.right)\n bottom = Math.min(bottom, box.bottom)\n break\n }\n node = node.parentElement ?? ((node.getRootNode() as ShadowRoot).host || null)\n }\n return { left, top, right, bottom }\n}\n\n/** Tooltips to place: each measures where it goes, and returns what moves it there. */\nconst waiting: (() => (() => void) | undefined)[] = []\n\n/**\n * Place the waiting tooltips, in the frame that rendered their charts: all\n * are measured before any is moved, so the page is laid out once for the\n * frame. Measured and moved one by one, twelve charts sharing a hover laid\n * the page out twelve times.\n */\nfunction placeAll(): void {\n for (const move of waiting.splice(0).map((measure) => measure())) move?.()\n}\n\n/**\n * An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next\n * to it inside the chart element. Configure it with the `tooltip` option;\n * `theme: 'light'` adds `.tc-tooltip-light` for the white variant.\n */\nexport function tooltip(): ChartPlugin {\n return {\n name: 'tooltip',\n install(chart) {\n const stop = listenPointer(chart)\n const el = chart.element as HTMLElement\n // Positioning context for the tooltip (zero specificity in CSS, so page styles win).\n const addedClass = !el.classList.contains('tc-container')\n el.classList.add('tc-container')\n let tip: HTMLElement | undefined\n /** Counts the renders, so a placement still waiting knows when it is out of date. */\n let turns = 0\n\n return {\n afterRender() {\n const option = chart.config.tooltip\n const hit = chart.active\n const anchor = hit && hitAnchor(hit, chart.pointer)\n if (\n option === false ||\n typeof document === 'undefined' ||\n !hit ||\n !anchor ||\n !Number.isFinite(anchor.x) ||\n !Number.isFinite(anchor.y)\n ) {\n turns++\n tip?.removeAttribute('data-visible')\n return\n }\n if (!tip) {\n tip = el.ownerDocument.createElement('div')\n tip.className = 'tc-tooltip'\n tip.setAttribute('aria-hidden', 'true')\n el.appendChild(tip)\n }\n const options = typeof option === 'object' ? option : undefined\n tip.classList.toggle('tc-tooltip-light', options?.theme === 'light')\n render(tip, tooltipContent(hit, options))\n\n // Placed with the tooltips of the other charts of this frame (see placeAll).\n const shown = tip\n const turn = ++turns\n waiting.push(() => {\n const svg = el.querySelector('svg.tc-chart')\n // A later render of this chart, or its end, overtook this one.\n if (!svg || turn !== turns) return undefined\n const { width, height } = chart.size\n const box = el.getBoundingClientRect()\n const rect = svg.getBoundingClientRect()\n // Screen pixels per pixel of the container (transformed or zoomed ancestors).\n const k = box.width > 0 && el.offsetWidth > 0 ? box.width / el.offsetWidth : 1\n const sx = rect.width > 0 ? rect.width / width / k : 1\n const sy = rect.height > 0 ? rect.height / height / k : 1\n const origin = {\n x: (rect.left - box.left) / k - el.clientLeft,\n y: (rect.top - box.top) / k - el.clientTop,\n }\n // Snap to the category, follow the pointer along the values\n // (a radar spoke runs both ways, so there it follows the pointer).\n const ax = hit.axis === 'y' || hit.guide ? anchor.x : hit.x\n const ay = hit.axis === 'y' ? (hit.y ?? anchor.y) : anchor.y\n // The tooltip may leave the container, up to what would cut it off.\n const clip = room(el)\n const place = placeTooltip(\n { x: origin.x + ax * sx, y: origin.y + ay * sy },\n { width: shown.offsetWidth, height: shown.offsetHeight },\n {\n x: (clip.left - box.left) / k - el.clientLeft,\n y: (clip.top - box.top) / k - el.clientTop,\n width: (clip.right - clip.left) / k,\n height: (clip.bottom - clip.top) / k,\n },\n )\n return () => {\n shown.style.transform = `translate(${place.x}px, ${place.y}px)`\n shown.dataset.side = place.side\n if (!shown.hasAttribute('data-visible')) {\n // Commit the position before becoming visible, so it does not glide in from the old spot.\n void getComputedStyle(shown).transform\n shown.setAttribute('data-visible', '')\n }\n }\n })\n schedule(waiting, placeAll)\n },\n destroy() {\n turns++\n if (tip) {\n render(tip, null)\n tip.remove()\n }\n if (addedClass) el.classList.remove('tc-container')\n stop?.()\n },\n }\n },\n }\n}\n","import type { ChartPlugin } from '../plugin.ts'\nimport { download } from './download.ts'\nimport { highlight } from './highlight.ts'\nimport { keyboard } from './keyboard.ts'\nimport { legend } from './legend.ts'\nimport { pointer } from './pointer.ts'\nimport { sync } from './sync.ts'\nimport { dataTable } from './table.ts'\nimport { tooltip } from './tooltip.ts'\n\nexport { dataTable, download, highlight, keyboard, legend, pointer, sync, tooltip }\n\n/** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */\nexport function defaultPlugins(): ChartPlugin[] {\n return [highlight(), legend(), tooltip(), dataTable(), keyboard(), sync(), download()]\n}\n","","import { version } from '../package.json'\n\n/** Version of the `@tabler/charts` package. */\nexport const VERSION: string = version\n\nexport type { DataTable } from './a11y.ts'\nexport { describeHit, tableContent } from './a11y.ts'\nexport type {\n BaseOptions,\n ChartConfig,\n ChartEvents,\n ChartType,\n RenderContext,\n ResolvedLegend,\n Size,\n} from './chart.ts'\nexport {\n buildChart,\n Chart,\n chartEvents,\n chartLabel,\n chartToString,\n renderContext,\n resolveLegend,\n resolveSize,\n} from './chart.ts'\nexport type { Annotation } from './charts/annotations.ts'\nexport type { AreaOptions } from './charts/area.ts'\nexport { area } from './charts/area.ts'\nexport type { BarOptions } from './charts/bar.ts'\nexport { bar } from './charts/bar.ts'\nexport type { Candle, CandlestickOptions } from './charts/candlestick.ts'\nexport { candlestick } from './charts/candlestick.ts'\nexport type {\n CartesianData,\n CartesianOptions,\n CategoryAxisOptions,\n Label,\n Series,\n ValueAxisOptions,\n} from './charts/cartesian.ts'\nexport {\n categoryInteraction,\n domainOf,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './charts/cartesian.ts'\nexport type { GaugeOptions, GaugeRing } from './charts/gauge.ts'\nexport { gauge } from './charts/gauge.ts'\nexport type { HeatmapOptions, HeatmapRange } from './charts/heatmap.ts'\nexport { heatmap } from './charts/heatmap.ts'\nexport type { LineOptions } from './charts/line.ts'\nexport { line } from './charts/line.ts'\nexport type { ParliamentOptions, ParliamentParty } from './charts/parliament.ts'\nexport { parliament } from './charts/parliament.ts'\nexport type { PieOptions, PieSlice } from './charts/pie.ts'\nexport { donut, pie } from './charts/pie.ts'\nexport type { RadarOptions, RadialAxisOptions } from './charts/radar.ts'\nexport { radar } from './charts/radar.ts'\nexport type { SankeyData, SankeyLink, SankeyNode, SankeyOptions } from './charts/sankey.ts'\nexport { sankey } from './charts/sankey.ts'\nexport type { ScatterOptions, ScatterPoint, ScatterSeries } from './charts/scatter.ts'\nexport { scatter } from './charts/scatter.ts'\nexport type { SparklineOptions } from './charts/sparkline.ts'\nexport { sparkline } from './charts/sparkline.ts'\nexport type { AxisOptions, AxisPosition, LinearTicksOptions, Tick } from './components/axis.ts'\nexport { axis, axisSize, bandTicks, linearTicks, thinTicks } from './components/axis.ts'\nexport type { GridOptions } from './components/grid.ts'\nexport { grid } from './components/grid.ts'\nexport { hoverOverlay, hoverUnderlay } from './components/hover.ts'\nexport type { Features } from './features.ts'\nexport { feature, features, register } from './features.ts'\nexport type { DateFormat, Locale, NumberFormat, NumberFormatOptions } from './format.ts'\nexport {\n formatDate,\n formatDetail,\n formatNumber,\n formatTicks,\n getDateFormat,\n getNumberFormat,\n stepPrecision,\n} from './format.ts'\nexport type { Hit, HitItem, HitTester, Interaction } from './interaction.ts'\nexport type { Insets, InsetsInput, Rect } from './layout.ts'\nexport { estimateTextWidth, innerRect, insets, LINE_HEIGHT } from './layout.ts'\nexport type { LegendItem, LegendOptions } from './legend.ts'\nexport { defaultHidden, legendContent } from './legend.ts'\nexport type {\n AfterRenderState,\n BeforeRenderState,\n ChartPlugin,\n PluginInstance,\n} from './plugin.ts'\nexport type { DownloadFormat, DownloadMenuOptions, DownloadOption } from './plugins/download.ts'\nexport {\n dataTable,\n defaultPlugins,\n download,\n highlight,\n keyboard,\n legend,\n pointer,\n sync,\n tooltip,\n} from './plugins/index.ts'\nexport { render } from './render/dom.ts'\nexport type { RenderToStringOptions } from './render/string.ts'\nexport { escapeAttr, escapeText, renderToString } from './render/string.ts'\nexport type { BandKey, BandScale, BandScaleOptions } from './scales/band.ts'\nexport { band, point } from './scales/band.ts'\nexport { extent } from './scales/extent.ts'\nexport type { LinearScale, LinearScaleOptions } from './scales/linear.ts'\nexport { linear } from './scales/linear.ts'\nexport { niceDomain, tickIncrement, tickStep, ticks } from './scales/ticks.ts'\nexport { cancel, flush, schedule } from './scheduler.ts'\nexport type { ArcOptions } from './shapes/arc.ts'\nexport { arcCentroid, arcPathStable, padAngleForGap } from './shapes/arc.ts'\nexport { barPath, hbarPath } from './shapes/bar.ts'\nexport type { Curve, PathOptions, Point } from './shapes/path.ts'\nexport { areaPath, linePath } from './shapes/path.ts'\nexport type { TooltipOptions, TooltipPlacement } from './tooltip.ts'\nexport { hitAnchor, placeTooltip, tooltipContent } from './tooltip.ts'\nexport type {\n Attrs,\n AttrValue,\n Child,\n ChildInput,\n ClassValue,\n Key,\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,QAAQ,OAAO,IAAI,IAAI;MAC1D,MAAM,KAAK,IAAI,SAAS,MAAO,IAAI,KAAK,OAAO,IAAK,OAAO;MAE3D,MAAM,OAAO,KAAK,EAAE;MACpB,MAAM,QAAQ,aACZ;OAAE,GAAG,OAAO,IAAI,KAAK;OAAI,GAAG,OAAO,IAAI,KAAK;MAAG,GAC/C;OAAE,OAAO,MAAM;OAAa,QAAQ,MAAM;MAAa,GACvD;OACE,IAAI,KAAK,OAAO,IAAI,QAAQ,IAAI,GAAG;OACnC,IAAI,KAAK,MAAM,IAAI,OAAO,IAAI,GAAG;OACjC,QAAQ,KAAK,QAAQ,KAAK,QAAQ;OAClC,SAAS,KAAK,SAAS,KAAK,OAAO;MACrC,CACF;MACA,aAAa;OACX,MAAM,MAAM,YAAY,aAAa,MAAM,EAAE,MAAM,MAAM,EAAE;OAC3D,MAAM,QAAQ,OAAO,MAAM;OAC3B,IAAI,CAAC,MAAM,aAAa,cAAc,GAAG;QAEvC,iBAAsB,KAAK,CAAC,CAAC;QAC7B,MAAM,aAAa,gBAAgB,EAAE;OACvC;MACF;KACF,CAAC;KACD,cAAA,SAAS,SAAS,QAAQ;IAC5B;IACA,UAAU;KACR;KACA,IAAI,KAAK;MACP,YAAA,OAAO,KAAK,IAAI;MAChB,IAAI,OAAO;KACb;KACA,IAAI,YAAY,GAAG,UAAU,OAAO,cAAc;KAClD,OAAO;IACT;GACF;EACF;CACF;AACF;;;;ACtIA,SAAgB,iBAAgC;CAC9C,OAAO;EAAC,UAAU;EAAG,OAAO;EAAG,QAAQ;EAAG,UAAU;EAAG,SAAS;EAAG,KAAK;EAAG,SAAS;CAAC;AACvF;;;;AEZA,MAAa,UAAkB"}
|
package/dist/core.cjs
CHANGED
|
@@ -8,16 +8,17 @@ const require_extent = require("./extent-DsFWvAHJ.cjs");
|
|
|
8
8
|
const require_chart = require("./chart-CowF_lWY.cjs");
|
|
9
9
|
const require_dom = require("./dom-CLF868Qs.cjs");
|
|
10
10
|
const require_fade = require("./fade-Cs74puQS.cjs");
|
|
11
|
-
const require_core = require("./core-
|
|
11
|
+
const require_core = require("./core-RzS9IQO5.cjs");
|
|
12
12
|
const require_line = require("./line-fQbtP_jL.cjs");
|
|
13
13
|
const require_area = require("./area-sHCE3pg5.cjs");
|
|
14
14
|
const require_bar = require("./bar-DGuUN3nc.cjs");
|
|
15
15
|
const require_bar$1 = require("./bar-C-7zR2qp.cjs");
|
|
16
16
|
const require_candlestick = require("./candlestick-B5r1w3kc.cjs");
|
|
17
|
-
const
|
|
18
|
-
const require_gauge = require("./gauge-
|
|
17
|
+
const require_arc = require("./arc-BXpLrt9b.cjs");
|
|
18
|
+
const require_gauge = require("./gauge-D-FYhuds.cjs");
|
|
19
19
|
const require_heatmap = require("./heatmap-BK18EBgJ.cjs");
|
|
20
|
-
const
|
|
20
|
+
const require_parliament = require("./parliament-CpWnoEvG.cjs");
|
|
21
|
+
const require_pie = require("./pie-BxTZt6Go.cjs");
|
|
21
22
|
const require_radar = require("./radar-CoGUNNSb.cjs");
|
|
22
23
|
const require_sankey = require("./sankey-Bacx4fVe.cjs");
|
|
23
24
|
const require_scatter = require("./scatter-DgMN9zRy.cjs");
|
|
@@ -25,8 +26,8 @@ const require_sparkline = require("./sparkline-BS9-hltA.cjs");
|
|
|
25
26
|
exports.Chart = require_chart.Chart;
|
|
26
27
|
exports.LINE_HEIGHT = require_layout.LINE_HEIGHT;
|
|
27
28
|
exports.VERSION = require_core.VERSION;
|
|
28
|
-
exports.arcCentroid =
|
|
29
|
-
exports.arcPathStable =
|
|
29
|
+
exports.arcCentroid = require_arc.arcCentroid;
|
|
30
|
+
exports.arcPathStable = require_arc.arcPathStable;
|
|
30
31
|
exports.area = require_area.area;
|
|
31
32
|
exports.areaPath = require_fade.areaPath;
|
|
32
33
|
exports.axis = require_cartesian.axis;
|
|
@@ -83,7 +84,8 @@ exports.linearTicks = require_cartesian.linearTicks;
|
|
|
83
84
|
exports.niceDomain = require_cartesian.niceDomain;
|
|
84
85
|
exports.normalizeClass = require_vnode.normalizeClass;
|
|
85
86
|
exports.normalizeStyle = require_vnode.normalizeStyle;
|
|
86
|
-
exports.padAngleForGap =
|
|
87
|
+
exports.padAngleForGap = require_arc.padAngleForGap;
|
|
88
|
+
exports.parliament = require_parliament.parliament;
|
|
87
89
|
exports.pie = require_pie.pie;
|
|
88
90
|
exports.placeTooltip = require_core.placeTooltip;
|
|
89
91
|
exports.point = require_cartesian.point;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-lyt0I3HU.cjs";
|
|
2
2
|
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-DTcNDAFO.cjs";
|
|
3
3
|
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-BUflsBsa.cjs";
|
|
4
|
-
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-
|
|
4
|
+
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-D7ooEFnk.cjs";
|
|
5
5
|
import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, l as NumberFormatOptions, m as getDateFormat, o as DateFormat, p as formatTicks, s as Locale, u as formatDate } from "./time-CNVnt-B2.cjs";
|
|
6
6
|
import { a as linear, i as LinearScaleOptions, r as LinearScale } from "./log-CaofN3-n.cjs";
|
|
7
|
-
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-
|
|
7
|
+
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-D1vO1LrC.cjs";
|
|
8
8
|
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-CwB28da0.cjs";
|
|
9
|
-
import { n as line, t as LineOptions } from "./line-
|
|
10
|
-
import { n as area, t as AreaOptions } from "./area-
|
|
11
|
-
import { n as bar, t as BarOptions } from "./bar-
|
|
12
|
-
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-
|
|
13
|
-
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-
|
|
14
|
-
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import {
|
|
18
|
-
import { i as
|
|
19
|
-
import { n as
|
|
20
|
-
|
|
9
|
+
import { n as line, t as LineOptions } from "./line-W7VD_qs1.cjs";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-DIxaAbYZ.cjs";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-CRKLDg98.cjs";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-__pXl_pV.cjs";
|
|
13
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-DP_EB2z3.cjs";
|
|
14
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-CCso6m61.cjs";
|
|
15
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-DdrLVZwt.cjs";
|
|
16
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BF9yI5mE.cjs";
|
|
17
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-DBW4O0Vt.cjs";
|
|
18
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-DuGI3Qc5.cjs";
|
|
19
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-DbxLyZX0.cjs";
|
|
20
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-CWlJDKyh.cjs";
|
|
21
|
+
export { type AfterRenderState, type Annotation, type ArcOptions, type AreaOptions, type AttrValue, type Attrs, type AxisOptions, type AxisPosition, type BandKey, type BandScale, type BandScaleOptions, type BarOptions, type BaseOptions, type BeforeRenderState, type Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, Chart, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type Insets, type InsetsInput, type Interaction, type Key, LINE_HEIGHT, type Label, type LegendItem, type LegendOptions, type LineOptions, type LinearScale, type LinearScaleOptions, type LinearTicksOptions, type Locale, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, type RenderToStringOptions, type ResolvedLegend, type SankeyData, type SankeyLink, type SankeyNode, type SankeyOptions, type ScatterOptions, type ScatterPoint, type ScatterSeries, type Series, type Size, type SparklineOptions, type StyleValue, type Tick, type TooltipOptions, type TooltipPlacement, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-Bp7HwtF5.js";
|
|
2
2
|
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-DTcNDAFO.js";
|
|
3
3
|
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-BUflsBsa.js";
|
|
4
|
-
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-
|
|
4
|
+
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-DyN7bcx8.js";
|
|
5
5
|
import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, l as NumberFormatOptions, m as getDateFormat, o as DateFormat, p as formatTicks, s as Locale, u as formatDate } from "./time-CHjiY9Q4.js";
|
|
6
6
|
import { a as linear, i as LinearScaleOptions, r as LinearScale } from "./log-CaofN3-n.js";
|
|
7
|
-
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-
|
|
7
|
+
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-DcbemzGf.js";
|
|
8
8
|
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-CwB28da0.js";
|
|
9
|
-
import { n as line, t as LineOptions } from "./line-
|
|
10
|
-
import { n as area, t as AreaOptions } from "./area-
|
|
11
|
-
import { n as bar, t as BarOptions } from "./bar-
|
|
12
|
-
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-
|
|
13
|
-
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-
|
|
14
|
-
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import {
|
|
18
|
-
import { i as
|
|
19
|
-
import { n as
|
|
20
|
-
|
|
9
|
+
import { n as line, t as LineOptions } from "./line-CN4uZ9ZX.js";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-CF__HOwL.js";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-BBM8RhoL.js";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-D_vV0_XZ.js";
|
|
13
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-zpia05t2.js";
|
|
14
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-BectCEeE.js";
|
|
15
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-1Zv2Xh0D.js";
|
|
16
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-5z1fDdKO.js";
|
|
17
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-1-EryihA.js";
|
|
18
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-OV_WoPrl.js";
|
|
19
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-BqzgJqdX.js";
|
|
20
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-BfyO_oNM.js";
|
|
21
|
+
export { type AfterRenderState, type Annotation, type ArcOptions, type AreaOptions, type AttrValue, type Attrs, type AxisOptions, type AxisPosition, type BandKey, type BandScale, type BandScaleOptions, type BarOptions, type BaseOptions, type BeforeRenderState, type Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, Chart, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type Insets, type InsetsInput, type Interaction, type Key, LINE_HEIGHT, type Label, type LegendItem, type LegendOptions, type LineOptions, type LinearScale, type LinearScaleOptions, type LinearTicksOptions, type Locale, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, type RenderToStringOptions, type ResolvedLegend, type SankeyData, type SankeyLink, type SankeyNode, type SankeyOptions, type ScatterOptions, type ScatterPoint, type ScatterSeries, type Series, type Size, type SparklineOptions, type StyleValue, type Tick, type TooltipOptions, type TooltipPlacement, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent };
|