@aura-react-comp/charts 0.0.0-stage → 0.3.1
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/LICENSE +21 -0
- package/README.md +90 -2
- package/esm/charts/area-chart/index.d.ts +19 -0
- package/esm/charts/area-chart/index.d.ts.map +1 -0
- package/esm/charts/area-chart/index.js +31 -0
- package/esm/charts/bar-chart/index.d.ts +16 -0
- package/esm/charts/bar-chart/index.d.ts.map +1 -0
- package/esm/charts/bar-chart/index.js +28 -0
- package/esm/charts/candlestick-chart/index.d.ts +47 -0
- package/esm/charts/candlestick-chart/index.d.ts.map +1 -0
- package/esm/charts/candlestick-chart/index.js +347 -0
- package/esm/charts/combo-chart/index.d.ts +17 -0
- package/esm/charts/combo-chart/index.d.ts.map +1 -0
- package/esm/charts/combo-chart/index.js +26 -0
- package/esm/charts/funnel-chart/index.d.ts +35 -0
- package/esm/charts/funnel-chart/index.d.ts.map +1 -0
- package/esm/charts/funnel-chart/index.js +200 -0
- package/esm/charts/gauge-chart/index.d.ts +41 -0
- package/esm/charts/gauge-chart/index.d.ts.map +1 -0
- package/esm/charts/gauge-chart/index.js +217 -0
- package/esm/charts/graph-chart/index.d.ts +35 -0
- package/esm/charts/graph-chart/index.d.ts.map +1 -0
- package/esm/charts/graph-chart/index.js +224 -0
- package/esm/charts/heatmap-chart/index.d.ts +47 -0
- package/esm/charts/heatmap-chart/index.d.ts.map +1 -0
- package/esm/charts/heatmap-chart/index.js +281 -0
- package/esm/charts/line-chart/index.d.ts +23 -0
- package/esm/charts/line-chart/index.d.ts.map +1 -0
- package/esm/charts/line-chart/index.js +33 -0
- package/esm/charts/pie-chart/index.d.ts +38 -0
- package/esm/charts/pie-chart/index.d.ts.map +1 -0
- package/esm/charts/pie-chart/index.js +272 -0
- package/esm/charts/radar-chart/index.d.ts +44 -0
- package/esm/charts/radar-chart/index.d.ts.map +1 -0
- package/esm/charts/radar-chart/index.js +263 -0
- package/esm/charts/ring-progress/index.d.ts +38 -0
- package/esm/charts/ring-progress/index.d.ts.map +1 -0
- package/esm/charts/ring-progress/index.js +137 -0
- package/esm/charts/sankey-chart/index.d.ts +34 -0
- package/esm/charts/sankey-chart/index.d.ts.map +1 -0
- package/esm/charts/sankey-chart/index.js +248 -0
- package/esm/charts/scatter-chart/index.d.ts +34 -0
- package/esm/charts/scatter-chart/index.d.ts.map +1 -0
- package/esm/charts/scatter-chart/index.js +305 -0
- package/esm/charts/sparkline/index.d.ts +31 -0
- package/esm/charts/sparkline/index.d.ts.map +1 -0
- package/esm/charts/sparkline/index.js +152 -0
- package/esm/charts/tree-chart/index.d.ts +34 -0
- package/esm/charts/tree-chart/index.d.ts.map +1 -0
- package/esm/charts/tree-chart/index.js +200 -0
- package/esm/charts/treemap-chart/index.d.ts +35 -0
- package/esm/charts/treemap-chart/index.d.ts.map +1 -0
- package/esm/charts/treemap-chart/index.js +239 -0
- package/esm/charts/waterfall-chart/index.d.ts +41 -0
- package/esm/charts/waterfall-chart/index.d.ts.map +1 -0
- package/esm/charts/waterfall-chart/index.js +281 -0
- package/esm/components/Legend.d.ts +24 -0
- package/esm/components/Legend.d.ts.map +1 -0
- package/esm/components/Legend.js +50 -0
- package/esm/components/Tooltip.d.ts +24 -0
- package/esm/components/Tooltip.d.ts.map +1 -0
- package/esm/components/Tooltip.js +85 -0
- package/esm/components/chart/index.d.ts +71 -0
- package/esm/components/chart/index.d.ts.map +1 -0
- package/esm/components/chart/index.js +142 -0
- package/esm/components/chart.less +223 -0
- package/esm/core/animation.d.ts +49 -0
- package/esm/core/animation.d.ts.map +1 -0
- package/esm/core/animation.js +93 -0
- package/esm/core/force.d.ts +43 -0
- package/esm/core/force.d.ts.map +1 -0
- package/esm/core/force.js +134 -0
- package/esm/core/format.d.ts +34 -0
- package/esm/core/format.d.ts.map +1 -0
- package/esm/core/format.js +81 -0
- package/esm/core/hierarchy.d.ts +77 -0
- package/esm/core/hierarchy.d.ts.map +1 -0
- package/esm/core/hierarchy.js +233 -0
- package/esm/core/layout.d.ts +67 -0
- package/esm/core/layout.d.ts.map +1 -0
- package/esm/core/layout.js +121 -0
- package/esm/core/sampling.d.ts +32 -0
- package/esm/core/sampling.d.ts.map +1 -0
- package/esm/core/sampling.js +124 -0
- package/esm/core/sankey.d.ts +67 -0
- package/esm/core/sankey.d.ts.map +1 -0
- package/esm/core/sankey.js +136 -0
- package/esm/core/scale.d.ts +98 -0
- package/esm/core/scale.d.ts.map +1 -0
- package/esm/core/scale.js +207 -0
- package/esm/core/shape.d.ts +60 -0
- package/esm/core/shape.d.ts.map +1 -0
- package/esm/core/shape.js +246 -0
- package/esm/global.d.ts +6 -0
- package/esm/hooks/useChartTheme.d.ts +11 -0
- package/esm/hooks/useChartTheme.d.ts.map +1 -0
- package/esm/hooks/useChartTheme.js +35 -0
- package/esm/hooks/useChartTransition.d.ts +20 -0
- package/esm/hooks/useChartTransition.d.ts.map +1 -0
- package/esm/hooks/useChartTransition.js +120 -0
- package/esm/hooks/useElementSize.d.ts +17 -0
- package/esm/hooks/useElementSize.d.ts.map +1 -0
- package/esm/hooks/useElementSize.js +47 -0
- package/esm/index.d.ts +62 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +48 -0
- package/esm/internal/CartesianChart.d.ts +16 -0
- package/esm/internal/CartesianChart.d.ts.map +1 -0
- package/esm/internal/CartesianChart.js +811 -0
- package/esm/internal/model.d.ts +67 -0
- package/esm/internal/model.d.ts.map +1 -0
- package/esm/internal/model.js +146 -0
- package/esm/scene/canvas.d.ts +18 -0
- package/esm/scene/canvas.d.ts.map +1 -0
- package/esm/scene/canvas.js +138 -0
- package/esm/scene/svg.d.ts +12 -0
- package/esm/scene/svg.d.ts.map +1 -0
- package/esm/scene/svg.js +116 -0
- package/esm/scene/types.d.ts +89 -0
- package/esm/scene/types.d.ts.map +1 -0
- package/esm/scene/types.js +21 -0
- package/esm/style.css +196 -0
- package/esm/theme/index.d.ts +127 -0
- package/esm/theme/index.d.ts.map +1 -0
- package/esm/theme/index.js +300 -0
- package/esm/types.d.ts +168 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +2 -0
- package/package.json +64 -3
package/esm/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
/**
|
|
3
|
+
* @aura-react-comp/charts
|
|
4
|
+
*
|
|
5
|
+
* 自研图表库:SVG / Canvas 双渲染内核 + 令牌驱动主题。
|
|
6
|
+
*
|
|
7
|
+
* 分层导出:
|
|
8
|
+
* · 图表组件(LineChart / BarChart / ...)—— 日常使用
|
|
9
|
+
* · 配置式 <Chart option> —— 迁移 ECharts 或让 AI 生成
|
|
10
|
+
* · 主题工具(createChartTheme / readAuraTheme)—— 深度定制
|
|
11
|
+
* · 内核(scale / shape)—— 自建图表时的乐高积木
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// 图表组件
|
|
15
|
+
export { LineChart } from "./charts/line-chart";
|
|
16
|
+
export { BarChart } from "./charts/bar-chart";
|
|
17
|
+
export { AreaChart } from "./charts/area-chart";
|
|
18
|
+
export { ComboChart } from "./charts/combo-chart";
|
|
19
|
+
export { ScatterChart } from "./charts/scatter-chart";
|
|
20
|
+
export { PieChart } from "./charts/pie-chart";
|
|
21
|
+
export { RadarChart } from "./charts/radar-chart";
|
|
22
|
+
export { GaugeChart } from "./charts/gauge-chart";
|
|
23
|
+
export { FunnelChart } from "./charts/funnel-chart";
|
|
24
|
+
export { RingProgress } from "./charts/ring-progress";
|
|
25
|
+
export { WaterfallChart } from "./charts/waterfall-chart";
|
|
26
|
+
export { Sparkline } from "./charts/sparkline";
|
|
27
|
+
export { HeatmapChart } from "./charts/heatmap-chart";
|
|
28
|
+
export { CandlestickChart } from "./charts/candlestick-chart";
|
|
29
|
+
export { TreemapChart } from "./charts/treemap-chart";
|
|
30
|
+
export { TreeChart } from "./charts/tree-chart";
|
|
31
|
+
export { SankeyChart } from "./charts/sankey-chart";
|
|
32
|
+
export { GraphChart } from "./charts/graph-chart";
|
|
33
|
+
// Tooltip 组件(3D 图表等外部场景复用)
|
|
34
|
+
export { Tooltip } from "./components/Tooltip";
|
|
35
|
+
export { useElementSize } from "./hooks/useElementSize";
|
|
36
|
+
|
|
37
|
+
// 配置式入口
|
|
38
|
+
export { Chart } from "./components/chart";
|
|
39
|
+
|
|
40
|
+
// 通用类型
|
|
41
|
+
|
|
42
|
+
// 主题
|
|
43
|
+
export { createChartTheme, readAuraTheme, resolveTheme, detectDarkMode, colorAt, withAlpha, mixColor, parseColor, lightTheme, darkTheme, DEFAULT_PALETTE } from "./theme";
|
|
44
|
+
// 内核(供自建图表复用)
|
|
45
|
+
export { createBandScale, createPointScale, createLinearScale, linearTicks, niceStep, niceExtent, extentOf, extentWithZero } from "./core/scale";
|
|
46
|
+
export { linePath, areaPath, arcLinePath, arcPath, roundedRectPath, symbolPath, splitSegments } from "./core/shape";
|
|
47
|
+
export { formatNumber, formatCompact, formatPercent, estimateTextWidth } from "./core/format";
|
|
48
|
+
export { squarify, buildTreemap, layoutTree, sumValues } from "./core/hierarchy";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BaseChartProps, SeriesType } from '../types.js';
|
|
3
|
+
export interface CartesianChartProps extends BaseChartProps {
|
|
4
|
+
/** 系列默认类型,由各图表组件注入 */
|
|
5
|
+
defaultType: SeriesType;
|
|
6
|
+
/** 是否开启堆叠(等价于给每个系列设置同一个 stack id) */
|
|
7
|
+
stack?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 直角坐标系图表内核。
|
|
11
|
+
*
|
|
12
|
+
* 折线 / 柱状 / 面积 / 折柱混合全部由它渲染 —— 差异只在 series.type。
|
|
13
|
+
* 这样组合图(一个系列折线、一个系列柱子)天然支持,无需额外组件。
|
|
14
|
+
*/
|
|
15
|
+
export declare function CartesianChart(props: CartesianChartProps): React.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CartesianChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EAEX,MAAM,UAAU,CAAC;AAwBlB,OAAO,0BAA0B,CAAC;AAclC,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,sBAAsB;IACtB,WAAW,EAAE,UAAU,CAAC;IACxB,qCAAqC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA4BD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBA4/BxD"}
|