Skip to content

Commit

Permalink
Merge pull request #3050 from VisActor/release/1.11.11
Browse files Browse the repository at this point in the history
[Auto release] release 1.11.11
  • Loading branch information
neuqzxy authored Aug 6, 2024
2 parents a30436a + 9015287 commit 701a7bb
Show file tree
Hide file tree
Showing 99 changed files with 2,796 additions and 807 deletions.
3 changes: 0 additions & 3 deletions common/config/rush/pnpm-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
*/
"globalOverrides": {
// "@visactor/vrender-core": "0.19.4-alpha.5",
// "@visactor/vrender-kits": "0.19.4-alpha.5",
// "@visactor/vrender-components": "0.19.4-alpha.5",
// "@visactor/vutils": "0.18.8",
// "@visactor/vscale": "0.18.8",
// "@visactor/vdataset": "0.18.8"
Expand Down
244 changes: 122 additions & 122 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.11.10","mainProject":"@visactor/vchart","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.11.11","mainProject":"@visactor/vchart","nextBump":"patch"}]
27 changes: 27 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# v1.11.10

2024-07-24


**🆕 New feature**

- **@visactor/vchart**: liquid support reverse and target mark. close [#2977](https://github.com/VisActor/VChart/issues/2977) & close [#2978](https://github.com/VisActor/VChart/issues/2978)
- **@visactor/vchart**: add `totalScale` params in geo zoom event
- **@visactor/vchart**: support `geoZoomByIndex`/`geoZoomById` API, close [#2925](https://github.com/VisActor/VChart/issues/2925)
- **@visactor/vchart**: marker label background support custom path. close [#2959](https://github.com/VisActor/VChart/issues/2959)

**🐛 Bug fix**

- **@visactor/vchart**: prevent issue with ios bug while pointEvent is configed
- **@visactor/vchart**: liquid gradient not work after reverse
- **@visactor/vchart**: prevent trigger original event in zoomEnd composite event [#2931](https://github.com/VisActor/VChart/issues/2931)
- **@visactor/vchart**: fix error of setDimentionIndex when dimension axis is linear

**🔧 Configuration releated**

- **@visactor/vchart**: update rollup.config.js to fix es5/index.js, fix [#2971](https://github.com/VisActor/VChart/issues/2971)



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

# v1.11.9

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

2024-07-24


**🆕 新增功能**

- **@visactor/vchart**: 水波图支持反转和通过自定义mark实现目标线的能力。关闭 [#2977](https://github.com/VisActor/VChart/issues/2977) 和关闭 [#2978](https://github.com/VisActor/VChart/issues/2978)
- **@visactor/vchart**: 在地理缩放事件中添加 `totalScale` 参数
- **@visactor/vchart**: 支持 `geoZoomByIndex`/`geoZoomById` API,关闭 [#2925](https://github.com/VisActor/VChart/issues/2925)
- **@visactor/vchart**: MarkLine的标签签背景支持自定义路径。关闭 [#2959](https://github.com/VisActor/VChart/issues/2959)

**🐛 功能修复**

- **@visactor/vchart**: 修复ios设备中,`pointEvent` 开启后导致的问题
- **@visactor/vchart**: 修复水波图反转后,渐变色不生效的问题
- **@visactor/vchart**: 修复`zoomEnd` 组合事件中,触发原始事件的bug [#2931](https://github.com/VisActor/VChart/issues/2931)
- **@visactor/vchart**: 修复当维度轴为连续类型时,`setDimensionIndex`不能正常的展示 tooltip的问题

**🔧 项目配置**

- **@visactor/vchart**: 更新 rollup.config.js,修复 es5/index.js在浏览器中报错的问题,修复 [#2971](https://github.com/VisActor/VChart/issues/2971)



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

# v1.11.9

2024-07-17
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/examples-react/zh/events/sync-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Card = () => {

const dimensionValue = params.dimensionInfo && params.dimensionInfo[0] && params.dimensionInfo[0].value;

if (dimensionValue != null) {
if (dimensionValue != null && params.action !== 'leave') {
barChartRef.current.setDimensionIndex(dimensionValue, { tooltip: false });
} else {
barChartRef.current.setDimensionIndex(null, { tooltip: false });
Expand All @@ -97,7 +97,7 @@ const Card = () => {
}
const dimensionValue = params.dimensionInfo && params.dimensionInfo[0] && params.dimensionInfo[0].value;

if (dimensionValue != null) {
if (dimensionValue != null && params.action !== 'leave') {
lineChartRef.current.setDimensionIndex(dimensionValue, { tooltip: false });
} else {
lineChartRef.current.setDimensionIndex(null, { tooltip: false });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: examples
group: funnel chart
group: react attributes
title: 使用react渲染漏斗图标签
keywords: funnelChart,composition,trend,triangle
order: 5-0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: examples
group: area chart
group: react attributes
title: 自定义图例icon
keywords: funnelChart,composition,trend,triangle
order: 5-0
Expand Down
248 changes: 248 additions & 0 deletions docs/assets/examples/en/custom/business-funnel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
---
category: examples
group: customMark
title: Business Funnel(Simulated with Bar)
order: 40-2
cover: /vchart/preview/business-funnel-with-bar_1.11.10.png
option: barChart#customMark
---

# Business Funnel(Simulated with Bar)

## Key option

- `customShape` set the customized shape of rectangles

## Demo source

```javascript livedemo
const spec = {
type: 'common',
seriesField: 'color',
height: 300,
padding: { top: 50, bottom: 50, left: 20, right: 20 },
data: [
{
id: 'main',
values: [
{ x: '大盘商品', y: 11795000, percent: 100, average: 1000000 },
{ x: '发生价格变化的商品', y: 5300000, percent: 4.52, average: 1000000 },
{ x: '符合筛选条件的商品', y: 174000, percent: 0.19, average: 1000 }
]
},
{
id: 'transform',
values: [
{ x: '0-1', y0: 11795000, y1: 5300000, y: 6495000, percent: -95.48 },
{ x: '1-2', y0: 5300000, y1: 174000, y: 5126000, percent: -4.33 }
]
}
],
series: [
{
type: 'bar',
id: 'bar',
dataIndex: 0,
xField: 'x',
yField: 'y',
extensionMark: [
{
type: 'text',
dataId: 'main',
style: {
x: (datum, ctx) => ctx.valueToX(datum.x) + ctx.xBandwidth() / 2,
y: -40,
textAlign: 'center',
fontSize: 12,
stroke: false,
text: datum => {
return {
type: 'rich',
text: [
{
text: `${datum.percent}%\n`,
fill: 'black',
textAlign: 'center',
fontWeight: 'bold',
lineHeight: 20
},

{ text: `${datum.y}`, fill: 'grey', textAlign: 'center', lineHeight: 20 }
]
};
}
}
}
]
},
{
type: 'bar',
id: 'transform',
dataIndex: 1,
xField: 'x',
yField: 'y',
bar: { visible: false },
extensionMark: [
{
type: 'polygon',
dataId: 'transform',
dataKey: 'x',
style: {
points: (datum, ctx) => {
const { valueToX, valueToY, xBandwidth } = ctx;
return [
{ x: valueToX(datum.x), y: valueToY(0) + 40 },
{ x: valueToX(datum.x) + xBandwidth(), y: valueToY(0) + 40 },
{ x: valueToX(datum.x) + xBandwidth(), y: -40 },
{ x: valueToX(datum.x), y: -40 }
];
},
fill: 'grey',
fillOpacity: 0.05
}
},
{
type: 'polygon',
dataId: 'transform',
dataKey: 'x',
customShape: (data, attrs, path) => {
const points = attrs.points;
path.moveTo(points[0].x, points[0].y);
path.lineTo(points[1].x, points[1].y);
path.lineTo(points[2].x, points[2].y);
path.bezierCurveTo(
(points[0].x + points[1].x) / 2,
points[2].y,
(points[0].x + points[1].x) / 2,
points[3].y,
points[3].x,
points[3].y
);
path.closePath();
return path;
},
style: {
points: (datum, ctx) => {
const { valueToX, valueToY, xBandwidth } = ctx;
return [
{ x: valueToX(datum.x), y: valueToY(0) },
{ x: valueToX(datum.x) + xBandwidth(), y: valueToY(0) },
{ x: valueToX(datum.x) + xBandwidth(), y: valueToY(datum.y1) },
{ x: valueToX(datum.x), y: valueToY(datum.y0) }
];
},
fill: 'rgb(228, 232, 247)'
}
},
{
type: 'text',
dataId: 'transform',
dataKey: 'x',
style: {
x: (datum, ctx) => ctx.valueToX(datum.x) + ctx.xBandwidth() / 2,
y: -40,
textAlign: 'center',
fontSize: 12,
stroke: false,
text: datum => {
return {
type: 'rich',
text: [
{
text: `${datum.percent}%\n`,
fill: 'green',
textAlign: 'center',
fontWeight: 'bold',
lineHeight: 20
},
{ text: `${datum.y}`, fill: 'grey', textAlign: 'center', lineHeight: 20 }
]
};
}
}
}
]
},
{
type: 'bar',
stack: false,
id: 'average',
dataIndex: 0,
xField: 'x',
yField: 'average',
bar: {
visible: true,
style: {
fill: 'orange',
height: 2
}
},
tooltip: { visible: false }
}
],
tooltip: {
mark: { visible: false },
dimension: {
title: (data, params) => {
return {
value: data[0]?.value?.includes('-') ? '流失情况' : data[0].value
};
},
content: (data, params) => {
const isLose = data[0]?.value?.includes('-');
if (isLose) {
return [
{ hasShape: false, key: '流失量', value: datum => datum.y },
{ hasShape: false, key: '流失率', value: datum => `${datum.percent}%` }
];
} else {
return [
{ hasShape: false, key: datum => datum.x, value: datum => datum.y },
{ hasShape: false, key: datum => `${datum.x}占比`, value: datum => `${datum.percent}%` },
{ hasShape: false, key: `average`, value: datum => datum.average }
];
}
}
}
},
axes: [
{ orient: 'left', seriesIndex: [0, 1, 2], visible: false },
{
orient: 'bottom',
paddingInner: 0,
paddingOuter: 0,
domain: ['大盘商品', '0-1', '发生价格变化的商品', '1-2', '符合筛选条件的商品'],
domainLine: { visible: false },
tick: { visible: false },
label: {
style: { fill: 'black' },
formatMethod: label => {
if (label.includes('-')) {
return {
type: 'rich',
text: [
{
image: `<svg t="1722236631845" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9542" width="200" height="200"><path d="M779.8 240.9l225.9 225.9c25 25 25 65.5 0 90.5L779.8 783.1c-1.6 1.6-4.1 1.6-5.7 0l-62.2-62.2c-1.6-1.6-1.6-4.1 0-5.7l148.4-148.4c2.5-2.5 0.7-6.8-2.8-6.8H4c-2.2 0-4-1.8-4-4v-88c0-2.2 1.8-4 4-4h853.5c3.6 0 5.3-4.3 2.8-6.8L711.9 308.8c-1.6-1.6-1.6-4.1 0-5.7l62.2-62.2c1.6-1.6 4.1-1.6 5.7 0z" p-id="9543" fill="#707070"></path></svg>`,
height: 14,
width: 10
}
]
};
}
return label;
}
}
}
]
};

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

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
```
## 相关教程
[自定义 mark](link)
7 changes: 7 additions & 0 deletions docs/assets/examples/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,13 @@
"zh": "自定义矩形渲染html拓展属性",
"en": "Render html in custom rect"
}
},
{
"path": "business-funnel",
"title": {
"zh": "业务漏斗图(柱状图模拟)",
"en": "Business Funnel(Simulated with Bar)"
}
}
]
},
Expand Down
Loading

0 comments on commit 701a7bb

Please sign in to comment.