@crysound/crychart 0.0.0-stage → 1.0.2
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.md +288 -0
- package/LICENSE.zh-CN.md +290 -0
- package/README.md +82 -2
- package/README.zh-CN.md +79 -0
- package/dist/crychart.cjs +25234 -0
- package/dist/crychart.global.js +25236 -0
- package/dist/crychart.js +25211 -0
- package/dist/themes.js +357 -0
- package/dist/types/adapters/opentest.d.ts +69 -0
- package/dist/types/annotation-interaction.d.ts +36 -0
- package/dist/types/axis-canvas.d.ts +78 -0
- package/dist/types/axis-layout.d.ts +10 -0
- package/dist/types/axis-scroll-animation.d.ts +16 -0
- package/dist/types/axis.d.ts +532 -0
- package/dist/types/axis3d-label-layout.d.ts +45 -0
- package/dist/types/chart-events.d.ts +89 -0
- package/dist/types/chart.d.ts +674 -0
- package/dist/types/compatibility-types.d.ts +55 -0
- package/dist/types/component-highlight.d.ts +21 -0
- package/dist/types/contracts.d.ts +88 -0
- package/dist/types/core/data.d.ts +204 -0
- package/dist/types/core/events.d.ts +16 -0
- package/dist/types/core/line-delta-certificate.d.ts +70 -0
- package/dist/types/core/paged-columns.d.ts +180 -0
- package/dist/types/core/styles.d.ts +350 -0
- package/dist/types/css-text-fonts.d.ts +13 -0
- package/dist/types/cursor-api.d.ts +47 -0
- package/dist/types/custom-icon.d.ts +46 -0
- package/dist/types/data-bounds.d.ts +28 -0
- package/dist/types/data-order.d.ts +49 -0
- package/dist/types/data-runs.d.ts +15 -0
- package/dist/types/date-time-formatting.d.ts +32 -0
- package/dist/types/date-time-grid.d.ts +56 -0
- package/dist/types/formatting-functions.d.ts +16 -0
- package/dist/types/geometry.d.ts +378 -0
- package/dist/types/gradients.d.ts +37 -0
- package/dist/types/grid-layout.d.ts +10 -0
- package/dist/types/heatmap-stream.d.ts +38 -0
- package/dist/types/hierarchy.d.ts +191 -0
- package/dist/types/index.d.ts +75 -0
- package/dist/types/interaction-policy.d.ts +56 -0
- package/dist/types/line-block-cache.d.ts +146 -0
- package/dist/types/line-coverage-geometry.d.ts +28 -0
- package/dist/types/line-display-arena.d.ts +64 -0
- package/dist/types/line-display-cache.d.ts +144 -0
- package/dist/types/line-display-packets.d.ts +43 -0
- package/dist/types/line-extrema-pair-proof.d.ts +23 -0
- package/dist/types/line-palette-3d.d.ts +6 -0
- package/dist/types/line-selection-ledger.d.ts +143 -0
- package/dist/types/map.d.ts +219 -0
- package/dist/types/mesh3d.d.ts +306 -0
- package/dist/types/native-legend.d.ts +208 -0
- package/dist/types/point-fill.d.ts +14 -0
- package/dist/types/point-stroke-geometry.d.ts +12 -0
- package/dist/types/polar-heatmap.d.ts +68 -0
- package/dist/types/polar-layout.d.ts +100 -0
- package/dist/types/polar-series.d.ts +79 -0
- package/dist/types/raster-clip.d.ts +37 -0
- package/dist/types/render-heatmap.d.ts +117 -0
- package/dist/types/render-line-coverage.d.ts +95 -0
- package/dist/types/render-line-direction.d.ts +27 -0
- package/dist/types/render-line-offsets.d.ts +61 -0
- package/dist/types/render-line-strip.d.ts +102 -0
- package/dist/types/render-line-texture.d.ts +30 -0
- package/dist/types/render.d.ts +66 -0
- package/dist/types/render3d.d.ts +137 -0
- package/dist/types/result-table-layout.d.ts +39 -0
- package/dist/types/series-attributes.d.ts +7 -0
- package/dist/types/series.d.ts +404 -0
- package/dist/types/specialty.d.ts +551 -0
- package/dist/types/streaming-line-policy.d.ts +11 -0
- package/dist/types/stroke-geometry.d.ts +5 -0
- package/dist/types/themes.d.ts +32 -0
- package/dist/types/time-formatting.d.ts +23 -0
- package/dist/types/time-grid.d.ts +26 -0
- package/dist/types/ui.d.ts +207 -0
- package/dist/types/viewport.d.ts +18 -0
- package/dist/types/world-axis.d.ts +21 -0
- package/dist/types/world-camera.d.ts +88 -0
- package/dist/types/zoom-clock.d.ts +36 -0
- package/docs/npm-usage.md +31 -0
- package/package.json +66 -4
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# CRYChart
|
|
2
|
+
|
|
3
|
+
[English](README.md) | **简体中文**
|
|
4
|
+
|
|
5
|
+
CRYChart 是 **CRYSOUND 为 OpenTest 定制的前端渲染库**,基于 TypeScript 开发。
|
|
6
|
+
|
|
7
|
+
CRYChart 面向 OpenTest 的数据可视化场景,提供流式数据绘制、交互坐标轴、游标、二维和三维图表。绘图使用 WebGL2,并提供 Canvas 回退。
|
|
8
|
+
|
|
9
|
+
`1.0.2` 修复了高精度波形轴的视口跨度限制。
|
|
10
|
+
|
|
11
|
+
## 在应用中安装
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
pnpm add --save-exact @crysound/crychart@1.0.2 --registry=https://registry.npmjs.org/
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
提交应用的锁文件,后续执行 `pnpm install --frozen-lockfile`。包入口和旧 `crychart` 包名的迁移方式见 [npm 使用说明](docs/npm-usage.md)。
|
|
18
|
+
|
|
19
|
+
## 安装与构建
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
npm ci
|
|
23
|
+
npm run build
|
|
24
|
+
npm run dev
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
本地示例地址为 <http://127.0.0.1:4178/>。图表容器需要明确的宽度和高度。
|
|
28
|
+
|
|
29
|
+
## 使用
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { cryChart, ColorRGBA, SolidFill, SolidLine } from '@crysound/crychart'
|
|
33
|
+
import type { CRYChart, CRYChartOptions } from '@crysound/crychart'
|
|
34
|
+
|
|
35
|
+
const options: CRYChartOptions = {}
|
|
36
|
+
const context: CRYChart = cryChart(options)
|
|
37
|
+
const chart = context.ChartXY({ container: document.getElementById('chart')! })
|
|
38
|
+
const line = chart.addLineSeries({ schema: { x: { auto: true }, y: {} } })
|
|
39
|
+
line.setMaxSampleCount(100_000)
|
|
40
|
+
line.setStrokeStyle(new SolidLine({
|
|
41
|
+
thickness: 2,
|
|
42
|
+
fillStyle: new SolidFill({ color: ColorRGBA(60, 210, 180) }),
|
|
43
|
+
}))
|
|
44
|
+
line.appendSamples({ y: new Float32Array([1, 2, 3]) }, { start: 0, step: 0.001 })
|
|
45
|
+
|
|
46
|
+
// 组件卸载时释放图表和绘图资源。
|
|
47
|
+
context.dispose()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
包提供 ES 模块、CommonJS、浏览器脚本和 TypeScript 类型声明。浏览器脚本的全局对象为 `CRYChart`。主题入口为 `@crysound/crychart/themes`。
|
|
51
|
+
|
|
52
|
+
## 验证
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
npm run typecheck
|
|
56
|
+
npm test
|
|
57
|
+
npm run test:opentest-contract
|
|
58
|
+
npm run build
|
|
59
|
+
npm run test:browser
|
|
60
|
+
npm run test:gallery
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
浏览器测试使用已安装的可见 Chrome。数据和接口测试不能替代图像、交互及性能测试。性能结果只适用于记录中的数据量、绘图区、设备像素比和机器配置。
|
|
64
|
+
|
|
65
|
+
## 许可协议
|
|
66
|
+
|
|
67
|
+
CRYChart 采用 [CRYChart 社区许可协议 1.0](LICENSE.zh-CN.md),并提供 [English version](LICENSE.md)。
|
|
68
|
+
|
|
69
|
+
免费许可不设置通道、数据系列、曲线、数据点或视图数量上限。商业分发、OEM、设备配套交付和收费托管的授权条件见协议第 7 条。中英文解释不一致时,以中文版为准。
|
|
70
|
+
|
|
71
|
+
## 文档
|
|
72
|
+
|
|
73
|
+
- [npm 使用说明](docs/npm-usage.md)
|
|
74
|
+
- [使用手册](https://github.com/crysound/CRYChart/blob/main/docs/使用手册.md)
|
|
75
|
+
- [性能说明](https://github.com/crysound/CRYChart/blob/main/docs/性能说明.md)
|
|
76
|
+
- [架构说明](https://github.com/crysound/CRYChart/blob/main/docs/architecture.md)
|
|
77
|
+
- [产品规格](https://github.com/crysound/CRYChart/blob/main/SPEC.md)
|
|
78
|
+
|
|
79
|
+
示例中的合成数据仅用于演示和测试。继续使用的外部数据、模型和素材保留各自的来源及授权说明。
|