@crysound/crychart 1.0.1 → 1.0.3
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 -288
- package/LICENSE.zh-CN.md +290 -290
- package/README.md +93 -83
- package/README.zh-CN.md +89 -79
- package/dist/crychart.cjs +8 -5
- package/dist/crychart.global.js +8 -5
- package/dist/crychart.js +8 -5
- package/dist/types/index.d.ts +1 -1
- package/docs/npm-usage.md +1 -1
- package/package.json +73 -68
package/README.md
CHANGED
|
@@ -1,83 +1,93 @@
|
|
|
1
|
-
# CRYChart
|
|
2
|
-
|
|
3
|
-
**English** | [简体中文](README.zh-CN.md)
|
|
4
|
-
|
|
5
|
-
CRYChart is a **frontend rendering library built by CRYSOUND for OpenTest**, written in TypeScript.
|
|
6
|
-
|
|
7
|
-
Designed for OpenTest's data visualization needs, CRYChart provides streaming data rendering, interactive axes, cursors, and 2D and 3D charts. It uses WebGL2 for rendering, with a Canvas fallback.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Install in an application
|
|
12
|
-
|
|
13
|
-
```powershell
|
|
14
|
-
pnpm add --save-exact @crysound/crychart@1.0.
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Commit the application's lockfile and use `pnpm install --frozen-lockfile` for repeatable installs. See the [npm usage guide](docs/npm-usage.md) for package entry points and migration from the old `crychart` name.
|
|
18
|
-
|
|
19
|
-
## Install and build
|
|
20
|
-
|
|
21
|
-
From the repository root:
|
|
22
|
-
|
|
23
|
-
```powershell
|
|
24
|
-
npm ci
|
|
25
|
-
npm run build
|
|
26
|
-
npm run dev
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Open the local examples at <http://127.0.0.1:4178/>. Chart containers must have an explicit width and height.
|
|
30
|
-
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
import { cryChart, ColorRGBA, SolidFill, SolidLine } from '@crysound/crychart'
|
|
35
|
-
import type { CRYChart, CRYChartOptions } from '@crysound/crychart'
|
|
36
|
-
|
|
37
|
-
const options: CRYChartOptions = {}
|
|
38
|
-
const context: CRYChart = cryChart(options)
|
|
39
|
-
const chart = context.ChartXY({ container: document.getElementById('chart')! })
|
|
40
|
-
const line = chart.addLineSeries({ schema: { x: { auto: true }, y: {} } })
|
|
41
|
-
line.setMaxSampleCount(100_000)
|
|
42
|
-
line.setStrokeStyle(new SolidLine({
|
|
43
|
-
thickness: 2,
|
|
44
|
-
fillStyle: new SolidFill({ color: ColorRGBA(60, 210, 180) }),
|
|
45
|
-
}))
|
|
46
|
-
line.appendSamples({ y: new Float32Array([1, 2, 3]) }, { start: 0, step: 0.001 })
|
|
47
|
-
|
|
48
|
-
// Dispose of charts and rendering resources when the component unmounts.
|
|
49
|
-
context.dispose()
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
The package provides ES modules, CommonJS, a browser script, and TypeScript declarations. The browser script exposes the `CRYChart` global. Themes are available through `@crysound/crychart/themes`.
|
|
53
|
-
|
|
54
|
-
## Validation
|
|
55
|
-
|
|
56
|
-
```powershell
|
|
57
|
-
npm run typecheck
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:opentest-contract
|
|
60
|
-
npm run
|
|
61
|
-
npm run test:
|
|
62
|
-
npm run
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
The
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
# CRYChart
|
|
2
|
+
|
|
3
|
+
**English** | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
CRYChart is a **frontend rendering library built by CRYSOUND for OpenTest**, written in TypeScript.
|
|
6
|
+
|
|
7
|
+
Designed for OpenTest's data visualization needs, CRYChart provides streaming data rendering, interactive axes, cursors, and 2D and 3D charts. It uses WebGL2 for rendering, with a Canvas fallback.
|
|
8
|
+
|
|
9
|
+
Version `1.0.3` keeps live charts visible while their container is resized.
|
|
10
|
+
|
|
11
|
+
## Install in an application
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
pnpm add --save-exact @crysound/crychart@1.0.3 --registry=https://registry.npmjs.org/
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Commit the application's lockfile and use `pnpm install --frozen-lockfile` for repeatable installs. See the [npm usage guide](docs/npm-usage.md) for package entry points and migration from the old `crychart` name.
|
|
18
|
+
|
|
19
|
+
## Install and build
|
|
20
|
+
|
|
21
|
+
From the repository root:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
npm ci
|
|
25
|
+
npm run build
|
|
26
|
+
npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Open the local examples at <http://127.0.0.1:4178/>. Chart containers must have an explicit width and height.
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { cryChart, ColorRGBA, SolidFill, SolidLine } from '@crysound/crychart'
|
|
35
|
+
import type { CRYChart, CRYChartOptions } from '@crysound/crychart'
|
|
36
|
+
|
|
37
|
+
const options: CRYChartOptions = {}
|
|
38
|
+
const context: CRYChart = cryChart(options)
|
|
39
|
+
const chart = context.ChartXY({ container: document.getElementById('chart')! })
|
|
40
|
+
const line = chart.addLineSeries({ schema: { x: { auto: true }, y: {} } })
|
|
41
|
+
line.setMaxSampleCount(100_000)
|
|
42
|
+
line.setStrokeStyle(new SolidLine({
|
|
43
|
+
thickness: 2,
|
|
44
|
+
fillStyle: new SolidFill({ color: ColorRGBA(60, 210, 180) }),
|
|
45
|
+
}))
|
|
46
|
+
line.appendSamples({ y: new Float32Array([1, 2, 3]) }, { start: 0, step: 0.001 })
|
|
47
|
+
|
|
48
|
+
// Dispose of charts and rendering resources when the component unmounts.
|
|
49
|
+
context.dispose()
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The package provides ES modules, CommonJS, a browser script, and TypeScript declarations. The browser script exposes the `CRYChart` global. Themes are available through `@crysound/crychart/themes`.
|
|
53
|
+
|
|
54
|
+
## Validation
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
npm run typecheck
|
|
58
|
+
npm test
|
|
59
|
+
npm run test:opentest-contract
|
|
60
|
+
npm run test:coverage
|
|
61
|
+
npm run test:api
|
|
62
|
+
npm run build
|
|
63
|
+
npm run test:browser
|
|
64
|
+
npm run test:gallery
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`npm run test:coverage` runs both unit tests and OpenTest API contracts. c8/V8 measures all `src/**/*.ts` except `.d.ts` files. Coverage runs execute source modules through tsx without bundling or tree shaking, so uncalled functions remain measurable. Examples, test infrastructure and UI automation are outside this coverage scope.
|
|
68
|
+
|
|
69
|
+
CI and `npm run verify` enforce at least 96% line and statement coverage, 87% branch coverage and 98% function coverage, configured in `.c8rc.json`. Thresholds use CI's Node 22/V8 baseline; coverage may differ across Node major versions. Reports are written to `codex_artifact/coverage/`: `index.html`, `lcov.info`, `coverage-final.json` and `coverage-summary.json`. CI uploads the `code-coverage` artifact for 14 days, including generated reports when tests or coverage thresholds fail.
|
|
70
|
+
|
|
71
|
+
The [public API test inventory](docs/api-test-map.md) and `docs/api-test-map.json` link entrypoints to functional scenarios and assertion expressions. Entries distinguish `mapped`, `missing`, `placeholder` and `type-only`; a mapping does not establish every parameter combination or certify browser behavior.
|
|
72
|
+
|
|
73
|
+
Run `npm run test:coverage` followed by `npm run test:api`. The API gate checks passing, current-source test results, declarations, scenario references and retained assertions. All non-placeholder callable APIs, public fields and constants require asserted scenarios, including inherited members, factories and constructor-assigned `engine` objects. `publicValues`, `mappedValues` and `unassertedValues` report total, mapped and missing public values; CI requires `unassertedValues` to be zero. New fields, constants and APIs need scenarios before the map can be updated, and updating cannot erase existing value coverage. After intentional API or test changes, run `npm run api:map:update` and review the diff. Placeholder explanations and partial implementation limits are in `docs/api-test-policy.json`. CI uploads the `api-test-map` artifact for 14 days.
|
|
74
|
+
|
|
75
|
+
Browser tests use an installed, visible Chrome browser. Data and API tests do not replace visual, interaction, or performance tests. Performance results apply only to the recorded data volume, plot area, device pixel ratio, and machine configuration.
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
CRYChart is licensed under the [CRYChart Community License 1.0](LICENSE.md). A [Chinese version](LICENSE.zh-CN.md) is also available.
|
|
80
|
+
|
|
81
|
+
The free license imposes no limits on the number of channels, data series, curves, data points, or views. See Section 7 for the licensing conditions for commercial distribution, OEM use, delivery bundled with equipment, and paid hosting. If the English and Chinese versions differ in interpretation, the Chinese version prevails.
|
|
82
|
+
|
|
83
|
+
## Documentation
|
|
84
|
+
|
|
85
|
+
- [npm usage guide](docs/npm-usage.md)
|
|
86
|
+
- [User guide](https://github.com/crysound/CRYChart/blob/main/docs/使用手册.md)
|
|
87
|
+
- [Performance notes](https://github.com/crysound/CRYChart/blob/main/docs/性能说明.md)
|
|
88
|
+
- [Architecture](https://github.com/crysound/CRYChart/blob/main/docs/architecture.md)
|
|
89
|
+
- [Product specification](https://github.com/crysound/CRYChart/blob/main/SPEC.md)
|
|
90
|
+
|
|
91
|
+
Some documentation is currently available only in Chinese.
|
|
92
|
+
|
|
93
|
+
Synthetic data in the examples is intended for demonstrations and testing only. External data, models, and assets retain their respective source attributions and license notices.
|
package/README.zh-CN.md
CHANGED
|
@@ -1,79 +1,89 @@
|
|
|
1
|
-
# CRYChart
|
|
2
|
-
|
|
3
|
-
[English](README.md) | **简体中文**
|
|
4
|
-
|
|
5
|
-
CRYChart 是 **CRYSOUND 为 OpenTest 定制的前端渲染库**,基于 TypeScript 开发。
|
|
6
|
-
|
|
7
|
-
CRYChart 面向 OpenTest 的数据可视化场景,提供流式数据绘制、交互坐标轴、游标、二维和三维图表。绘图使用 WebGL2,并提供 Canvas 回退。
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## 在应用中安装
|
|
12
|
-
|
|
13
|
-
```powershell
|
|
14
|
-
pnpm add --save-exact @crysound/crychart@1.0.
|
|
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
|
|
59
|
-
npm run test:
|
|
60
|
-
npm run
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
# CRYChart
|
|
2
|
+
|
|
3
|
+
[English](README.md) | **简体中文**
|
|
4
|
+
|
|
5
|
+
CRYChart 是 **CRYSOUND 为 OpenTest 定制的前端渲染库**,基于 TypeScript 开发。
|
|
6
|
+
|
|
7
|
+
CRYChart 面向 OpenTest 的数据可视化场景,提供流式数据绘制、交互坐标轴、游标、二维和三维图表。绘图使用 WebGL2,并提供 Canvas 回退。
|
|
8
|
+
|
|
9
|
+
`1.0.3` 修复了连续调整容器大小时实时图表变空白的问题。
|
|
10
|
+
|
|
11
|
+
## 在应用中安装
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
pnpm add --save-exact @crysound/crychart@1.0.3 --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 test:coverage
|
|
59
|
+
npm run test:api
|
|
60
|
+
npm run build
|
|
61
|
+
npm run test:browser
|
|
62
|
+
npm run test:gallery
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`npm run test:coverage` 合并运行单元测试和 OpenTest 接口合同,用 c8/V8 统计全部 `src/**/*.ts`(不含 `.d.ts`)。覆盖率模式通过 tsx 直接执行源码,避免打包裁剪未调用函数;示例、测试驱动和 UI 自动化不计入该代码覆盖率。
|
|
66
|
+
|
|
67
|
+
CI 和 `npm run verify` 均要求行覆盖率和语句覆盖率至少 96%、分支至少 87%、函数至少 98%,任一不足即失败。门槛配置在 `.c8rc.json`,以 CI 的 Node 22/V8 统计口径为准;不同 Node 主版本的覆盖率可能不同。HTML 报告为 `codex_artifact/coverage/index.html`,同时生成 `lcov.info`、`coverage-final.json` 和 `coverage-summary.json`;CI 的 `code-coverage` 附件保留 14 天,测试或门槛失败时也会上传已生成的报告。
|
|
68
|
+
|
|
69
|
+
公开 API 到场景、断言的完整盘点见 [API 测试清单](docs/api-test-map.md),机器可读版本为 `docs/api-test-map.json`。清单区分 `mapped`(有可追溯调用/显式绑定和断言)、`missing`(尚未绑定有效场景)、`placeholder`(兼容占位或有意为空的钩子)、`type-only`(类型声明)。绑定一个场景不表示该 API 的全部参数组合均已验证,浏览器用例不借用单元测试结果认证。
|
|
70
|
+
|
|
71
|
+
先运行 `npm run test:coverage`,再运行 `npm run test:api`,后者会核验本轮测试实际通过、源码指纹未变化、API 签名和测试引用有效、原有断言未被移除。所有非占位的可调用接口、公开字段和常量均要求有断言场景,包括继承成员、工厂方法和构造函数中赋值的 `engine` 对象。`publicValues`、`mappedValues`、`unassertedValues` 分别统计公开值总数、有场景映射及缺失映射的数量;CI 要求 `unassertedValues` 为零。新增字段/常量和 API 必须补场景后才允许更新清单,已有值映射也不能被更新命令抹除。修改测试或公开签名后,运行 `npm run api:map:update` 并审核清单差异;占位及部分实现的限制在 `docs/api-test-policy.json`。CI 上传 `api-test-map` 附件,保留 14 天。
|
|
72
|
+
|
|
73
|
+
浏览器测试使用已安装的可见 Chrome。数据和接口测试不能替代图像、交互及性能测试。性能结果只适用于记录中的数据量、绘图区、设备像素比和机器配置。
|
|
74
|
+
|
|
75
|
+
## 许可协议
|
|
76
|
+
|
|
77
|
+
CRYChart 采用 [CRYChart 社区许可协议 1.0](LICENSE.zh-CN.md),并提供 [English version](LICENSE.md)。
|
|
78
|
+
|
|
79
|
+
免费许可不设置通道、数据系列、曲线、数据点或视图数量上限。商业分发、OEM、设备配套交付和收费托管的授权条件见协议第 7 条。中英文解释不一致时,以中文版为准。
|
|
80
|
+
|
|
81
|
+
## 文档
|
|
82
|
+
|
|
83
|
+
- [npm 使用说明](docs/npm-usage.md)
|
|
84
|
+
- [使用手册](https://github.com/crysound/CRYChart/blob/main/docs/使用手册.md)
|
|
85
|
+
- [性能说明](https://github.com/crysound/CRYChart/blob/main/docs/性能说明.md)
|
|
86
|
+
- [架构说明](https://github.com/crysound/CRYChart/blob/main/docs/architecture.md)
|
|
87
|
+
- [产品规格](https://github.com/crysound/CRYChart/blob/main/SPEC.md)
|
|
88
|
+
|
|
89
|
+
示例中的合成数据仅用于演示和测试。继续使用的外部数据、模型和素材保留各自的来源及授权说明。
|
package/dist/crychart.cjs
CHANGED
|
@@ -3927,7 +3927,7 @@ var Axis = class {
|
|
|
3927
3927
|
/** Only the finite positive constant object maximum used by Preview is enforced.
|
|
3928
3928
|
* Other restriction fields and callback enforcement retain their existing behavior. */
|
|
3929
3929
|
supportedIntervalMax() {
|
|
3930
|
-
if (this.type !== "linear" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3930
|
+
if (this.type !== "linear" && this.type !== "linear-highPrecision" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3931
3931
|
const value = this.intervalRestriction;
|
|
3932
3932
|
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
3933
3933
|
const maximum = value.intervalMax;
|
|
@@ -4148,11 +4148,11 @@ var Axis = class {
|
|
|
4148
4148
|
return this.stopped;
|
|
4149
4149
|
}
|
|
4150
4150
|
setAutoFit(value) {
|
|
4151
|
-
if (value && this.scrollStrategy == null) this.scrollStrategy = "fitting";
|
|
4151
|
+
if (value && (this.scrollStrategy == null || this.scrollStrategy === false)) this.scrollStrategy = "fitting";
|
|
4152
4152
|
return this.setStopped(!value);
|
|
4153
4153
|
}
|
|
4154
4154
|
getAutoFit() {
|
|
4155
|
-
return !this.stopped && this.scrollStrategy != null;
|
|
4155
|
+
return !this.stopped && this.scrollStrategy != null && this.scrollStrategy !== false;
|
|
4156
4156
|
}
|
|
4157
4157
|
setScrollStrategy(value) {
|
|
4158
4158
|
this.cancelScrollAnimation();
|
|
@@ -20796,7 +20796,10 @@ var ChartXY = class {
|
|
|
20796
20796
|
this.resize();
|
|
20797
20797
|
this.attachInteractions();
|
|
20798
20798
|
if (typeof ResizeObserver !== "undefined") {
|
|
20799
|
-
this.observer = new ResizeObserver(() =>
|
|
20799
|
+
this.observer = new ResizeObserver(() => {
|
|
20800
|
+
this.resize();
|
|
20801
|
+
this.renderNow();
|
|
20802
|
+
});
|
|
20800
20803
|
this.observer.observe(container);
|
|
20801
20804
|
}
|
|
20802
20805
|
}
|
|
@@ -25139,7 +25142,7 @@ function cryChart(_options = {}) {
|
|
|
25139
25142
|
getChartCount: () => owned2.size
|
|
25140
25143
|
};
|
|
25141
25144
|
}
|
|
25142
|
-
var version = "1.0.
|
|
25145
|
+
var version = "1.0.3";
|
|
25143
25146
|
var Dashboard = class {
|
|
25144
25147
|
root;
|
|
25145
25148
|
cells = /* @__PURE__ */ new Map();
|
package/dist/crychart.global.js
CHANGED
|
@@ -3927,7 +3927,7 @@ var CRYChart = (() => {
|
|
|
3927
3927
|
/** Only the finite positive constant object maximum used by Preview is enforced.
|
|
3928
3928
|
* Other restriction fields and callback enforcement retain their existing behavior. */
|
|
3929
3929
|
supportedIntervalMax() {
|
|
3930
|
-
if (this.type !== "linear" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3930
|
+
if (this.type !== "linear" && this.type !== "linear-highPrecision" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3931
3931
|
const value = this.intervalRestriction;
|
|
3932
3932
|
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
3933
3933
|
const maximum = value.intervalMax;
|
|
@@ -4148,11 +4148,11 @@ var CRYChart = (() => {
|
|
|
4148
4148
|
return this.stopped;
|
|
4149
4149
|
}
|
|
4150
4150
|
setAutoFit(value) {
|
|
4151
|
-
if (value && this.scrollStrategy == null) this.scrollStrategy = "fitting";
|
|
4151
|
+
if (value && (this.scrollStrategy == null || this.scrollStrategy === false)) this.scrollStrategy = "fitting";
|
|
4152
4152
|
return this.setStopped(!value);
|
|
4153
4153
|
}
|
|
4154
4154
|
getAutoFit() {
|
|
4155
|
-
return !this.stopped && this.scrollStrategy != null;
|
|
4155
|
+
return !this.stopped && this.scrollStrategy != null && this.scrollStrategy !== false;
|
|
4156
4156
|
}
|
|
4157
4157
|
setScrollStrategy(value) {
|
|
4158
4158
|
this.cancelScrollAnimation();
|
|
@@ -20796,7 +20796,10 @@ void main() {
|
|
|
20796
20796
|
this.resize();
|
|
20797
20797
|
this.attachInteractions();
|
|
20798
20798
|
if (typeof ResizeObserver !== "undefined") {
|
|
20799
|
-
this.observer = new ResizeObserver(() =>
|
|
20799
|
+
this.observer = new ResizeObserver(() => {
|
|
20800
|
+
this.resize();
|
|
20801
|
+
this.renderNow();
|
|
20802
|
+
});
|
|
20800
20803
|
this.observer.observe(container);
|
|
20801
20804
|
}
|
|
20802
20805
|
}
|
|
@@ -25139,7 +25142,7 @@ ${sample.position[0].toFixed(4)}, ${sample.position[1].toFixed(4)}`, contains: (
|
|
|
25139
25142
|
getChartCount: () => owned2.size
|
|
25140
25143
|
};
|
|
25141
25144
|
}
|
|
25142
|
-
var version = "1.0.
|
|
25145
|
+
var version = "1.0.3";
|
|
25143
25146
|
var Dashboard = class {
|
|
25144
25147
|
root;
|
|
25145
25148
|
cells = /* @__PURE__ */ new Map();
|
package/dist/crychart.js
CHANGED
|
@@ -3743,7 +3743,7 @@ var Axis = class {
|
|
|
3743
3743
|
/** Only the finite positive constant object maximum used by Preview is enforced.
|
|
3744
3744
|
* Other restriction fields and callback enforcement retain their existing behavior. */
|
|
3745
3745
|
supportedIntervalMax() {
|
|
3746
|
-
if (this.type !== "linear" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3746
|
+
if (this.type !== "linear" && this.type !== "linear-highPrecision" || this.chart.supportsAxisIntervalMaxRestrictions?.() !== true) return void 0;
|
|
3747
3747
|
const value = this.intervalRestriction;
|
|
3748
3748
|
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
3749
3749
|
const maximum = value.intervalMax;
|
|
@@ -3964,11 +3964,11 @@ var Axis = class {
|
|
|
3964
3964
|
return this.stopped;
|
|
3965
3965
|
}
|
|
3966
3966
|
setAutoFit(value) {
|
|
3967
|
-
if (value && this.scrollStrategy == null) this.scrollStrategy = "fitting";
|
|
3967
|
+
if (value && (this.scrollStrategy == null || this.scrollStrategy === false)) this.scrollStrategy = "fitting";
|
|
3968
3968
|
return this.setStopped(!value);
|
|
3969
3969
|
}
|
|
3970
3970
|
getAutoFit() {
|
|
3971
|
-
return !this.stopped && this.scrollStrategy != null;
|
|
3971
|
+
return !this.stopped && this.scrollStrategy != null && this.scrollStrategy !== false;
|
|
3972
3972
|
}
|
|
3973
3973
|
setScrollStrategy(value) {
|
|
3974
3974
|
this.cancelScrollAnimation();
|
|
@@ -20612,7 +20612,10 @@ var ChartXY = class {
|
|
|
20612
20612
|
this.resize();
|
|
20613
20613
|
this.attachInteractions();
|
|
20614
20614
|
if (typeof ResizeObserver !== "undefined") {
|
|
20615
|
-
this.observer = new ResizeObserver(() =>
|
|
20615
|
+
this.observer = new ResizeObserver(() => {
|
|
20616
|
+
this.resize();
|
|
20617
|
+
this.renderNow();
|
|
20618
|
+
});
|
|
20616
20619
|
this.observer.observe(container);
|
|
20617
20620
|
}
|
|
20618
20621
|
}
|
|
@@ -24955,7 +24958,7 @@ function cryChart(_options = {}) {
|
|
|
24955
24958
|
getChartCount: () => owned2.size
|
|
24956
24959
|
};
|
|
24957
24960
|
}
|
|
24958
|
-
var version = "1.0.
|
|
24961
|
+
var version = "1.0.3";
|
|
24959
24962
|
var Dashboard = class {
|
|
24960
24963
|
root;
|
|
24961
24964
|
cells = /* @__PURE__ */ new Map();
|
package/dist/types/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare function cryChart(_options?: Record<string, unknown>): {
|
|
|
51
51
|
/** Live charts owned by this context; disposed charts are released immediately. */
|
|
52
52
|
getChartCount: () => number;
|
|
53
53
|
};
|
|
54
|
-
export declare const version = "1.0.
|
|
54
|
+
export declare const version = "1.0.3";
|
|
55
55
|
export declare class Dashboard {
|
|
56
56
|
readonly root: HTMLDivElement;
|
|
57
57
|
private cells;
|
package/docs/npm-usage.md
CHANGED