Skip to content

Commit 43e2acb

Browse files
Eomnationalhustccai-qing-haiwb-xcf804241Jungzl
authored andcommitted
docs:改造文档「核心概念 - 比例尺(Scale)-time」 (antvis#6888)
* fix: update docs * fix: bugs for radar coord and plot (antvis#6864) * fix: bugs for radar coord and plot * feat: add demo: Multi-dimensional Radar * chore: remove unused code * feat(docs): sunburst add docs (antvis#6866) Co-authored-by: wb-xcf804241 <wb-xcf804241@alibaba-inc.com> * fix: integrate fmin internally (antvis#6867) * fix: integrate fmin internally * fix: add unit test * fix: add LICENSE * fix: remove unused param * docs: 改造「核心概念 - 转换(Transform)-select、selectX、selectY」文档 (antvis#6869) * docs: 完善interaction/brushFilter文档 * docs: 完善interaction/brushXFilter&brushYFilter文档 * docs: 改造「核心概念 - 交互(Interaction)-brushFilter」文档/概述 * docs: 改造「核心概念 - 转换(Transform)-select、selectX、selectY」文档 * docs: 改造「核心概念 - 转换(Transform)-select、selectX、selectY」文档 --------- Co-authored-by: whf01206399 <whf01206399@antgroup.com> * test: update snapshots (antvis#6875) * fix: add channels property to GroupTransform type and update GroupNOptions type antvis#6871 (antvis#6873) Co-authored-by: Mengting Jiang <787982239@qq.com> * docs: 改造 核心概念 - 坐标系(Coordinate)-theta」文档 (antvis#6868) * docs(coordinate): 更新 theta 坐标系文档 * docs(coordinate): theta 文档内容格式排版优化 --------- Co-authored-by: 寒誉 <zh387927@digital-engine.com> Co-authored-by: Mengting Jiang <787982239@qq.com> * fix: severity alert (antvis#6877) * docs: 改造文档「核心概念 - 比例尺(Scale)-log」 (antvis#6881) * feat(scale): log docs * feat(scale): log docs --------- Co-authored-by: wb-xcf804241 <wb-xcf804241@alibaba-inc.com> * docs: 改造「核心概念 - 交互(Interaction)-elementHighlight,elementHighlightByCo… (antvis#6879) * docs: 改造「核心概念 - 交互(Interaction)-elementHighlight,elementHighlightByColor,elementHighlightByX」文档 * fix: 解决review问题 --------- Co-authored-by: 听凤 <guanhao.gh@alibaba-inc.com> * docs: 改造文档「核心概念 - 坐标系(Coordinate)-radial」 (antvis#6884) * docs: 改造文档「核心概念 - 坐标系(Coordinate)-radial」 * docs: 更新 radial 坐标系文档 - 完善径向坐标系的概述和原理说明 - 添加详细的配置项说明和角度单位对照表 - 增加常见用例和最佳实践部分 * docs: 改造文档「核心概念 - 坐标系(Coordinate)-radial」 * docs: 更新 radial 坐标系文档 * docs: 改造文档「核心概念 - 坐标系(Coordinate)-radial」 * docs: 修正 radial 坐标系文档 --------- Co-authored-by: Mengting Jiang <787982239@qq.com> * feat: 添加连接器的 offsetX 参数 (antvis#6882) * feat: 添加连接器的 offsetX 参数 * chore: remove .only from Jest tests * fix: 更新连接器的偏移参数名称为 sourceOffsetX 和 targetOffsetX * fix: 修正测试用例中的偏移参数值 * fix: 更新连接器样式中的偏移参数名称为 offsetY 和 targetOffsetY * docs: add event examples (antvis#6874) Co-authored-by: hustcc <i@hust.cc> * docs: 改造文档「核心概念 - 坐标系(Coordinate)-parallel」 (antvis#6891) * docs: 改造文档「核心概念 - 坐标系(Coordinate)-parallel」 * docs(coordinate): 更新 parallel 坐标系文档 - 完善平行坐标系的概述和原理说明 - 添加详细的配置项说明和坐标系变换说明 - 增加常见用例和使用场景部分 * docs(coordinate): parallel 文档内容格式排版优化 - 保留原始示例代码的数据和样式 - 优化示例代码,确保可正常预览 * docs: 改造文档「核心概念 - 坐标系(Coordinate)-parallel」 * docs: 优化示例代码 * docs: 改造文档「核心概念 - 比例尺(Scale)-sqrt」 (antvis#6890) * fix: update docs * docs: 改造文档「核心概念 - 比例尺(Scale)-sqrt」 * docs: update sqrt docs * docs: update docs * docs: update sqrt docs * docs: update time docs * docs: update time docs --------- Co-authored-by: hustcc <i@hust.cc> Co-authored-by: Frank William <65594180+ai-qing-hai@users.noreply.github.com> Co-authored-by: wb-xcf804241 <wb-xcf804241@alibaba-inc.com> Co-authored-by: Jungzl <13jungzl@gmail.com> Co-authored-by: Wang Hongfei <102511291+Whf0403@users.noreply.github.com> Co-authored-by: whf01206399 <whf01206399@antgroup.com> Co-authored-by: Mengting Jiang <787982239@qq.com> Co-authored-by: chenmi <jack.chenyuana@gmail.com> Co-authored-by: Han.Z <17826826870@163.com> Co-authored-by: 寒誉 <zh387927@digital-engine.com> Co-authored-by: gh1031 <1051421758@qq.com> Co-authored-by: 听凤 <guanhao.gh@alibaba-inc.com> Co-authored-by: pengcai <124560301+pengcai6@users.noreply.github.com> Co-authored-by: shuzhuxvchuang <149923641+afkdsghk211331@users.noreply.github.com> Co-authored-by: Joel Alan <31396322+lxfu1@users.noreply.github.com>
1 parent c056ef4 commit 43e2acb

1 file changed

Lines changed: 16 additions & 32 deletions

File tree

site/docs/manual/core/scale/time.zh.md

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: time
33
order: 2
44
---
55

6-
# Time 比例尺
7-
86
Time 比例尺是一种特殊的连续比例尺,专门用于处理时间序列数据。它将时间数据(Date 对象)映射到连续的数值范围。Time 比例尺的映射函数为 `y = x.getTime() + b`,其中 `x` 是时间值,`b` 是偏移量。
97

108
## 概述
@@ -14,41 +12,27 @@ Time 比例尺属于连续比例尺的一种,主要用于处理时间序列数
1412
- 自动处理时间数据的格式化和解析
1513
- 提供灵活的时间刻度生成机制
1614

17-
### 映射效果示例
18-
19-
```ts
20-
// 输入数据
21-
const dates = [
22-
new Date('2024-01-01'),
23-
new Date('2024-02-01'),
24-
new Date('2024-03-01'),
25-
new Date('2024-04-01')
26-
];
27-
28-
// 使用 time 比例尺映射到 [0, 1] 范围
29-
// 结果将类似于:[0, 0.33, 0.66, 1]
30-
```
3115

3216
## 配置项
3317

3418
| 属性 | 描述 | 类型 | 默认值 | 必选 |
3519
| -------------| ----------------------------------------------------------- | -----| ------- | ---- |
36-
| domain | 设置数据的定义域范围 | `Date[]` | 输入数据的最大最小值范围 | |
37-
| domainMin | 设置数据的定义域最小值 | `Date` | 输入数据的最小值 | |
38-
| domainMax | 设置数据的定义域最大值 | `Date` | 输入数据的最大值 | |
39-
| range | 设置数据映射的值域范围 | `Date[]` \| `string[]` | `[0, 1]` | |
40-
| rangeMin | 设置数据映射的值域最小值 | `Date` | `0` | |
41-
| rangeMax | 设置数据映射的值域最大值 | `Date` | `1` | |
42-
| unknown | 对于 `undefined``NaN``null` 空值,返回的数据 | `any` | `undefined` | |
43-
| tickCount | 设置推荐的 tick 生成数量,tickCount 只是建议值,不会完全按照这个值产生 tick | `number` | `5` | |
44-
| tickInterval | 设置推荐的 tick 之间的间隔,tickInterval 优先级高于 tickCount | `number` | `undefined` | |
45-
| tickMethod | 设置生成 tick 的方法,常用于自定义 tick | `(min: number, max: number, count: number) => number[]` | `d3Time` | |
46-
| round | 输出值去四舍五入 | `boolean` | `false` | |
47-
| clamp | 将映射值限定在 range 的范围内 | `boolean` | `false` | |
48-
| nice | 扩展 domain 范围,让输出的 tick 展示得更加友好 | `boolean` | `false` | |
49-
| mask | 设置时间显示的格式,底层使用 [fetcha](https://github.com/taylorhakes/fecha) | `string` | `undefined` | |
50-
| utc | 是否使用 UTC 时间 | `boolean` | `false` | |
51-
| interpolate | 自定义差值函数 | `(a: number, b: number) => (t: number) => T` | `(a, b) => (t) => a * (1 - t) + b * t` | |
20+
| domain | 设置数据的定义域范围 | `Date[]` | 输入数据的最大最小值范围 | |
21+
| domainMin | 设置数据的定义域最小值 | `Date` | 输入数据的最小值 | |
22+
| domainMax | 设置数据的定义域最大值 | `Date` | 输入数据的最大值 | |
23+
| range | 设置数据映射的值域范围 | `number[]` \| `string[]` | `[0, 1]` | |
24+
| rangeMin | 设置数据映射的值域最小值 | `number`\| `string` | `0` | |
25+
| rangeMax | 设置数据映射的值域最大值 | `number`\| `string` | `1` | |
26+
| unknown | 对于 `undefined``NaN``null` 空值,返回的数据 | `any` | `undefined` | |
27+
| tickCount | 设置推荐的 tick 生成数量,tickCount 只是建议值,不会完全按照这个值产生 tick | `number` | `5` | |
28+
| tickInterval | 设置推荐的 tick 之间的间隔,tickInterval 优先级高于 tickCount | `number` | `undefined` | |
29+
| tickMethod | 设置生成 tick 的方法,常用于自定义 tick | `(min: number, max: number, count: number) => number[]` | `d3Time` | |
30+
| round | 输出值去四舍五入 | `boolean` | `false` | |
31+
| clamp | 将映射值限定在 range 的范围内 | `boolean` | `false` | |
32+
| nice | 扩展 domain 范围,让输出的 tick 展示得更加友好 | `boolean` | `false` | |
33+
| mask | 设置时间显示的格式,底层使用 [fetcha](https://github.com/taylorhakes/fecha) | `string` | `undefined` | |
34+
| utc | 是否使用 UTC 时间 | `boolean` | `false` | |
35+
| interpolate | 自定义差值函数 | `(a: number, b: number) => (t: number) => T` | `(a, b) => (t) => a * (1 - t) + b * t` | |
5236

5337
### 复杂类型说明
5438

0 commit comments

Comments
 (0)