@c2n/chart 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/area-chart.js +1 -1
- package/dist/bar-chart.js +3 -3
- package/dist/candlestick-chart.js +1 -1
- package/dist/{chart-base-BwPwRgHt.js → chart-base-CEZvMKwW.js} +17 -3
- package/dist/chart-base.js +1 -1
- package/dist/chart-theme.js +4 -2
- package/dist/chart.js +5 -4
- package/dist/{echarts-chart-base-6JsZbB05.js → echarts-chart-base-CImXMzVk.js} +7 -2
- package/dist/echarts-chart-base.js +1 -1
- package/dist/gauge-chart.js +13 -5
- package/dist/line-chart.js +2 -2
- package/dist/pie-chart.js +16 -2
- package/dist/radar-chart.js +109 -0
- package/dist/scatter-chart.js +1 -1
- package/dist/sparkline.js +3 -3
- package/dist/{uplot-chart-base-CDHzOLwa.js → uplot-chart-base-CLhgOeM_.js} +1 -1
- package/dist/uplot-chart-base.js +1 -1
- package/dist/{uplot-paths-BRtF33Wh.js → uplot-paths-D5HCEKRV.js} +9 -4
- package/package.json +8 -3
- package/react.d.ts +2 -0
- package/types/src/chart-base.d.ts +10 -3
- package/types/src/chart-base.d.ts.map +1 -1
- package/types/src/chart-theme.d.ts +2 -0
- package/types/src/chart-theme.d.ts.map +1 -1
- package/types/src/chart.d.ts +2 -0
- package/types/src/chart.d.ts.map +1 -1
- package/types/src/echarts-chart-base.d.ts.map +1 -1
- package/types/src/engines/echarts-loader.d.ts +1 -1
- package/types/src/engines/echarts-loader.d.ts.map +1 -1
- package/types/src/engines/uplot-paths.d.ts +1 -1
- package/types/src/engines/uplot-paths.d.ts.map +1 -1
- package/types/src/gauge-chart.d.ts +2 -0
- package/types/src/gauge-chart.d.ts.map +1 -1
- package/types/src/pie-chart.d.ts +3 -0
- package/types/src/pie-chart.d.ts.map +1 -1
- package/types/src/radar-chart.d.ts +55 -0
- package/types/src/radar-chart.d.ts.map +1 -0
- package/vue.d.ts +23 -0
package/dist/area-chart.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
|
-
import { r as withAlpha } from "./uplot-paths-
|
|
2
|
+
import { r as withAlpha } from "./uplot-paths-D5HCEKRV.js";
|
|
3
3
|
import { LineChart } from "./line-chart.js";
|
|
4
4
|
import { property } from "lit/decorators.js";
|
|
5
5
|
import { customElement } from "@c2n/core/element-helper.js";
|
package/dist/bar-chart.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import "./chart-series.js";
|
|
3
|
-
import { t as UplotChartBase } from "./uplot-chart-base-
|
|
4
|
-
import { t as barPaths } from "./uplot-paths-
|
|
3
|
+
import { t as UplotChartBase } from "./uplot-chart-base-CLhgOeM_.js";
|
|
4
|
+
import { t as barPaths } from "./uplot-paths-D5HCEKRV.js";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
7
7
|
//#region src/bar-chart.ts
|
|
@@ -17,7 +17,7 @@ var BarChart = class BarChart extends UplotChartBase {
|
|
|
17
17
|
stroke: color,
|
|
18
18
|
fill: color,
|
|
19
19
|
width: 0,
|
|
20
|
-
paths: barPaths(this.barWidth, this.barGap, index, context.series.length),
|
|
20
|
+
paths: barPaths(this.barWidth, this.barGap, index, context.series.length, context.theme.barRadius),
|
|
21
21
|
points: { show: false }
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { columnValue } from "./chart-data.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
3
|
import "./chart-series.js";
|
|
4
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
4
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
7
7
|
//#region src/candlestick-chart.ts
|
|
@@ -6,7 +6,7 @@ import { property, query, state } from "lit/decorators.js";
|
|
|
6
6
|
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
7
7
|
import { jsonPropertyConverter } from "@c2n/core/lit-helper.js";
|
|
8
8
|
//#region src/chart.scss?inline
|
|
9
|
-
var chart_default = "@charset \"UTF-8\";\n/* ex : var((width: 24px), width, c2-checkbox) returns var(--c2-checkbox-width, 24px) */\n:host {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: var(--c2-chart--width,100%);\n height: var(--c2-chart--height,320px);\n /*\n * The plot is absolutely positioned, so nothing inside the host contributes intrinsic width. As a flex\n * item — which is what every example frame in the docs site makes it — the host would otherwise shrink\n * to its legend, and to nothing at all when there is no legend. `min-width: 0` keeps it able to shrink\n * below its content when a layout genuinely needs that.\n */\n min-width: 0;\n padding: var(--c2-chart--padding,12px);\n background: var(--c2-chart--background,#ffffff);\n color: var(--c2-chart--color,#18181b);\n font-family: var(--c2-chart--font-family,inherit);\n font-size: var(--c2-chart--font-size,12px);\n border-top: var(--c2-chart--border-top,1px solid #e4e4e7);\n border-right: var(--c2-chart--border-right,1px solid #e4e4e7);\n border-bottom: var(--c2-chart--border-bottom,1px solid #e4e4e7);\n border-left: var(--c2-chart--border-left,1px solid #e4e4e7);\n border-top-left-radius: var(--c2-chart--border-top-left-radius,8px);\n border-top-right-radius: var(--c2-chart--border-top-right-radius,8px);\n border-bottom-left-radius: var(--c2-chart--border-bottom-left-radius,8px);\n border-bottom-right-radius: var(--c2-chart--border-bottom-right-radius,8px);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.frame {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n}\n\n/*\n * The plot area is the engine's territory. `contain: strict` plus absolute positioning means the canvas\n * the engine sizes inside it can never feed its own size back into the ResizeObserver watching this box,\n * which is what makes the resize loop structurally impossible rather than merely unlikely.\n */\n.plot-area {\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n overflow: hidden;\n}\n\n.plot {\n position: absolute;\n inset: 0;\n contain: strict;\n}\n\n.plot canvas {\n display: block;\n position: absolute;\n inset: 0;\n}\n\n.overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.tooltip {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n pointer-events: none;\n will-change: transform;\n display: flex;\n flex-direction: column;\n gap: var(--c2-chart__tooltip--gap,6px);\n padding: var(--c2-chart__tooltip--padding,8px 10px);\n border-radius: var(--c2-chart__tooltip--border-radius,6px);\n background: var(--c2-chart__tooltip--background-color,#18181b);\n color: var(--c2-chart__tooltip--color,#fafafa);\n font-size: var(--c2-chart__tooltip--font-size,12px);\n box-shadow: var(--c2-chart__tooltip--box-shadow,0 8px 24px rgba(24, 24, 27, 0.08));\n white-space: nowrap;\n}\n\n.tooltip[hidden] {\n display: none;\n}\n\n.tooltip-row {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.tooltip-marker {\n width: var(--c2-chart__legend-marker--size,10px);\n height: var(--c2-chart__legend-marker--size,10px);\n border-radius: var(--c2-chart__legend-marker--border-radius,999px);\n flex: none;\n}\n\n.tooltip-label {\n flex: 1 1 auto;\n}\n\n.tooltip-value {\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n}\n\n.actions {\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: auto;\n display: flex;\n gap: 4px;\n}\n\n.state {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--c2-chart__state--color,#71717a);\n font-size: var(--c2-chart__state--font-size,14px);\n background: var(--c2-chart--background,#ffffff);\n}\n\n.legend {\n display: flex;\n flex-wrap: wrap;\n gap: var(--c2-chart__legend--gap,12px);\n padding: var(--c2-chart__legend--padding,8px 0 0);\n color: var(--c2-chart__legend--color,#71717a);\n font-size: var(--c2-chart__legend--font-size,12px);\n}\n\n.legend--start,\n.legend--end {\n flex-direction: column;\n align-content: flex-start;\n flex: 0 0 auto;\n align-self: center;\n max-height: 100%;\n overflow: auto;\n}\n\n/* The legend is on an inline edge, so the frame runs as a row. */\n.frame--side {\n flex-direction: row;\n align-items: stretch;\n}\n\n.legend-item {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.legend-item[aria-pressed=false] {\n opacity: var(--c2-chart__legend__disabled--opacity,0.38);\n}\n\n.legend-marker {\n width: var(--c2-chart__legend-marker--size,10px);\n height: var(--c2-chart__legend-marker--size,10px);\n border-radius: var(--c2-chart__legend-marker--border-radius,999px);\n flex: none;\n}\n\n.definitions {\n display: none;\n}\n\n/*\n * Colour probes. `getComputedStyle().getPropertyValue()` hands back the author's text for a `var()` or\n * `color-mix()` chain, which no canvas engine can parse; the computed `color` of an element always\n * resolves to `rgb(…)`. `display: none` keeps them free.\n */\n.theme-probe {\n display: none;\n}\n.theme-probe i:nth-child(1) {\n color: var(--c2-chart__series-1--color,#0265dc);\n}\n.theme-probe i:nth-child(2) {\n color: var(--c2-chart__series-2--color,#ea580c);\n}\n.theme-probe i:nth-child(3) {\n color: var(--c2-chart__series-3--color,#0f766e);\n}\n.theme-probe i:nth-child(4) {\n color: var(--c2-chart__series-4--color,#db2777);\n}\n.theme-probe i:nth-child(5) {\n color: var(--c2-chart__series-5--color,#a16207);\n}\n.theme-probe i:nth-child(6) {\n color: var(--c2-chart__series-6--color,#7c3aed);\n}\n.theme-probe i:nth-child(7) {\n color: var(--c2-chart__series-7--color,#0891b2);\n}\n.theme-probe i:nth-child(8) {\n color: var(--c2-chart__series-8--color,#52525b);\n}\n.theme-probe i:nth-child(9) {\n color: var(--c2-chart__axis--color,#71717a);\n}\n.theme-probe i:nth-child(10) {\n color: var(--c2-chart__grid--color,#e4e4e7);\n}\n.theme-probe i:nth-child(11) {\n color: var(--c2-chart--color,#18181b);\n}\n.theme-probe i:nth-child(12) {\n color: var(--c2-chart__muted--color,#71717a);\n}\n.theme-probe i:nth-child(13) {\n color: var(--c2-chart__tooltip--background-color,#18181b);\n}\n.theme-probe i:nth-child(14) {\n color: var(--c2-chart__tooltip--color,#fafafa);\n}\n.theme-probe i:nth-child(15) {\n color: var(--c2-chart__crosshair--color,#a1a1aa);\n}\n.theme-probe i:nth-child(16) {\n color: var(--c2-chart__positive--color,#16a34a);\n}\n.theme-probe i:nth-child(17) {\n color: var(--c2-chart__negative--color,#dc2626);\n}\n.theme-probe i:nth-child(18) {\n color: var(--c2-chart__surface--color,#ffffff);\n}\n\n/*\n * uPlot's structural CSS, hand-ported.\n *\n * `uplot/dist/uPlot.min.css` is a global stylesheet and a shadow root cannot see it, so the rules the\n * engine's DOM depends on live here instead. Only the structural half is kept: the legend and title rules\n * are dropped because this component renders its own. Version-coupled to the `uplot` peer range — re-check\n * after an upgrade.\n */\n.uplot,\n.uplot *,\n.uplot *::before,\n.uplot *::after {\n box-sizing: border-box;\n}\n\n.uplot {\n font-family: var(--c2-chart--font-family,inherit);\n line-height: 1.5;\n width: min-content;\n}\n\n.u-wrap {\n position: relative;\n user-select: none;\n}\n\n.u-over,\n.u-under {\n position: absolute;\n}\n\n.u-under {\n overflow: hidden;\n}\n\n.uplot canvas {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.u-axis {\n position: absolute;\n}\n\n.u-select {\n position: absolute;\n pointer-events: none;\n background: rgba(0, 0, 0, 0.07);\n}\n\n.u-cursor-x,\n.u-cursor-y {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n will-change: transform;\n}\n\n.u-hz .u-cursor-x,\n.u-vt .u-cursor-y {\n height: 100%;\n border-right: var(--c2-chart__crosshair--width,1px) dashed var(--c2-chart__crosshair--color,#a1a1aa);\n}\n\n.u-hz .u-cursor-y,\n.u-vt .u-cursor-x {\n width: 100%;\n border-bottom: var(--c2-chart__crosshair--width,1px) dashed var(--c2-chart__crosshair--color,#a1a1aa);\n}\n\n.u-cursor-pt {\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 50%;\n border: 0 solid;\n pointer-events: none;\n will-change: transform;\n /* Must stay !important: uPlot sets the `background` shorthand inline. */\n background-clip: padding-box !important;\n}\n\n.u-axis.u-off,\n.u-select.u-off,\n.u-cursor-x.u-off,\n.u-cursor-y.u-off,\n.u-cursor-pt.u-off {\n display: none;\n}";
|
|
9
|
+
var chart_default = "@charset \"UTF-8\";\n/* ex : var((width: 24px), width, c2-checkbox) returns var(--c2-checkbox-width, 24px) */\n:host {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: var(--c2-chart--width,100%);\n height: var(--c2-chart--height,320px);\n /*\n * The plot is absolutely positioned, so nothing inside the host contributes intrinsic width. As a flex\n * item — which is what every example frame in the docs site makes it — the host would otherwise shrink\n * to its legend, and to nothing at all when there is no legend. `min-width: 0` keeps it able to shrink\n * below its content when a layout genuinely needs that.\n */\n min-width: 0;\n padding: var(--c2-chart--padding,12px);\n background: var(--c2-chart--background,#ffffff);\n color: var(--c2-chart--color,#18181b);\n font-family: var(--c2-chart--font-family,inherit);\n font-size: var(--c2-chart--font-size,12px);\n border-top: var(--c2-chart--border-top,1px solid #e4e4e7);\n border-right: var(--c2-chart--border-right,1px solid #e4e4e7);\n border-bottom: var(--c2-chart--border-bottom,1px solid #e4e4e7);\n border-left: var(--c2-chart--border-left,1px solid #e4e4e7);\n border-top-left-radius: var(--c2-chart--border-top-left-radius,8px);\n border-top-right-radius: var(--c2-chart--border-top-right-radius,8px);\n border-bottom-left-radius: var(--c2-chart--border-bottom-left-radius,8px);\n border-bottom-right-radius: var(--c2-chart--border-bottom-right-radius,8px);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.frame {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n}\n\n/*\n * The plot area is the engine's territory. `contain: strict` plus absolute positioning means the canvas\n * the engine sizes inside it can never feed its own size back into the ResizeObserver watching this box,\n * which is what makes the resize loop structurally impossible rather than merely unlikely.\n */\n.plot-area {\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n overflow: hidden;\n}\n\n.plot {\n position: absolute;\n inset: 0;\n contain: strict;\n}\n\n/* uPlot has no entry animation. Reveal its already-rendered canvas once, when the adapter becomes ready. */\n:host([data-chart-engine=uplot][animation=auto]) .plot .u-under {\n animation: c2-chart-plot-reveal 500ms cubic-bezier(0.22, 1, 0.36, 1) both;\n}\n\n/* Bars enter from their baseline instead of using the line/area chart's horizontal reveal. */\n:host(c2-bar-chart[data-chart-engine=uplot][animation=auto]) .plot .u-under {\n animation-name: c2-chart-bar-grow;\n animation-duration: 600ms;\n}\n\n@keyframes c2-chart-plot-reveal {\n from {\n clip-path: inset(0 100% 0 0);\n opacity: 0.65;\n }\n to {\n clip-path: inset(0);\n opacity: 1;\n }\n}\n@keyframes c2-chart-bar-grow {\n from {\n clip-path: inset(100% 0 0);\n opacity: 0.65;\n }\n to {\n clip-path: inset(0);\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n :host([data-chart-engine=uplot][animation=auto]) .plot .u-under,\n :host(c2-bar-chart[data-chart-engine=uplot][animation=auto]) .plot .u-under {\n animation: none;\n }\n}\n.plot canvas {\n display: block;\n position: absolute;\n inset: 0;\n}\n\n.overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.tooltip {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n pointer-events: none;\n will-change: transform;\n display: flex;\n flex-direction: column;\n gap: var(--c2-chart__tooltip--gap,6px);\n padding: var(--c2-chart__tooltip--padding,8px 10px);\n border-radius: var(--c2-chart__tooltip--border-radius,6px);\n background: var(--c2-chart__tooltip--background-color,#18181b);\n color: var(--c2-chart__tooltip--color,#fafafa);\n font-size: var(--c2-chart__tooltip--font-size,12px);\n box-shadow: var(--c2-chart__tooltip--box-shadow,0 8px 24px rgba(24, 24, 27, 0.08));\n white-space: nowrap;\n}\n\n.tooltip[hidden] {\n display: none;\n}\n\n.tooltip-row {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.tooltip-marker {\n width: var(--c2-chart__legend-marker--size,10px);\n height: var(--c2-chart__legend-marker--size,10px);\n border-radius: var(--c2-chart__legend-marker--border-radius,999px);\n flex: none;\n}\n\n.tooltip-label {\n flex: 1 1 auto;\n}\n\n.tooltip-value {\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n}\n\n.actions {\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: auto;\n display: flex;\n gap: 4px;\n}\n\n.state {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--c2-chart__state--color,#71717a);\n font-size: var(--c2-chart__state--font-size,14px);\n background: var(--c2-chart--background,#ffffff);\n}\n\n.legend {\n display: flex;\n flex-wrap: wrap;\n gap: var(--c2-chart__legend--gap,12px);\n padding: var(--c2-chart__legend--padding,8px 0 0);\n color: var(--c2-chart__legend--color,#71717a);\n font-size: var(--c2-chart__legend--font-size,12px);\n}\n\n.legend--start,\n.legend--end {\n flex-direction: column;\n align-content: flex-start;\n flex: 0 0 auto;\n align-self: center;\n max-height: 100%;\n overflow: auto;\n}\n\n/* The legend is on an inline edge, so the frame runs as a row. */\n.frame--side {\n flex-direction: row;\n align-items: stretch;\n}\n\n.legend-item {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.legend-item[aria-pressed=false] {\n opacity: var(--c2-chart__legend__disabled--opacity,0.38);\n}\n\n.legend-marker {\n width: var(--c2-chart__legend-marker--size,10px);\n height: var(--c2-chart__legend-marker--size,10px);\n border-radius: var(--c2-chart__legend-marker--border-radius,999px);\n flex: none;\n}\n\n.definitions {\n display: none;\n}\n\n/*\n * Colour probes. `getComputedStyle().getPropertyValue()` hands back the author's text for a `var()` or\n * `color-mix()` chain, which no canvas engine can parse; the computed `color` of an element always\n * resolves to `rgb(…)`. `display: none` keeps them free.\n */\n.theme-probe {\n display: none;\n}\n.theme-probe i:nth-child(1) {\n color: var(--c2-chart__series-1--color,#0265dc);\n}\n.theme-probe i:nth-child(2) {\n color: var(--c2-chart__series-2--color,#ea580c);\n}\n.theme-probe i:nth-child(3) {\n color: var(--c2-chart__series-3--color,#0f766e);\n}\n.theme-probe i:nth-child(4) {\n color: var(--c2-chart__series-4--color,#db2777);\n}\n.theme-probe i:nth-child(5) {\n color: var(--c2-chart__series-5--color,#a16207);\n}\n.theme-probe i:nth-child(6) {\n color: var(--c2-chart__series-6--color,#7c3aed);\n}\n.theme-probe i:nth-child(7) {\n color: var(--c2-chart__series-7--color,#0891b2);\n}\n.theme-probe i:nth-child(8) {\n color: var(--c2-chart__series-8--color,#52525b);\n}\n.theme-probe i:nth-child(9) {\n color: var(--c2-chart__axis--color,#71717a);\n}\n.theme-probe i:nth-child(10) {\n color: var(--c2-chart__grid--color,#e4e4e7);\n}\n.theme-probe i:nth-child(11) {\n color: var(--c2-chart--color,#18181b);\n}\n.theme-probe i:nth-child(12) {\n color: var(--c2-chart__muted--color,#71717a);\n}\n.theme-probe i:nth-child(13) {\n color: var(--c2-chart__tooltip--background-color,#18181b);\n}\n.theme-probe i:nth-child(14) {\n color: var(--c2-chart__tooltip--color,#fafafa);\n}\n.theme-probe i:nth-child(15) {\n color: var(--c2-chart__crosshair--color,#a1a1aa);\n}\n.theme-probe i:nth-child(16) {\n color: var(--c2-chart__positive--color,#16a34a);\n}\n.theme-probe i:nth-child(17) {\n color: var(--c2-chart__negative--color,#dc2626);\n}\n.theme-probe i:nth-child(18) {\n color: var(--c2-chart__surface--color,#ffffff);\n}\n\n/*\n * uPlot's structural CSS, hand-ported.\n *\n * `uplot/dist/uPlot.min.css` is a global stylesheet and a shadow root cannot see it, so the rules the\n * engine's DOM depends on live here instead. Only the structural half is kept: the legend and title rules\n * are dropped because this component renders its own. Version-coupled to the `uplot` peer range — re-check\n * after an upgrade.\n */\n.uplot,\n.uplot *,\n.uplot *::before,\n.uplot *::after {\n box-sizing: border-box;\n}\n\n.uplot {\n font-family: var(--c2-chart--font-family,inherit);\n line-height: 1.5;\n width: min-content;\n}\n\n.u-wrap {\n position: relative;\n user-select: none;\n}\n\n.u-over,\n.u-under {\n position: absolute;\n}\n\n.u-under {\n overflow: hidden;\n}\n\n.uplot canvas {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.u-axis {\n position: absolute;\n}\n\n.u-select {\n position: absolute;\n pointer-events: none;\n background: rgba(0, 0, 0, 0.07);\n}\n\n.u-cursor-x,\n.u-cursor-y {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n will-change: transform;\n}\n\n.u-hz .u-cursor-x,\n.u-vt .u-cursor-y {\n height: 100%;\n border-right: var(--c2-chart__crosshair--width,1px) dashed var(--c2-chart__crosshair--color,#a1a1aa);\n}\n\n.u-hz .u-cursor-y,\n.u-vt .u-cursor-x {\n width: 100%;\n border-bottom: var(--c2-chart__crosshair--width,1px) dashed var(--c2-chart__crosshair--color,#a1a1aa);\n}\n\n.u-cursor-pt {\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 50%;\n border: 0 solid;\n pointer-events: none;\n will-change: transform;\n /* Must stay !important: uPlot sets the `background` shorthand inline. */\n background-clip: padding-box !important;\n}\n\n.u-axis.u-off,\n.u-select.u-off,\n.u-cursor-x.u-off,\n.u-cursor-y.u-off,\n.u-cursor-pt.u-off {\n display: none;\n}";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/chart-base.ts
|
|
12
12
|
/** Properties that only ever move data. A change limited to these takes the fast path. */
|
|
@@ -117,6 +117,7 @@ var RESIZE_EPSILON = 1;
|
|
|
117
117
|
* @cssproperty {pixel} [--c2-chart__line--width=2px] - Stroke width of a line series.
|
|
118
118
|
* @cssproperty {pixel} [--c2-chart__point--radius=2.5px] - Radius of a data point marker.
|
|
119
119
|
* @cssproperty {opacity} [--c2-chart__area--opacity=0.15] - Opacity of the fill under an area series.
|
|
120
|
+
* @cssproperty {number} [--c2-chart__bar--border-radius=0] - Roundedness of a bar's value end, from 0 (square) to 0.5 (fully rounded).
|
|
120
121
|
*
|
|
121
122
|
* @cssproperty {color} [--c2-chart__axis--color=#71717a] - Colour of the axis lines and tick labels.
|
|
122
123
|
* @cssproperty {font-size} [--c2-chart__axis--font-size=12px] - Font size of the tick labels.
|
|
@@ -158,7 +159,7 @@ var ChartBase = class extends LitElement {
|
|
|
158
159
|
this.xType = "linear";
|
|
159
160
|
this.legend = "bottom";
|
|
160
161
|
this.tooltip = "axis";
|
|
161
|
-
this.animation = "
|
|
162
|
+
this.animation = "auto";
|
|
162
163
|
this.loading = false;
|
|
163
164
|
this.error = "";
|
|
164
165
|
this.emptyMessage = "No data";
|
|
@@ -231,6 +232,14 @@ var ChartBase = class extends LitElement {
|
|
|
231
232
|
this.#intersectionObserver.observe(this);
|
|
232
233
|
} else this.#visible = true;
|
|
233
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Client-rendered charts connect before Lit creates their plot node. Observe it after the first render as
|
|
237
|
+
* well, so a chart whose initial layout is zero-sized still draws when its container becomes measurable.
|
|
238
|
+
*/
|
|
239
|
+
firstUpdated() {
|
|
240
|
+
if (this.plotElement) this.#resizeObserver?.observe(this.plotElement);
|
|
241
|
+
this.themeController.invalidate();
|
|
242
|
+
}
|
|
234
243
|
disconnectedCallback() {
|
|
235
244
|
super.disconnectedCallback();
|
|
236
245
|
this.removeEventListener(SERIES_CHANGE_EVENT, this.#handleSeriesChange);
|
|
@@ -240,6 +249,7 @@ var ChartBase = class extends LitElement {
|
|
|
240
249
|
this.#unsubscribe = void 0;
|
|
241
250
|
this.adapter?.destroy();
|
|
242
251
|
this.adapter = void 0;
|
|
252
|
+
this.removeAttribute("data-chart-engine");
|
|
243
253
|
this.removeAttribute("data-chart-ready");
|
|
244
254
|
}
|
|
245
255
|
/**
|
|
@@ -454,6 +464,7 @@ var ChartBase = class extends LitElement {
|
|
|
454
464
|
this.#optionsDirty = false;
|
|
455
465
|
this.#dataDirty = false;
|
|
456
466
|
this.restoreVisibility(adapter);
|
|
467
|
+
this.setAttribute("data-chart-engine", this.engineName);
|
|
457
468
|
this.setAttribute("data-chart-ready", "true");
|
|
458
469
|
this.dispatchEvent(new CustomEvent("chart-ready", { detail: { engine: this.engineName } }));
|
|
459
470
|
} catch (error) {
|
|
@@ -714,7 +725,10 @@ __decorate([property({
|
|
|
714
725
|
})], ChartBase.prototype, "xType", void 0);
|
|
715
726
|
__decorate([property({ type: String })], ChartBase.prototype, "legend", void 0);
|
|
716
727
|
__decorate([property({ type: String })], ChartBase.prototype, "tooltip", void 0);
|
|
717
|
-
__decorate([property({
|
|
728
|
+
__decorate([property({
|
|
729
|
+
type: String,
|
|
730
|
+
reflect: true
|
|
731
|
+
})], ChartBase.prototype, "animation", void 0);
|
|
718
732
|
__decorate([property({ type: String })], ChartBase.prototype, "locale", void 0);
|
|
719
733
|
__decorate([property({
|
|
720
734
|
type: Boolean,
|
package/dist/chart-base.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ChartBase } from "./chart-base-
|
|
1
|
+
import { t as ChartBase } from "./chart-base-CEZvMKwW.js";
|
|
2
2
|
export { ChartBase };
|
package/dist/chart-theme.js
CHANGED
|
@@ -61,7 +61,8 @@ var FALLBACK = {
|
|
|
61
61
|
fontFamily: "inherit",
|
|
62
62
|
fontSize: 12,
|
|
63
63
|
lineWidth: 2,
|
|
64
|
-
pointRadius: 2.5
|
|
64
|
+
pointRadius: 2.5,
|
|
65
|
+
barRadius: 0
|
|
65
66
|
};
|
|
66
67
|
/**
|
|
67
68
|
* Resolves and caches the host's chart theme, and invalidates it whenever the page's colour scheme moves.
|
|
@@ -143,7 +144,8 @@ var ChartThemeController = class {
|
|
|
143
144
|
fontFamily: style.getPropertyValue("--c2-chart--font-family").trim() || FALLBACK.fontFamily,
|
|
144
145
|
fontSize: scalar("--c2-chart--font-size", FALLBACK.fontSize),
|
|
145
146
|
lineWidth: scalar("--c2-chart__line--width", FALLBACK.lineWidth),
|
|
146
|
-
pointRadius: scalar("--c2-chart__point--radius", FALLBACK.pointRadius)
|
|
147
|
+
pointRadius: scalar("--c2-chart__point--radius", FALLBACK.pointRadius),
|
|
148
|
+
barRadius: Math.min(.5, Math.max(0, scalar("--c2-chart__bar--border-radius", FALLBACK.barRadius)))
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
};
|
package/dist/chart.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { t as ChartBase } from "./chart-base-
|
|
1
|
+
import { t as ChartBase } from "./chart-base-CEZvMKwW.js";
|
|
2
2
|
import { isChartFrame } from "./chart-types.js";
|
|
3
3
|
import { ChartFrameBuilder, columnValue } from "./chart-data.js";
|
|
4
4
|
import { ChartThemeController, PALETTE_SIZE, PROBE_COLORS } from "./chart-theme.js";
|
|
5
5
|
import { ChartSeries, SERIES_CHANGE_EVENT } from "./chart-series.js";
|
|
6
|
-
import { t as UplotChartBase } from "./uplot-chart-base-
|
|
6
|
+
import { t as UplotChartBase } from "./uplot-chart-base-CLhgOeM_.js";
|
|
7
7
|
import { LineChart } from "./line-chart.js";
|
|
8
8
|
import { AreaChart } from "./area-chart.js";
|
|
9
9
|
import { BarChart } from "./bar-chart.js";
|
|
10
10
|
import { Sparkline } from "./sparkline.js";
|
|
11
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
11
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
12
12
|
import { PieChart } from "./pie-chart.js";
|
|
13
13
|
import { GaugeChart } from "./gauge-chart.js";
|
|
14
|
+
import { RadarChart } from "./radar-chart.js";
|
|
14
15
|
import { ScatterChart } from "./scatter-chart.js";
|
|
15
16
|
import { CandlestickChart } from "./candlestick-chart.js";
|
|
16
17
|
import { t as ChartLegend } from "./chart-legend-DJE3HO7C.js";
|
|
17
18
|
import { t as ChartTooltip } from "./chart-tooltip-J-oC2DKZ.js";
|
|
18
|
-
export { AreaChart, BarChart, CandlestickChart, ChartBase, ChartFrameBuilder, ChartLegend, ChartSeries, ChartThemeController, ChartTooltip, EchartsChartBase, GaugeChart, LineChart, PALETTE_SIZE, PROBE_COLORS, PieChart, SERIES_CHANGE_EVENT, ScatterChart, Sparkline, UplotChartBase, columnValue, isChartFrame };
|
|
19
|
+
export { AreaChart, BarChart, CandlestickChart, ChartBase, ChartFrameBuilder, ChartLegend, ChartSeries, ChartThemeController, ChartTooltip, EchartsChartBase, GaugeChart, LineChart, PALETTE_SIZE, PROBE_COLORS, PieChart, RadarChart, SERIES_CHANGE_EVENT, ScatterChart, Sparkline, UplotChartBase, columnValue, isChartFrame };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { t as ChartBase } from "./chart-base-
|
|
1
|
+
import { t as ChartBase } from "./chart-base-CEZvMKwW.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
|
4
4
|
//#region src/engines/echarts-loader.ts
|
|
5
5
|
var LOADERS = {
|
|
6
6
|
pie: () => import("echarts/charts").then((m) => [m.PieChart]),
|
|
7
7
|
gauge: () => import("echarts/charts").then((m) => [m.GaugeChart]),
|
|
8
|
+
radar: () => import("echarts/charts").then((m) => [m.RadarChart]),
|
|
8
9
|
scatter: () => import("echarts/charts").then((m) => [m.ScatterChart]),
|
|
9
10
|
candlestick: () => import("echarts/charts").then((m) => [m.CandlestickChart]),
|
|
10
11
|
bar: () => import("echarts/charts").then((m) => [m.BarChart]),
|
|
@@ -204,8 +205,12 @@ var EchartsChartBase = class extends ChartBase {
|
|
|
204
205
|
}
|
|
205
206
|
buildOptions(context) {
|
|
206
207
|
const { theme, series } = context;
|
|
208
|
+
const animate = this.animation === "auto" && !globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
207
209
|
return {
|
|
208
|
-
animation:
|
|
210
|
+
animation: animate,
|
|
211
|
+
animationDuration: animate ? 500 : 0,
|
|
212
|
+
animationDurationUpdate: 0,
|
|
213
|
+
animationEasing: "cubicOut",
|
|
209
214
|
color: theme.palette,
|
|
210
215
|
textStyle: {
|
|
211
216
|
fontFamily: theme.fontFamily === "inherit" ? void 0 : theme.fontFamily,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
1
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
2
2
|
export { EchartsChartBase };
|
package/dist/gauge-chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import "./chart-series.js";
|
|
3
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
3
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
4
4
|
import { property } from "lit/decorators.js";
|
|
5
5
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
6
6
|
//#region src/gauge-chart.ts
|
|
@@ -17,6 +17,7 @@ var GaugeChart = class GaugeChart extends EchartsChartBase {
|
|
|
17
17
|
this.valueSuffix = "";
|
|
18
18
|
this.progress = "show";
|
|
19
19
|
this.pointer = "show";
|
|
20
|
+
this.marks = "show";
|
|
20
21
|
this.tooltip = "item";
|
|
21
22
|
this.legend = "none";
|
|
22
23
|
}
|
|
@@ -55,8 +56,14 @@ var GaugeChart = class GaugeChart extends EchartsChartBase {
|
|
|
55
56
|
width: 12,
|
|
56
57
|
color: [[1, context.theme.gridColor]]
|
|
57
58
|
} },
|
|
58
|
-
axisTick: {
|
|
59
|
-
|
|
59
|
+
axisTick: {
|
|
60
|
+
show: this.marks === "show",
|
|
61
|
+
lineStyle: { color: context.theme.axisColor }
|
|
62
|
+
},
|
|
63
|
+
splitLine: {
|
|
64
|
+
show: this.marks === "show",
|
|
65
|
+
lineStyle: { color: context.theme.axisColor }
|
|
66
|
+
},
|
|
60
67
|
axisLabel: {
|
|
61
68
|
color: context.theme.axisColor,
|
|
62
69
|
fontSize: context.theme.fontSize,
|
|
@@ -65,13 +72,13 @@ var GaugeChart = class GaugeChart extends EchartsChartBase {
|
|
|
65
72
|
title: {
|
|
66
73
|
color: context.theme.mutedColor,
|
|
67
74
|
fontSize: context.theme.fontSize,
|
|
68
|
-
offsetCenter: [0, "
|
|
75
|
+
offsetCenter: [0, "25%"]
|
|
69
76
|
},
|
|
70
77
|
detail: {
|
|
71
78
|
color: context.theme.color,
|
|
72
79
|
fontSize: Math.max(20, context.theme.fontSize * 1.8),
|
|
73
80
|
fontWeight: 650,
|
|
74
|
-
offsetCenter: [0, "
|
|
81
|
+
offsetCenter: [0, "-3%"],
|
|
75
82
|
formatter: formatValue
|
|
76
83
|
}
|
|
77
84
|
};
|
|
@@ -98,6 +105,7 @@ __decorate([property({
|
|
|
98
105
|
})], GaugeChart.prototype, "valueSuffix", void 0);
|
|
99
106
|
__decorate([property({ type: String })], GaugeChart.prototype, "progress", void 0);
|
|
100
107
|
__decorate([property({ type: String })], GaugeChart.prototype, "pointer", void 0);
|
|
108
|
+
__decorate([property({ type: String })], GaugeChart.prototype, "marks", void 0);
|
|
101
109
|
GaugeChart = __decorate([customElement("c2-gauge-chart")], GaugeChart);
|
|
102
110
|
//#endregion
|
|
103
111
|
export { GaugeChart };
|
package/dist/line-chart.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import "./chart-series.js";
|
|
3
|
-
import { t as UplotChartBase } from "./uplot-chart-base-
|
|
4
|
-
import { n as linePaths } from "./uplot-paths-
|
|
3
|
+
import { t as UplotChartBase } from "./uplot-chart-base-CLhgOeM_.js";
|
|
4
|
+
import { n as linePaths } from "./uplot-paths-D5HCEKRV.js";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
7
7
|
//#region src/line-chart.ts
|
package/dist/pie-chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import "./chart-series.js";
|
|
3
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
3
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
4
4
|
import { property, state } from "lit/decorators.js";
|
|
5
5
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
6
6
|
//#region src/pie-chart.ts
|
|
@@ -12,6 +12,7 @@ var PieChart = class PieChart extends EchartsChartBase {
|
|
|
12
12
|
this.outerRadius = .75;
|
|
13
13
|
this.startAngle = 90;
|
|
14
14
|
this.labels = "none";
|
|
15
|
+
this.labelContent = "name";
|
|
15
16
|
this.sort = "none";
|
|
16
17
|
this.hiddenSlices = /* @__PURE__ */ new Set();
|
|
17
18
|
this.tooltip = "item";
|
|
@@ -68,13 +69,22 @@ var PieChart = class PieChart extends EchartsChartBase {
|
|
|
68
69
|
show: this.labels !== "none",
|
|
69
70
|
position: this.labels === "inside" ? "inside" : "outside",
|
|
70
71
|
color: this.labels === "inside" ? theme.surface : theme.color,
|
|
71
|
-
fontSize: theme.fontSize
|
|
72
|
+
fontSize: theme.fontSize,
|
|
73
|
+
formatter: this.labelFormatter()
|
|
72
74
|
},
|
|
73
75
|
labelLine: { show: this.labels === "outside" },
|
|
74
76
|
itemStyle: sliceBorder(this, theme.surface),
|
|
75
77
|
sort: this.sort === "none" ? void 0 : this.sort === "asc" ? "ascending" : "descending"
|
|
76
78
|
};
|
|
77
79
|
}
|
|
80
|
+
labelFormatter() {
|
|
81
|
+
switch (this.labelContent) {
|
|
82
|
+
case "value": return "{c}";
|
|
83
|
+
case "percent": return "{d}%";
|
|
84
|
+
case "name-percent": return "{b} · {d}%";
|
|
85
|
+
default: return "{b}";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
78
88
|
};
|
|
79
89
|
__decorate([property({
|
|
80
90
|
type: Number,
|
|
@@ -89,6 +99,10 @@ __decorate([property({
|
|
|
89
99
|
attribute: "start-angle"
|
|
90
100
|
})], PieChart.prototype, "startAngle", void 0);
|
|
91
101
|
__decorate([property({ type: String })], PieChart.prototype, "labels", void 0);
|
|
102
|
+
__decorate([property({
|
|
103
|
+
type: String,
|
|
104
|
+
attribute: "label-content"
|
|
105
|
+
})], PieChart.prototype, "labelContent", void 0);
|
|
92
106
|
__decorate([property({ type: String })], PieChart.prototype, "sort", void 0);
|
|
93
107
|
__decorate([state()], PieChart.prototype, "hiddenSlices", void 0);
|
|
94
108
|
PieChart = __decorate([customElement("c2-pie-chart")], PieChart);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { columnValue } from "./chart-data.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
|
+
import "./chart-series.js";
|
|
4
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
5
|
+
import { property } from "lit/decorators.js";
|
|
6
|
+
import { customElement } from "@c2n/core/element-helper.js";
|
|
7
|
+
//#region src/radar-chart.ts
|
|
8
|
+
var RadarChart = class RadarChart extends EchartsChartBase {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.features = ["radar"];
|
|
12
|
+
this.min = 0;
|
|
13
|
+
this.shape = "polygon";
|
|
14
|
+
this.startAngle = 90;
|
|
15
|
+
this.splitNumber = 5;
|
|
16
|
+
this.points = "show";
|
|
17
|
+
this.xType = "category";
|
|
18
|
+
this.tooltip = "item";
|
|
19
|
+
}
|
|
20
|
+
coordinateSystem(context) {
|
|
21
|
+
const { theme } = context;
|
|
22
|
+
return { radar: {
|
|
23
|
+
indicator: this.indicators(),
|
|
24
|
+
shape: this.shape,
|
|
25
|
+
startAngle: this.startAngle,
|
|
26
|
+
splitNumber: Math.max(1, Math.trunc(this.splitNumber)),
|
|
27
|
+
radius: "68%",
|
|
28
|
+
axisName: {
|
|
29
|
+
color: theme.axisColor,
|
|
30
|
+
fontSize: theme.fontSize
|
|
31
|
+
},
|
|
32
|
+
axisLine: { lineStyle: { color: theme.gridColor } },
|
|
33
|
+
splitLine: { lineStyle: { color: theme.gridColor } },
|
|
34
|
+
splitArea: { show: false }
|
|
35
|
+
} };
|
|
36
|
+
}
|
|
37
|
+
seriesOption(index, context) {
|
|
38
|
+
const series = context.series[index] ?? { field: "" };
|
|
39
|
+
const color = this.colorOf(series, index, context.theme);
|
|
40
|
+
return {
|
|
41
|
+
type: "radar",
|
|
42
|
+
symbol: this.points === "show" ? "circle" : "none",
|
|
43
|
+
symbolSize: context.theme.pointRadius * 2,
|
|
44
|
+
lineStyle: {
|
|
45
|
+
color,
|
|
46
|
+
width: series.lineWidth ?? context.theme.lineWidth
|
|
47
|
+
},
|
|
48
|
+
itemStyle: { color },
|
|
49
|
+
areaStyle: {
|
|
50
|
+
color,
|
|
51
|
+
opacity: this.fillOpacity ?? this.areaOpacity()
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
projectData(frame, context) {
|
|
56
|
+
return context.series.map((series, seriesIndex) => {
|
|
57
|
+
const column = frame.columns[seriesIndex];
|
|
58
|
+
const values = new Array(frame.length);
|
|
59
|
+
for (let index = 0; index < frame.length; index += 1) values[index] = column ? columnValue(column, index) : null;
|
|
60
|
+
return [{
|
|
61
|
+
name: series.label ?? series.field,
|
|
62
|
+
value: values
|
|
63
|
+
}];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
indicators() {
|
|
67
|
+
const frame = this.frame;
|
|
68
|
+
if (!frame) return [];
|
|
69
|
+
return Array.from({ length: frame.length }, (_, indicatorIndex) => ({
|
|
70
|
+
name: frame.labels?.[indicatorIndex] ?? String(indicatorIndex + 1),
|
|
71
|
+
min: this.min,
|
|
72
|
+
max: this.max ?? this.indicatorMax(frame, indicatorIndex)
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
indicatorMax(frame, indicatorIndex) {
|
|
76
|
+
let largest = this.min;
|
|
77
|
+
for (const column of frame.columns) {
|
|
78
|
+
const value = columnValue(column, indicatorIndex);
|
|
79
|
+
if (value !== null) largest = Math.max(largest, value);
|
|
80
|
+
}
|
|
81
|
+
if (largest <= this.min) return this.min + 1;
|
|
82
|
+
const padded = largest + (largest - this.min) * .1;
|
|
83
|
+
const magnitude = 10 ** Math.floor(Math.log10(Math.abs(padded)));
|
|
84
|
+
return Math.ceil(padded / magnitude) * magnitude;
|
|
85
|
+
}
|
|
86
|
+
areaOpacity() {
|
|
87
|
+
const raw = parseFloat(getComputedStyle(this).getPropertyValue("--c2-chart__area--opacity"));
|
|
88
|
+
return Number.isFinite(raw) ? raw : .15;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
__decorate([property({ type: Number })], RadarChart.prototype, "min", void 0);
|
|
92
|
+
__decorate([property({ type: Number })], RadarChart.prototype, "max", void 0);
|
|
93
|
+
__decorate([property({ type: String })], RadarChart.prototype, "shape", void 0);
|
|
94
|
+
__decorate([property({
|
|
95
|
+
type: Number,
|
|
96
|
+
attribute: "start-angle"
|
|
97
|
+
})], RadarChart.prototype, "startAngle", void 0);
|
|
98
|
+
__decorate([property({
|
|
99
|
+
type: Number,
|
|
100
|
+
attribute: "split-number"
|
|
101
|
+
})], RadarChart.prototype, "splitNumber", void 0);
|
|
102
|
+
__decorate([property({ type: String })], RadarChart.prototype, "points", void 0);
|
|
103
|
+
__decorate([property({
|
|
104
|
+
type: Number,
|
|
105
|
+
attribute: "fill-opacity"
|
|
106
|
+
})], RadarChart.prototype, "fillOpacity", void 0);
|
|
107
|
+
RadarChart = __decorate([customElement("c2-radar-chart")], RadarChart);
|
|
108
|
+
//#endregion
|
|
109
|
+
export { RadarChart };
|
package/dist/scatter-chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import "./chart-series.js";
|
|
3
|
-
import { t as EchartsChartBase } from "./echarts-chart-base-
|
|
3
|
+
import { t as EchartsChartBase } from "./echarts-chart-base-CImXMzVk.js";
|
|
4
4
|
import { property } from "lit/decorators.js";
|
|
5
5
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
6
6
|
//#region src/scatter-chart.ts
|
package/dist/sparkline.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as chart_default } from "./chart-base-
|
|
1
|
+
import { n as chart_default } from "./chart-base-CEZvMKwW.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
|
-
import { t as UplotChartBase } from "./uplot-chart-base-
|
|
4
|
-
import { n as linePaths, r as withAlpha } from "./uplot-paths-
|
|
3
|
+
import { t as UplotChartBase } from "./uplot-chart-base-CLhgOeM_.js";
|
|
4
|
+
import { n as linePaths, r as withAlpha } from "./uplot-paths-D5HCEKRV.js";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { customElement } from "@c2n/core/element-helper.js";
|
|
7
7
|
import { css, unsafeCSS } from "lit";
|
package/dist/uplot-chart-base.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as UplotChartBase } from "./uplot-chart-base-
|
|
1
|
+
import { t as UplotChartBase } from "./uplot-chart-base-CLhgOeM_.js";
|
|
2
2
|
export { UplotChartBase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as loadedUplot } from "./uplot-chart-base-
|
|
1
|
+
import { n as loadedUplot } from "./uplot-chart-base-CLhgOeM_.js";
|
|
2
2
|
//#region src/engines/uplot-paths.ts
|
|
3
3
|
var cache = /* @__PURE__ */ new Map();
|
|
4
4
|
/**
|
|
@@ -45,8 +45,8 @@ var SCALE_VALUE = 1;
|
|
|
45
45
|
* Grouping is therefore ours to do: `disp` gives uPlot an explicit left edge and width per bar — in data
|
|
46
46
|
* units, which is what it reads when no `unit` is set — placing each series in its own slot of the band.
|
|
47
47
|
*/
|
|
48
|
-
function barPaths(width, gap, index, count) {
|
|
49
|
-
const key = `${width}:${gap}:${index}:${count}`;
|
|
48
|
+
function barPaths(width, gap, index, count, radius = 0) {
|
|
49
|
+
const key = `${width}:${gap}:${index}:${count}:${radius}`;
|
|
50
50
|
if (barCache.has(key)) return barCache.get(key);
|
|
51
51
|
const paths = loadedUplot()?.paths;
|
|
52
52
|
if (!paths) return void 0;
|
|
@@ -55,8 +55,10 @@ function barPaths(width, gap, index, count) {
|
|
|
55
55
|
Infinity,
|
|
56
56
|
1
|
|
57
57
|
];
|
|
58
|
+
const roundedEnd = [radius, 0];
|
|
58
59
|
const builder = count > 1 ? paths.bars?.({
|
|
59
60
|
size,
|
|
61
|
+
radius: roundedEnd,
|
|
60
62
|
disp: {
|
|
61
63
|
x0: {
|
|
62
64
|
unit: SCALE_VALUE,
|
|
@@ -67,7 +69,10 @@ function barPaths(width, gap, index, count) {
|
|
|
67
69
|
values: (self) => [layout(self, width, gap, count).barWidth]
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
}) : paths.bars?.({
|
|
72
|
+
}) : paths.bars?.({
|
|
73
|
+
size,
|
|
74
|
+
radius: roundedEnd
|
|
75
|
+
});
|
|
71
76
|
barCache.set(key, builder);
|
|
72
77
|
return builder;
|
|
73
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/chart",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/chart.js",
|
|
6
6
|
"exports": {
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./types/src/gauge-chart.d.ts",
|
|
33
33
|
"default": "./dist/gauge-chart.js"
|
|
34
34
|
},
|
|
35
|
+
"./radar-chart.js": {
|
|
36
|
+
"types": "./types/src/radar-chart.d.ts",
|
|
37
|
+
"default": "./dist/radar-chart.js"
|
|
38
|
+
},
|
|
35
39
|
"./scatter-chart.js": {
|
|
36
40
|
"types": "./types/src/scatter-chart.d.ts",
|
|
37
41
|
"default": "./dist/scatter-chart.js"
|
|
@@ -105,6 +109,7 @@
|
|
|
105
109
|
"data visualization",
|
|
106
110
|
"line chart",
|
|
107
111
|
"gauge chart",
|
|
112
|
+
"radar chart",
|
|
108
113
|
"scatter plot",
|
|
109
114
|
"candlestick chart",
|
|
110
115
|
"sparkline",
|
|
@@ -144,7 +149,7 @@
|
|
|
144
149
|
}
|
|
145
150
|
},
|
|
146
151
|
"dependencies": {
|
|
147
|
-
"@c2n/core": "0.0.
|
|
152
|
+
"@c2n/core": "0.0.9",
|
|
148
153
|
"lit": "3.3.3"
|
|
149
154
|
},
|
|
150
155
|
"devDependencies": {
|
|
@@ -165,5 +170,5 @@
|
|
|
165
170
|
"optional": true
|
|
166
171
|
}
|
|
167
172
|
},
|
|
168
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "e4768cce5e0fbd5bc3165cd493a1e8d57cf0fff4"
|
|
169
174
|
}
|
package/react.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import type { ChartTooltip } from '@c2n/chart/chart-tooltip.js'
|
|
|
17
17
|
import type { GaugeChart } from '@c2n/chart/gauge-chart.js'
|
|
18
18
|
import type { LineChart } from '@c2n/chart/line-chart.js'
|
|
19
19
|
import type { PieChart } from '@c2n/chart/pie-chart.js'
|
|
20
|
+
import type { RadarChart } from '@c2n/chart/radar-chart.js'
|
|
20
21
|
import type { ScatterChart } from '@c2n/chart/scatter-chart.js'
|
|
21
22
|
import type { Sparkline } from '@c2n/chart/sparkline.js'
|
|
22
23
|
|
|
@@ -35,6 +36,7 @@ declare module 'react' {
|
|
|
35
36
|
'c2-gauge-chart': C2Props<GaugeChart>
|
|
36
37
|
'c2-line-chart': C2Props<LineChart>
|
|
37
38
|
'c2-pie-chart': C2Props<PieChart>
|
|
39
|
+
'c2-radar-chart': C2Props<RadarChart>
|
|
38
40
|
'c2-scatter-chart': C2Props<ScatterChart>
|
|
39
41
|
'c2-sparkline': C2Props<Sparkline>
|
|
40
42
|
}
|
|
@@ -111,6 +111,7 @@ export interface ChartBase {
|
|
|
111
111
|
* @cssproperty {pixel} [--c2-chart__line--width=2px] - Stroke width of a line series.
|
|
112
112
|
* @cssproperty {pixel} [--c2-chart__point--radius=2.5px] - Radius of a data point marker.
|
|
113
113
|
* @cssproperty {opacity} [--c2-chart__area--opacity=0.15] - Opacity of the fill under an area series.
|
|
114
|
+
* @cssproperty {number} [--c2-chart__bar--border-radius=0] - Roundedness of a bar's value end, from 0 (square) to 0.5 (fully rounded).
|
|
114
115
|
*
|
|
115
116
|
* @cssproperty {color} [--c2-chart__axis--color=#71717a] - Colour of the axis lines and tick labels.
|
|
116
117
|
* @cssproperty {font-size} [--c2-chart__axis--font-size=12px] - Font size of the tick labels.
|
|
@@ -173,9 +174,10 @@ export declare abstract class ChartBase extends LitElement {
|
|
|
173
174
|
/** Whether the tooltip follows the whole x position or only the hovered datum. */
|
|
174
175
|
tooltip: 'none' | 'item' | 'axis';
|
|
175
176
|
/**
|
|
176
|
-
* Whether the
|
|
177
|
-
*
|
|
178
|
-
*
|
|
177
|
+
* Whether the chart animates its initial draw. ECharts uses its native shape animation and uPlot uses a
|
|
178
|
+
* lightweight plot reveal; subsequent data updates stay immediate so a live source does not animate
|
|
179
|
+
* every tick. Named `animation` rather than `animate` because `HTMLElement.animate()` is a method every
|
|
180
|
+
* element already has, and shadowing it breaks the Web Animations API on the host.
|
|
179
181
|
*/
|
|
180
182
|
animation: 'none' | 'auto';
|
|
181
183
|
/** BCP 47 locale for the axis and tooltip formatting. Defaults to the browser locale. */
|
|
@@ -217,6 +219,11 @@ export declare abstract class ChartBase extends LitElement {
|
|
|
217
219
|
/** Whether changing chart data can change the legend model. Pie charts use row labels as entries. */
|
|
218
220
|
protected get legendDependsOnData(): boolean;
|
|
219
221
|
connectedCallback(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Client-rendered charts connect before Lit creates their plot node. Observe it after the first render as
|
|
224
|
+
* well, so a chart whose initial layout is zero-sized still draws when its container becomes measurable.
|
|
225
|
+
*/
|
|
226
|
+
protected firstUpdated(): void;
|
|
220
227
|
disconnectedCallback(): void;
|
|
221
228
|
/**
|
|
222
229
|
* The fast path. A change confined to `data`/`revision` on a live chart is pushed into the engine here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-base.d.ts","sourceRoot":"","sources":["../../src/chart-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsC,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAGnI,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEhG,OAAO,EAAE,iBAAiB,EAAe,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EAEpB,MAAM,kBAAkB,CAAA;AAiCzB,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,iBAAiB,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wEAAwE;AACxE,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAYD,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,W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,cAAc;IA2B3C,2GAA2G;IAC3G,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,WAAW;IASnB;;;;OAIG;IACH,SAAS,CAAC,WAAW,IAAI,eAAe,EAAE;IAW1C,OAAO,CAAC,YAAY;CAqBrB"}
|
|
@@ -42,6 +42,8 @@ export interface ChartTheme {
|
|
|
42
42
|
fontSize: number;
|
|
43
43
|
lineWidth: number;
|
|
44
44
|
pointRadius: number;
|
|
45
|
+
/** Roundedness of a bar's value end, expressed as a 0–0.5 share of its width. */
|
|
46
|
+
barRadius: number;
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Resolves and caches the host's chart theme, and invalidates it whenever the page's colour scheme moves.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-theme.d.ts","sourceRoot":"","sources":["../../src/chart-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAA;AAEpF,mGAAmG;AACnG,KAAK,SAAS,GAAG,sBAAsB,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAA;CAAE,CAAA;AAE5F,wFAAwF;AACxF,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B;;;GAGG;AACH,eAAO,MAAM,YAAY,kOAmBf,CAAA;AAEV,gFAAgF;AAChF,MAAM,WAAW,UAAU;IACzB,yEAAyE;IACzE,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,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,CAAA;CAClB;AAqBD;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,kBAAkB;;gBAOjD,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,IAAI;IAMjD,0EAA0E;IAC1E,IAAI,KAAK,IAAI,UAAU,CAGtB;IAED,+EAA+E;IAC/E,UAAU,IAAI,IAAI;IAKlB,aAAa,IAAI,IAAI;IAarB,gBAAgB,IAAI,IAAI;CAkDzB"}
|
package/types/src/chart.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import './bar-chart.js';
|
|
|
10
10
|
import './sparkline.js';
|
|
11
11
|
import './pie-chart.js';
|
|
12
12
|
import './gauge-chart.js';
|
|
13
|
+
import './radar-chart.js';
|
|
13
14
|
import './scatter-chart.js';
|
|
14
15
|
import './candlestick-chart.js';
|
|
15
16
|
import './chart-series.js';
|
|
@@ -24,6 +25,7 @@ export { BarChart } from './bar-chart.js';
|
|
|
24
25
|
export { Sparkline } from './sparkline.js';
|
|
25
26
|
export { PieChart } from './pie-chart.js';
|
|
26
27
|
export { GaugeChart } from './gauge-chart.js';
|
|
28
|
+
export { RadarChart } from './radar-chart.js';
|
|
27
29
|
export { ScatterChart } from './scatter-chart.js';
|
|
28
30
|
export { CandlestickChart } from './candlestick-chart.js';
|
|
29
31
|
export { ChartSeries, SERIES_CHANGE_EVENT } from './chart-series.js';
|
package/types/src/chart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/chart.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AACxB,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,kBAAkB,CAAA;AACzB,OAAO,oBAAoB,CAAA;AAC3B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,mBAAmB,CAAA;AAC1B,O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E/D,wCAAwC;IACxC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnG,yGAAyG;IACzG,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;cAW5D,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC;cAMtC,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO;IAItF,sFAAsF;IACtF,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO;cAI3D,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO;CA0BrE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type * as echarts from 'echarts/core';
|
|
9
9
|
/** A registerable ECharts module, keyed by the chart type or component that needs it. */
|
|
10
|
-
export type EchartsFeature = 'pie' | 'gauge' | 'scatter' | 'candlestick' | 'bar' | 'line' | 'grid' | 'legend' | 'tooltip' | 'dataZoom';
|
|
10
|
+
export type EchartsFeature = 'pie' | 'gauge' | 'radar' | 'scatter' | 'candlestick' | 'bar' | 'line' | 'grid' | 'legend' | 'tooltip' | 'dataZoom';
|
|
11
11
|
/**
|
|
12
12
|
* Loads `echarts/core`, registers `features` and the chosen renderer, and returns the core namespace.
|
|
13
13
|
* Registration is idempotent and deduped, so calling this per element is cheap after the first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echarts-loader.d.ts","sourceRoot":"","sources":["../../../src/engines/echarts-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAE5C,yFAAyF;AACzF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"echarts-loader.d.ts","sourceRoot":"","sources":["../../../src/engines/echarts-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAE5C,yFAAyF;AACzF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;AAsBhJ;;;GAGG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC,OAAO,OAAO,CAAC,CA0B1H"}
|
|
@@ -21,5 +21,5 @@ export declare function withAlpha(color: string, alpha: number): string;
|
|
|
21
21
|
* Grouping is therefore ours to do: `disp` gives uPlot an explicit left edge and width per bar — in data
|
|
22
22
|
* units, which is what it reads when no `unit` is set — placing each series in its own slot of the band.
|
|
23
23
|
*/
|
|
24
|
-
export declare function barPaths(width: number, gap: number, index: number, count: number): Series.PathBuilder | undefined;
|
|
24
|
+
export declare function barPaths(width: number, gap: number, index: number, count: number, radius?: number): Series.PathBuilder | undefined;
|
|
25
25
|
//# sourceMappingURL=uplot-paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uplot-paths.d.ts","sourceRoot":"","sources":["../../../src/engines/uplot-paths.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAGnC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAIrD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,WAAW,GAAG,SAAS,CAa3E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAa9D;AAOD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,WAAW,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"uplot-paths.d.ts","sourceRoot":"","sources":["../../../src/engines/uplot-paths.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAGnC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAIrD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,WAAW,GAAG,SAAS,CAa3E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAa9D;AAOD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAAC,WAAW,GAAG,SAAS,CA6B7H"}
|
|
@@ -39,6 +39,8 @@ export declare class GaugeChart extends EchartsChartBase {
|
|
|
39
39
|
progress: 'show' | 'none';
|
|
40
40
|
/** Whether to draw the radial pointer. */
|
|
41
41
|
pointer: 'show' | 'none';
|
|
42
|
+
/** Whether to draw the small axis ticks and division lines around the arc. */
|
|
43
|
+
marks: 'show' | 'none';
|
|
42
44
|
constructor();
|
|
43
45
|
protected coordinateSystem(): Record<string, unknown>;
|
|
44
46
|
protected dataShape(): 'named';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge-chart.d.ts","sourceRoot":"","sources":["../../src/gauge-chart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,mBAAmB,CAAA;AAE1B,MAAM,WAAW,UAAU;IACzB,gBAAgB,EAAE,qBAAqB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;IAClE,mBAAmB,EAAE,wBAAwB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;CACzE;AAED;;;;;;;;;;GAUG;AACH,qBACa,UAAW,SAAQ,gBAAgB;IAC9C,mBAA4B,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAY;IAE3E,uCAAuC;IACX,GAAG,SAAI;IAEnC,wCAAwC;IACZ,GAAG,SAAM;IAErC,mFAAmF;IAC7B,UAAU,SAAM;IAEtE,iFAAiF;IAC7B,QAAQ,SAAM;IAElE,mDAAmD;IACI,WAAW,SAAI;IAEtE,mEAAmE;IACvC,SAAS,SAAI;IAEzC,wEAAwE;IACjB,WAAW,SAAK;IAEvE,uEAAuE;IAC3C,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAS;IAE9D,0CAA0C;IACd,OAAO,EAAE,MAAM,GAAG,MAAM,CAAS;;
|
|
1
|
+
{"version":3,"file":"gauge-chart.d.ts","sourceRoot":"","sources":["../../src/gauge-chart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA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"}
|
package/types/src/pie-chart.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare class PieChart extends EchartsChartBase {
|
|
|
35
35
|
startAngle: number;
|
|
36
36
|
/** Where the slice labels are drawn, or `none` to leave them off. */
|
|
37
37
|
labels: 'none' | 'inside' | 'outside';
|
|
38
|
+
/** Content shown by visible slice labels. */
|
|
39
|
+
labelContent: 'name' | 'value' | 'percent' | 'name-percent';
|
|
38
40
|
/** Orders the slices by value rather than keeping the data order. */
|
|
39
41
|
sort: 'none' | 'asc' | 'desc';
|
|
40
42
|
constructor();
|
|
@@ -53,6 +55,7 @@ export declare class PieChart extends EchartsChartBase {
|
|
|
53
55
|
protected restoreVisibility(adapter: ChartAdapter): void;
|
|
54
56
|
protected dataShape(): 'pairs' | 'values' | 'named';
|
|
55
57
|
protected seriesOption(_index: number, context: ChartBuildContext): Record<string, unknown>;
|
|
58
|
+
private labelFormatter;
|
|
56
59
|
}
|
|
57
60
|
declare global {
|
|
58
61
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pie-chart.d.ts","sourceRoot":"","sources":["../../src/pie-chart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,mBAAmB,CAAA;AAE1B,MAAM,WAAW,QAAQ;IACvB,gBAAgB,EAAE,qBAAqB,CA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G,OAAO;cAIzC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsBpG,OAAO,CAAC,cAAc;CAYvB;AAYD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,QAAQ,CAAA;KACzB;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TypedAddEventListener, TypedRemoveEventListener } from '@c2n/core/event-helper.js';
|
|
2
|
+
import { EchartsChartBase } from './echarts-chart-base.js';
|
|
3
|
+
import type { ChartEventMap } from './chart-base.js';
|
|
4
|
+
import type { ChartBuildContext } from './chart-adapter.js';
|
|
5
|
+
import type { EchartsFeature } from './engines/echarts-loader.js';
|
|
6
|
+
import type { ChartFrame } from './chart-types.js';
|
|
7
|
+
import './chart-series.js';
|
|
8
|
+
export interface RadarChart {
|
|
9
|
+
addEventListener: TypedAddEventListener<RadarChart, ChartEventMap>;
|
|
10
|
+
removeEventListener: TypedRemoveEventListener<RadarChart, ChartEventMap>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A radar chart drawn by ECharts. Each data row is an indicator named by `label-field`; each
|
|
14
|
+
* `c2-chart-series` is one comparable profile drawn across those indicators.
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <c2-radar-chart label-field="metric" max="100"
|
|
18
|
+
* data='[{"metric":"Quality","current":82,"target":90},{"metric":"Speed","current":74,"target":85}]'>
|
|
19
|
+
* <c2-chart-series field="current" label="Current"></c2-chart-series>
|
|
20
|
+
* <c2-chart-series field="target" label="Target"></c2-chart-series>
|
|
21
|
+
* </c2-radar-chart>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @tag c2-radar-chart
|
|
25
|
+
*/
|
|
26
|
+
export declare class RadarChart extends EchartsChartBase {
|
|
27
|
+
protected readonly features: readonly EchartsFeature[];
|
|
28
|
+
/** Lowest value shared by every indicator. */
|
|
29
|
+
min: number;
|
|
30
|
+
/** Highest value shared by every indicator. Auto-ranged per indicator when unset. */
|
|
31
|
+
max?: number;
|
|
32
|
+
/** Shape of the indicator grid. */
|
|
33
|
+
shape: 'polygon' | 'circle';
|
|
34
|
+
/** Angle of the first indicator, in degrees counter-clockwise from three o'clock. */
|
|
35
|
+
startAngle: number;
|
|
36
|
+
/** Number of concentric divisions in the indicator grid. */
|
|
37
|
+
splitNumber: number;
|
|
38
|
+
/** Whether to draw point markers at the indicator values. */
|
|
39
|
+
points: 'show' | 'none';
|
|
40
|
+
/** Opacity of each profile's fill. Falls back to `--c2-chart__area--opacity`. */
|
|
41
|
+
fillOpacity?: number;
|
|
42
|
+
constructor();
|
|
43
|
+
protected coordinateSystem(context: ChartBuildContext): Record<string, unknown>;
|
|
44
|
+
protected seriesOption(index: number, context: ChartBuildContext): Record<string, unknown>;
|
|
45
|
+
protected projectData(frame: ChartFrame, context: ChartBuildContext): unknown;
|
|
46
|
+
private indicators;
|
|
47
|
+
private indicatorMax;
|
|
48
|
+
private areaOpacity;
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'c2-radar-chart': RadarChart;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=radar-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radar-chart.d.ts","sourceRoot":"","sources":["../../src/radar-chart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,M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|
import type { GaugeChart, GaugeChartEventMap } from '@c2n/chart/gauge-chart.js'
|
|
18
18
|
import type { LineChart, LineChartEventMap } from '@c2n/chart/line-chart.js'
|
|
19
19
|
import type { PieChart, PieChartEventMap } from '@c2n/chart/pie-chart.js'
|
|
20
|
+
import type { RadarChart, RadarChartEventMap } from '@c2n/chart/radar-chart.js'
|
|
20
21
|
import type { ScatterChart, ScatterChartEventMap } from '@c2n/chart/scatter-chart.js'
|
|
21
22
|
import type { Sparkline, SparklineEventMap } from '@c2n/chart/sparkline.js'
|
|
22
23
|
|
|
@@ -146,6 +147,7 @@ declare module 'vue' {
|
|
|
146
147
|
'inner-radius'?: unknown
|
|
147
148
|
'outer-radius'?: unknown
|
|
148
149
|
'start-angle'?: unknown
|
|
150
|
+
'label-content'?: unknown
|
|
149
151
|
'x-field'?: unknown
|
|
150
152
|
'label-field'?: unknown
|
|
151
153
|
'x-type'?: unknown
|
|
@@ -162,6 +164,27 @@ declare module 'vue' {
|
|
|
162
164
|
onPointClick?: (event: PieChartEventMap['point-click']) => void
|
|
163
165
|
}
|
|
164
166
|
>
|
|
167
|
+
'c2-radar-chart': DefineComponent<
|
|
168
|
+
C2Props<RadarChart> & {
|
|
169
|
+
'start-angle'?: unknown
|
|
170
|
+
'split-number'?: unknown
|
|
171
|
+
'fill-opacity'?: unknown
|
|
172
|
+
'x-field'?: unknown
|
|
173
|
+
'label-field'?: unknown
|
|
174
|
+
'x-type'?: unknown
|
|
175
|
+
'empty-message'?: unknown
|
|
176
|
+
'max-points'?: unknown
|
|
177
|
+
'lazy-render'?: unknown
|
|
178
|
+
onTooltipChange?: (event: RadarChartEventMap['tooltip-change']) => void
|
|
179
|
+
onSeriesToggle?: (event: RadarChartEventMap['series-toggle']) => void
|
|
180
|
+
onLegendChange?: (event: RadarChartEventMap['legend-change']) => void
|
|
181
|
+
onRangeChange?: (event: RadarChartEventMap['range-change']) => void
|
|
182
|
+
onChartReady?: (event: RadarChartEventMap['chart-ready']) => void
|
|
183
|
+
onChartError?: (event: RadarChartEventMap['chart-error']) => void
|
|
184
|
+
onPointHover?: (event: RadarChartEventMap['point-hover']) => void
|
|
185
|
+
onPointClick?: (event: RadarChartEventMap['point-click']) => void
|
|
186
|
+
}
|
|
187
|
+
>
|
|
165
188
|
'c2-scatter-chart': DefineComponent<
|
|
166
189
|
C2Props<ScatterChart> & {
|
|
167
190
|
'symbol-size'?: unknown
|