@idux/charts 1.6.1 → 1.7.0
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/CHANGELOG.md +54 -0
- package/README.md +5 -4
- package/README.zh.md +4 -3
- package/dist/bullet.d.ts +1 -0
- package/dist/bullet.js +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/word-cloud.d.ts +1 -0
- package/dist/word-cloud.js +1 -0
- package/package.json +17 -3
- package/types.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @idux/charts
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2d1086a: Add `IxBulletChart` and `createBulletOption` for comparing actual values, targets, and qualitative ranges.
|
|
8
|
+
|
|
9
|
+
- Import the component, option builder, and public types from `@idux/charts`, `@idux/charts/bullet`, or `@idux/charts-plots`. Include Vue global-component declarations for `IxBulletChart`.
|
|
10
|
+
- Use `value` and `target` for a single indicator, or supply `data` for grouped rows. Supplying `data` selects grouped mode even for an empty array or a single row. Support `horizontal` and `horizontal-above` grouped layouts, with full-name tooltips for truncated categories.
|
|
11
|
+
- Configure qualitative ranges with increasing numeric `upper` bounds, optional colors and labels, and an explicit scale through `xAxis.min` / `xAxis.max`. Keep actual bars, tracks, target markers, and range guides aligned with native axis direction and bar widths.
|
|
12
|
+
- Distinguish valid zero values from missing measurements. Missing actual values use a missing-data background while valid targets remain visible. `zeroText` is opt-in; the above-label layout suppresses zero-value labels while retaining tracks and targets.
|
|
13
|
+
- Support native bar labels, formatters, styles, emphasis, selection, marks, and tooltip overrides. Preserve the grouped zoom window during data refreshes, and follow appended categories when the current window is at the end.
|
|
14
|
+
- Integrate reactive plot themes, light/dark loading illustrations, default overlay slots, and the shared chart lifecycle. Export `getLinearColor` and `getLinearColors` through the aggregate plots entry for matching custom gradients.
|
|
15
|
+
|
|
16
|
+
Range bounds use measurement units rather than normalized ratios. Invalid scales or ranges emit actionable diagnostics and clear generated series. The built-in layout uses a horizontal value axis and vertical category axis; supply native `series` to replace the generated series for other arrangements. Add API guidance and single/grouped examples for Vue 2 and Vue 3 consumers.
|
|
17
|
+
|
|
18
|
+
- 2d1086a: Add `createMapTransition(getChart, options?)` for animated map drilldown and return navigation.
|
|
19
|
+
|
|
20
|
+
- Export the helper and `MapTransition`, `MapTransitionDirection`, and `MapTransitionOptions` types from the aggregate chart entries and `@idux/charts/map`.
|
|
21
|
+
- Use `run('drilldown' | 'back', update)` to commit prepared map and data changes between native camera transitions and a canvas fade. Await reactive rendering inside `update`; each phase defaults to 480ms, and the cover follows chart resizing and the effective background.
|
|
22
|
+
- Return a completion boolean, cancel superseded runs, and expose `cancel()` and `dispose()` for application lifecycle cleanup. Remove temporary covers, listeners, and timers, and restore phase viewport and animation settings on cancellation or failure. Reject callback/update failures without leaving transition resources behind.
|
|
23
|
+
- Apply changes directly when the chart or first `geo` is unavailable, duration is zero, animation is disabled, or reduced motion is requested. Preserve the new map's final camera and animation settings after a completed transition.
|
|
24
|
+
- Add a China province/city drilldown demo with lazy-loaded boundaries from `@idux/geo-areas`, and refresh world density/status and China route examples with geometry from the same package, updated attribution, and API guidance.
|
|
25
|
+
|
|
26
|
+
The helper operates on the first `geo`. Load and register geometry and finish asynchronous requests before starting a transition; application code owns hierarchy, navigation, and stale-response handling. Cancellation does not roll back an `update` that has already started. Dispose the helper on unmount. The geometry dependency belongs to the documentation site and is not added to the published chart packages.
|
|
27
|
+
|
|
28
|
+
- 2d1086a: Add `IxWordCloudChart` and `createWordCloudOption`, built on native ECharts graph series without an additional word-cloud plugin.
|
|
29
|
+
|
|
30
|
+
- Export the component, builder, public props, data-item, shape, and motion types from `@idux/charts`, `@idux/charts/word-cloud`, and `@idux/charts-plots`. Add Vue global-component declarations and include `GraphSeriesOption` in the core `ChartOption` series union.
|
|
31
|
+
- Render weighted horizontal text, rectangular tags, or circles with configurable `sizeRange`, `gap`, and rectangular background `overlap`. Measure labels and state geometry, prioritize higher weights in crowded containers, and omit items that do not fit without silently shrinking explicit sizes.
|
|
32
|
+
- Support native categories, palettes, labels, item styles, tooltips, emphasis, selection, and graph-node events. Keep event indices tied to the original input. Preserve selection by stable item identity and retain positions for appearance-only changes; remeasure after container or asynchronous font changes.
|
|
33
|
+
- Add opt-in floating `motion`, with amplitude, axis ratio, duration, and pause-on-hover controls. Reserve movement space and respect reduced-motion preferences and disabled animation. Native entry/update transitions remain separately configurable.
|
|
34
|
+
- Integrate reactive plot themes, light/dark loading illustrations, default overlay slots, and shared instance methods. Add examples for text, tags, circles, motion, search highlighting, and native options.
|
|
35
|
+
|
|
36
|
+
Use finite non-negative weights and non-empty names; zero is valid. Invalid items are skipped, invalid layout settings or duplicate explicit IDs clear generated series, and invalid motion settings disable floating. Empty or unplaceable data leaves an empty canvas for caller-provided slot content. Native selection uses names, so duplicate names share selection; provide distinct names when independent selection is required.
|
|
37
|
+
|
|
38
|
+
The built-in layout supports horizontal labels rather than pixel-level glyph packing, image masks, arbitrary outlines, or force layouts. It does not support dataset/encode, axes, dataZoom, links, dragging, or roaming. `createWordCloudOption` requires the extensions registered by the component entry; direct builder consumers should resize after fonts load. Supplying native `series` replaces all generated series.
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- 2d1086a: Improve horizontal category labels and zero-value presentation in built-in Bar layouts.
|
|
43
|
+
|
|
44
|
+
- Show full category names on label hover, including rows with missing or all-zero measurements. Keep default truncation within the category label width, escape HTML label content, and support native rich-text tooltips. Honor custom axis tooltips and allow opting out with `yAxis.triggerEvent: false`.
|
|
45
|
+
- Constrain shared HTML tooltip titles and category text to the viewport and wrap long names, with an 18px title line height. Import `@idux/charts/dist/style.css` to apply these shared tooltip styles.
|
|
46
|
+
- In `horizontal-above`, hide numeric labels for zero values and suppress the central all-zero message so the category rows remain readable. Preserve missing-value styling and the existing `zeroText` behavior in other category layouts.
|
|
47
|
+
|
|
48
|
+
The same category-label tooltip behavior is available in the new grouped Bullet chart. Update API guidance and add regression coverage for long labels, missing values, all-zero data, and tooltip overrides.
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [2d1086a]
|
|
51
|
+
- Updated dependencies [2d1086a]
|
|
52
|
+
- Updated dependencies [2d1086a]
|
|
53
|
+
- Updated dependencies [2d1086a]
|
|
54
|
+
- @idux/charts-plots@1.7.0
|
|
55
|
+
- @idux/charts-core@1.7.0
|
|
56
|
+
|
|
3
57
|
## 1.6.1
|
|
4
58
|
|
|
5
59
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ Vue.use(VueCompositionAPI)
|
|
|
33
33
|
| `IxPieChart` | Pie and doughnut |
|
|
34
34
|
| `IxRadarChart` | Radar |
|
|
35
35
|
| `IxGaugeChart` | Gauge |
|
|
36
|
+
| `IxBulletChart` | Bullet (single and grouped) |
|
|
36
37
|
| `IxMapChart` | Map (regions, nodes, routes) |
|
|
37
38
|
| `IxLiquidFillChart` | Liquid fill |
|
|
38
39
|
|
|
@@ -64,13 +65,13 @@ const option: LineChartProps = {
|
|
|
64
65
|
|
|
65
66
|
Chart components register their required ECharts modules. Global registration is also supported: use `app.use(IxLineChart)` in Vue 3 or `Vue.use(IxLineChart)` in Vue 2.
|
|
66
67
|
|
|
67
|
-
Use an ESM subpath such as `@idux/charts/line` to import one chart family and its types. The available subpaths are `bar`, `line` (including area), `pie`, `radar`, `gauge`, `liquid-fill`, and `map`. Import the base component, ECharts theme token, and shared tooltip helpers from `@idux/charts/core`. Each chart subpath also exports the plot theme token. The aggregate entry registers the full set of charts.
|
|
68
|
+
Use an ESM subpath such as `@idux/charts/line` to import one chart family and its types. The available subpaths are `bar`, `line` (including area), `pie`, `radar`, `gauge`, `liquid-fill`, `bullet`, `word-cloud`, and `map`. Import the base component, ECharts theme token, and shared tooltip helpers from `@idux/charts/core`. Each chart subpath also exports the plot theme token. The aggregate entry registers the full set of charts.
|
|
68
69
|
|
|
69
70
|
## Configuration and themes
|
|
70
71
|
|
|
71
|
-
- `useBarOption`, `useLineOption`, and `usePieOption` provide composable options; `createRadarOption`, `createGaugeOption`, `createLiquidFillOption`, and `createMapOption` are pure option builders.
|
|
72
|
+
- `useBarOption`, `useLineOption`, and `usePieOption` provide composable options; `createRadarOption`, `createGaugeOption`, `createLiquidFillOption`, `createBulletOption`, and `createMapOption` are pure option builders.
|
|
72
73
|
- Use Vue `provide` with `BAR_CHART_TOKEN`, `LINE_CHART_TOKEN`, or `PIE_CHART_TOKEN` to set defaults for the corresponding native and built-in layouts.
|
|
73
|
-
- Category Bar, Line / Area, automatic Pie, Radar, Gauge, LiquidFill, and Map support `plotTheme`. Provide reactive defaults with `PLOT_THEME_TOKEN`, or pass `plotTheme` explicitly to a pure option builder.
|
|
74
|
+
- Category Bar, Line / Area, automatic Pie, Radar, Gauge, Bullet, LiquidFill, and Map support `plotTheme`. Provide reactive defaults with `PLOT_THEME_TOKEN`, or pass `plotTheme` explicitly to a pure option builder.
|
|
74
75
|
- Option objects merge by field and arrays replace in full. Every chart component exposes `getEChartsInstance()` on its template ref.
|
|
75
76
|
|
|
76
77
|
Shared HTML tooltip styles live in `@idux/charts/dist/style.css`; import them once in the application entry point.
|
|
@@ -85,7 +86,7 @@ Chart components forward `role`, `aria-*`, `tabindex`, and `data-*` to the chart
|
|
|
85
86
|
|
|
86
87
|
## Loading
|
|
87
88
|
|
|
88
|
-
Set `:loading="pending"` to show the built-in illustration and `Loading...` message without recreating the chart. Bar, Line/Area, Pie/Ring/Rose, Radar, Gauge, LiquidFill, and Map select their illustration automatically. `IxChart` and `useChart` inspect the first series: pie or absent series types use the pie fallback; all other types use the generic illustration. Both light and dark palettes are built in.
|
|
89
|
+
Set `:loading="pending"` to show the built-in illustration and `Loading...` message without recreating the chart. Bar, Line/Area, Pie/Ring/Rose, Radar, Gauge, Bullet, LiquidFill, and Map select their illustration automatically. `IxChart` and `useChart` inspect the first series: pie or absent series types use the pie fallback; all other types use the generic illustration. Both light and dark palettes are built in.
|
|
89
90
|
|
|
90
91
|
Pass an object to localize or customize the state: `:loading="pending && { text: 'Updating...', maskColor: 'transparent' }"`. Other options include `textColor`, `color` (illustration tint), `fontSize`, `fontFamily`, and `icon` (image URL or SVG source). The loading layer is DOM content; it is excluded from ECharts image exports. Native spinner options such as `showSpinner` and `spinnerRadius` no longer change the illustration.
|
|
91
92
|
|
package/README.zh.md
CHANGED
|
@@ -33,6 +33,7 @@ Vue.use(VueCompositionAPI)
|
|
|
33
33
|
| `IxPieChart` | 饼图、环形图 |
|
|
34
34
|
| `IxRadarChart` | 雷达图 |
|
|
35
35
|
| `IxGaugeChart` | 仪表盘 |
|
|
36
|
+
| `IxBulletChart` | 子弹图(单值与分组) |
|
|
36
37
|
| `IxMapChart` | 地图(区域、节点、线路) |
|
|
37
38
|
| `IxLiquidFillChart` | 水波图 |
|
|
38
39
|
|
|
@@ -64,13 +65,13 @@ const option: LineChartProps = {
|
|
|
64
65
|
|
|
65
66
|
图表组件会注册自身所需的 ECharts 模块。组件也支持全局注册:Vue 3 使用 `app.use(IxLineChart)`,Vue 2 使用 `Vue.use(IxLineChart)`。
|
|
66
67
|
|
|
67
|
-
ESM 项目可通过 `@idux/charts/line` 等子入口导入单个图表系列及类型。支持 `bar`、`line`(含面积图)、`pie`、`radar`、`gauge`、`liquid-fill` 和 `map`。基础组件、ECharts 主题 token 和共享 Tooltip 工具可从 `@idux/charts/core` 导入,图形主题 token 从各图表子入口导入。总入口会注册全套图表模块。
|
|
68
|
+
ESM 项目可通过 `@idux/charts/line` 等子入口导入单个图表系列及类型。支持 `bar`、`line`(含面积图)、`pie`、`radar`、`gauge`、`liquid-fill`、`bullet`、`word-cloud` 和 `map`。基础组件、ECharts 主题 token 和共享 Tooltip 工具可从 `@idux/charts/core` 导入,图形主题 token 从各图表子入口导入。总入口会注册全套图表模块。
|
|
68
69
|
|
|
69
70
|
## 配置与主题
|
|
70
71
|
|
|
71
|
-
- `useBarOption`、`useLineOption`、`usePieOption` 提供组合式配置;`createRadarOption`、`createGaugeOption`、`createLiquidFillOption`、`createMapOption` 提供纯配置构建函数。
|
|
72
|
+
- `useBarOption`、`useLineOption`、`usePieOption` 提供组合式配置;`createRadarOption`、`createGaugeOption`、`createLiquidFillOption`、`createBulletOption`、`createMapOption` 提供纯配置构建函数。
|
|
72
73
|
- `BAR_CHART_TOKEN`、`LINE_CHART_TOKEN`、`PIE_CHART_TOKEN` 通过 Vue `provide` 为对应图表的原生和内置布局提供默认配置。
|
|
73
|
-
- 分类 Bar、Line / Area、自动 Pie、Radar、Gauge、LiquidFill 和 Map 支持 `plotTheme`。用 `PLOT_THEME_TOKEN` 提供响应式默认值,直接调用纯配置构建函数时传入所需的 `plotTheme`。
|
|
74
|
+
- 分类 Bar、Line / Area、自动 Pie、Radar、Gauge、Bullet、LiquidFill 和 Map 支持 `plotTheme`。用 `PLOT_THEME_TOKEN` 提供响应式默认值,直接调用纯配置构建函数时传入所需的 `plotTheme`。
|
|
74
75
|
- 配置对象按字段合并,数组整体替换。所有组件的模板 ref 均可调用 `getEChartsInstance()`。
|
|
75
76
|
|
|
76
77
|
共享 HTML 提示框样式位于 `@idux/charts/dist/style.css`,在应用入口导入一次即可。
|
package/dist/bullet.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@idux/charts-plots/dist/bullet/index.js';
|
package/dist/bullet.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@idux/charts-plots/dist/bullet/index.js";
|
package/dist/index.js
CHANGED
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.IduxCharts={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.version=`1.
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.IduxCharts={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.version=`1.7.0`;var t=require("@idux/charts-core");Object.keys(t).forEach(function(n){n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=require("@idux/charts-plots");Object.keys(n).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})});
|
package/dist/style.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.ix-chart-tooltip{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.charts-tooltips{min-width:180px}.charts-tooltips-title{color:inherit;margin-bottom:8px;font-size:12px;font-weight:600;line-height:
|
|
1
|
+
.ix-chart-tooltip{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.charts-tooltips{min-width:180px}.charts-tooltips-title{color:inherit;margin-bottom:8px;font-size:12px;font-weight:600;line-height:18px}.charts-tooltips-title,.charts-tooltips-category{white-space:normal;overflow-wrap:anywhere;max-width:min(320px,100vw - 80px)}.charts-tooltips-columns{max-width:min(var(--ix-chart-tooltip-columns-max-width,100vw), calc(100vw - 48px));gap:8px;max-height:calc(100vh - 64px);display:flex;overflow:auto}.charts-tooltips-column{flex:none;min-width:180px}.charts-tooltips-column .charts-tooltips-item{gap:12px}.charts-tooltips-item{box-sizing:border-box;height:32px;color:inherit;background:var(--ix-chart-tooltip-item-background,#fff);box-shadow:var(--ix-chart-tooltip-item-shadow,0px 4px 12px 0px #0237b31a);border-radius:2px;justify-content:space-between;align-items:center;margin-bottom:4px;padding:6px 12px;font-size:12px;line-height:20px;display:flex;position:relative}.charts-tooltips-item:last-child{margin-bottom:0}.charts-tooltips-item-border{width:2px;height:100%;box-shadow:var(--ix-chart-tooltip-marker-shadow,0px 2px 8px 0px #e8f4ff);background:#458fff;border-radius:2px 0 0 2px;position:absolute;top:0;left:0}[data-ix-chart-theme=light]{--ix-chart-tooltip-item-background:#fff;--ix-chart-tooltip-item-shadow:0px 4px 12px 0px #0237b31a;--ix-chart-tooltip-marker-shadow:0px 2px 8px 0px #e8f4ff}[data-ix-chart-theme=dark]{--ix-chart-tooltip-item-background:#1c232e;--ix-chart-tooltip-item-shadow:0px 4px 12px 0px #00000040;--ix-chart-tooltip-marker-shadow:none}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@idux/charts-plots/dist/word-cloud/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@idux/charts-plots/dist/word-cloud/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idux/charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A chart component library for Vue 2 & 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"**/*.less"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@idux/charts-core": "1.
|
|
40
|
-
"@idux/charts-plots": "1.
|
|
39
|
+
"@idux/charts-core": "1.7.0",
|
|
40
|
+
"@idux/charts-plots": "1.7.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@vue/composition-api": ">=1.6.2",
|
|
@@ -96,6 +96,14 @@
|
|
|
96
96
|
"./map": {
|
|
97
97
|
"types": "./dist/map.d.ts",
|
|
98
98
|
"import": "./dist/map.js"
|
|
99
|
+
},
|
|
100
|
+
"./bullet": {
|
|
101
|
+
"types": "./dist/bullet.d.ts",
|
|
102
|
+
"import": "./dist/bullet.js"
|
|
103
|
+
},
|
|
104
|
+
"./word-cloud": {
|
|
105
|
+
"types": "./dist/word-cloud.d.ts",
|
|
106
|
+
"import": "./dist/word-cloud.js"
|
|
99
107
|
}
|
|
100
108
|
},
|
|
101
109
|
"typesVersions": {
|
|
@@ -123,6 +131,12 @@
|
|
|
123
131
|
],
|
|
124
132
|
"map": [
|
|
125
133
|
"dist/map.d.ts"
|
|
134
|
+
],
|
|
135
|
+
"bullet": [
|
|
136
|
+
"dist/bullet.d.ts"
|
|
137
|
+
],
|
|
138
|
+
"word-cloud": [
|
|
139
|
+
"dist/word-cloud.d.ts"
|
|
126
140
|
]
|
|
127
141
|
}
|
|
128
142
|
},
|
package/types.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ declare module 'vue' {
|
|
|
4
4
|
IxBarChart: (typeof import('@idux/charts-plots'))['IxBarChart']
|
|
5
5
|
IxLineChart: (typeof import('@idux/charts-plots'))['IxLineChart']
|
|
6
6
|
IxRadarChart: (typeof import('@idux/charts-plots'))['IxRadarChart']
|
|
7
|
+
IxWordCloudChart: (typeof import('@idux/charts-plots'))['IxWordCloudChart']
|
|
8
|
+
IxBulletChart: (typeof import('@idux/charts-plots'))['IxBulletChart']
|
|
7
9
|
IxGaugeChart: (typeof import('@idux/charts-plots'))['IxGaugeChart']
|
|
8
10
|
IxLiquidFillChart: (typeof import('@idux/charts-plots'))['IxLiquidFillChart']
|
|
9
11
|
IxMapChart: (typeof import('@idux/charts-plots'))['IxMapChart']
|