Skip to content

Commit

Permalink
Merge pull request #2143 from VisActor/release/1.9.0
Browse files Browse the repository at this point in the history
[Auto release] release 1.9.0
  • Loading branch information
xile611 authored Jan 26, 2024
2 parents d1ded7a + 66a1a88 commit 5af35d0
Show file tree
Hide file tree
Showing 1,252 changed files with 24,207 additions and 13,971 deletions.
919 changes: 497 additions & 422 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.8.10","mainProject":"@visactor/vchart","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.9.0","mainProject":"@visactor/vchart","nextBump":"minor"}]
46 changes: 24 additions & 22 deletions docs/assets/api/en/API/vchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,31 +272,33 @@ Read-only property, id of VChart instance, internally generated.

## method

### renderAsync
### renderSync

**asynchronous**Render the chart.
**synchronization**Render the chart.

```ts
/**
* **Asynchronously** render the chart.
* @async
* **SYNC** Renders the chart.
* @param morphConfig chart morph animation configuration, optional
* @returns VChart instance
*/
renderAsync: (morphConfig?: IMorphConfig) => Promise<IVChart>;
renderSync: (morphConfig?: IMorphConfig) => IVChart;
```

### renderSync
### renderAsync

**synchronization**Render the chart.
Not recommended for use after version 1.9.0, asynchronous rendering/asynchronous update related APIs will be deprecated in the future.

**asynchronous**Render the chart.

```ts
/**
* **SYNC** Renders the chart.
* **Asynchronously** render the chart.
* @async
* @param morphConfig chart morph animation configuration, optional
* @returns VChart instance
*/
renderSync: (morphConfig?: IMorphConfig) => IVChart;
renderAsync: (morphConfig?: IMorphConfig) => Promise<IVChart>;
```

### updateData
Expand Down Expand Up @@ -331,11 +333,11 @@ const spec = {
valueField: 'value'
};

const vChart = new VChart(spec, { dom: CONTAINER_ID });
await vChart.renderAsync();
const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

setTimeout(() => {
vChart.updateData('pie', [
vchart.updateData('pie', [
{ type: '1', value: 200 },
{ type: '2', value: 200 },
{ type: '3', value: 100 }
Expand Down Expand Up @@ -538,11 +540,11 @@ const spec = {
}
};

const vChart = new VChart(spec);
vChart.renderAsync();
const vchart = new VChart(spec);
vchart.renderSync();
// listen to click event
vChart.on('click', { level: 'mark' }, ctx => {
vChart.updateState({
vchart.on('click', { level: 'mark' }, ctx => {
vchart.updateState({
// The name should correspond to the above configuration
custom_unSelected: {
filter: datum => {
Expand Down Expand Up @@ -585,11 +587,11 @@ Set a set of data to the selected state, or you can directly set null to unselec
]
*/
// select data with type === 'A'
vChart.setSelected({ type: 'A' });
vchart.setSelected({ type: 'A' });
// selected data {x: 'US' , y: 10, type: 'A'}
vChart.setSelected({ x: 'US', y: 10, type: 'A' });
vchart.setSelected({ x: 'US', y: 10, type: 'A' });
// cancel the current selected data
vChart.setSelected(null);
vchart.setSelected(null);
```

### setHovered
Expand Down Expand Up @@ -625,11 +627,11 @@ Set a data to `hover` Status, you can also directly set null to cancel `hover` S
]
*/
// select data with type === 'A'
vChart.setHovered({ type: 'A' });
vchart.setHovered({ type: 'A' });
// selected data {x: 'US' , y: 10, type: 'A'}
vChart.setHovered({ x: 'US', y: 10, type: 'A' });
vchart.setHovered({ x: 'US', y: 10, type: 'A' });
// cancel the current selected data
vChart.setHovered(null);
vchart.setHovered(null);
```

### getCurrentTheme
Expand Down
48 changes: 26 additions & 22 deletions docs/assets/api/zh/API/vchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,33 +271,37 @@ const chart = new VChart(spec, {

## 方法

### renderAsync

**异步**渲染图表。
### renderSync

**同步**渲染图表。

```ts
/**
* **异步**渲染图表。
* @async
* **同步**渲染图表。
* @param morphConfig 图表 morph 动画配置,可选
* @returns VChart 实例
*/
renderAsync: (morphConfig?: IMorphConfig) => Promise<IVChart>;
renderSync: (morphConfig?: IMorphConfig) => IVChart;
```

### renderSync
### renderAsync

**同步**渲染图表。
1.9.0 版本以后不推荐使用,后续会废弃异步渲染/异步更新相关 API

**异步**渲染图表。

```ts
/**
* **同步**渲染图表。
* **异步**渲染图表。
* @async
* @param morphConfig 图表 morph 动画配置,可选
* @returns VChart 实例
*/
renderSync: (morphConfig?: IMorphConfig) => IVChart;
renderAsync: (morphConfig?: IMorphConfig) => Promise<IVChart>;
```


### updateData

**异步**更新数据。参数 `id` 对应在 spec 中 `data` 属性上的 `id` 字段,会自动渲染图表不需要再调用 `renderAsync()` 等渲染方法。
Expand Down Expand Up @@ -330,11 +334,11 @@ const spec = {
valueField: 'value'
};

const vChart = new VChart(spec, { dom: CONTAINER_ID });
await vChart.renderAsync();
const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

setTimeout(() => {
vChart.updateData('pie', [
vchart.updateData('pie', [
{ type: '1', value: 200 },
{ type: '2', value: 200 },
{ type: '3', value: 100 }
Expand Down Expand Up @@ -541,11 +545,11 @@ const spec = {
}
};

const vChart = new VChart(spec);
vChart.renderAsync();
const vchart = new VChart(spec);
vchart.renderSync();
// 监听点击事件
vChart.on('click', { level: 'mark' }, ctx => {
vChart.updateState({
vchart.on('click', { level: 'mark' }, ctx => {
vchart.updateState({
// 名称与上方配置要对应
custom_unSelected: {
filter: datum => {
Expand Down Expand Up @@ -588,11 +592,11 @@ vChart.on('click', { level: 'mark' }, ctx => {
]
*/
// 选定 type === 'A' 的数据
vChart.setSelected({ type: 'A' });
vchart.setSelected({ type: 'A' });
// 选定数据 {x: 'US' , y: 10, type: 'A'}
vChart.setSelected({ x: 'US', y: 10, type: 'A' });
vchart.setSelected({ x: 'US', y: 10, type: 'A' });
// 取消当前的选中数据
vChart.setSelected(null);
vchart.setSelected(null);
```

### setHovered
Expand Down Expand Up @@ -628,11 +632,11 @@ vChart.setSelected(null);
]
*/
// 选定 type === 'A' 的数据
vChart.setHovered({ type: 'A' });
vchart.setHovered({ type: 'A' });
// 选定数据 {x: 'US' , y: 10, type: 'A'}
vChart.setHovered({ x: 'US', y: 10, type: 'A' });
vchart.setHovered({ x: 'US', y: 10, type: 'A' });
// 取消当前的选中数据
vChart.setHovered(null);
vchart.setHovered(null);
```

### getCurrentTheme
Expand Down
24 changes: 24 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v1.8.10

2024-01-25


**🆕 New feature**

- **@visactor/vchart**: support innerOffset in vchart cartesian axis

**🐛 Bug fix**

- **@visactor/vchart**: fix issue of continous color scale, close [#2131](https://github.com/VisActor/VChart/issues/2131)
- **@visactor/vchart**: dont return min,max of empty data, fix [#1711](https://github.com/VisActor/VChart/issues/1711)
- **@visactor/vchart**: fixed polar coordinate relative axis tickValues acquisition error problem, fixed[#2117](https://github.com/VisActor/VChart/issues/2117)
- **@visactor/vchart**: fix the issue mark line is not filter by legend, close [#2127](https://github.com/VisActor/VChart/issues/2127)
- **@visactor/vchart**: sequence chart region bind error. fix[#2115](https://github.com/VisActor/VChart/issues/2115)
- **@visactor/vchart**: star shapes on dom tooltip do not display correctly, related [#1905](https://github.com/VisActor/VChart/issues/1905)
- **@visactor/vchart**: treemap drill event error
- **@visactor/vchart**: treemap drill error when turn off the animation



[more detail about v1.8.10](https://github.com/VisActor/VChart/releases/tag/v1.8.10)

# v1.8.9

2024-01-23
Expand Down
24 changes: 24 additions & 0 deletions docs/assets/changelog/zh/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v1.8.10

2024-01-25


**🆕 新增功能**

- **@visactor/vchart**: support innerOffset in vchart cartesian axis

**🐛 功能修复**

- **@visactor/vchart**: fix issue of continous color scale, close [#2131](https://github.com/VisActor/VChart/issues/2131)
- **@visactor/vchart**: dont return min,max of empty data, fix [#1711](https://github.com/VisActor/VChart/issues/1711)
- **@visactor/vchart**: fixed polar coordinate relative axis tickValues acquisition error problem, fixed[#2117](https://github.com/VisActor/VChart/issues/2117)
- **@visactor/vchart**: fix the issue mark line is not filter by legend, close [#2127](https://github.com/VisActor/VChart/issues/2127)
- **@visactor/vchart**: sequence chart region bind error. fix[#2115](https://github.com/VisActor/VChart/issues/2115)
- **@visactor/vchart**: star shapes on dom tooltip do not display correctly, related [#1905](https://github.com/VisActor/VChart/issues/1905)
- **@visactor/vchart**: treemap drill event error
- **@visactor/vchart**: treemap drill error when turn off the animation



[更多详情请查看 v1.8.10](https://github.com/VisActor/VChart/releases/tag/v1.8.10)

# v1.8.9

2024-01-23
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demos/builtin-theme/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function init(theme?: string) {
theme
}
);
chartInstance.renderAsync();
chartInstance.renderSync();

chartInstanceList.push(chartInstance);
cardList.push(card);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function RightChart(props: IPropsType) {
} else {
cs.updateSpec(props.spec);
}
cs.renderAsync();
cs.renderSync();
}, [props.spec, props.time]);

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/examples/en/area-chart/area-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option: areaChart

# Area chart style

You can configure the style related to the *area* graphic element through the *area.style* property, and configure the title style through *title.textStyle*.
You can configure the style related to the **area** graphic element through the **area.style** property, and configure the title style through **title.textStyle**.
This example shows the gradient fill of the area and the multi-line text configuration of the title.

## Key option
Expand Down Expand Up @@ -130,7 +130,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/area-with-marker.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/basic-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/horizontal-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/negative-values-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/null-value-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/range-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/segment-range-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/smoothed-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, do not copy
window['vchart'] = vchart;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/en/area-chart/stacked-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const spec = {
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
Expand Down
Loading

0 comments on commit 5af35d0

Please sign in to comment.