This is an automated email from the ASF dual-hosted git repository.
ovilia pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-custom-series.git
The following commit(s) were added to refs/heads/dev by this push:
new 74f3405 chore: release contour
74f3405 is described below
commit 74f3405c1a42bad87eca7b1d4338f1c849721c25
Author: Ovilia <[email protected]>
AuthorDate: Thu Aug 14 12:10:22 2025 +0800
chore: release contour
---
custom-series/barRange/README.md | 12 +-
custom-series/barRange/package-lock.json | 4 +-
custom-series/barRange/package.json | 2 +-
custom-series/barRange/src/index.ts | 7 +-
custom-series/contour/README.md | 67 ++--
.../contour/dist/{index.js => index.auto.js} | 111 ++++---
custom-series/contour/dist/index.auto.min.js | 22 ++
custom-series/contour/dist/index.auto.min.js.map | 1 +
custom-series/contour/dist/index.d.ts | 5 +
custom-series/contour/dist/index.esm.min.mjs | 20 ++
custom-series/contour/dist/index.esm.min.mjs.map | 1 +
custom-series/contour/dist/index.esm.mjs | 137 ++++++++
custom-series/contour/dist/index.js | 106 ++++---
custom-series/contour/dist/index.min.js | 3 +-
custom-series/contour/dist/index.min.js.map | 2 +-
custom-series/contour/examples/index.html | 97 ++++++
custom-series/contour/examples/ssr.js | 98 ++++++
custom-series/contour/package-lock.json | 347 ++++-----------------
custom-series/contour/package.json | 43 ++-
custom-series/contour/rollup.config.js | 54 ++--
custom-series/contour/screenshots/contour.svg | 110 +++++++
custom-series/contour/src/index.ts | 19 +-
custom-series/contour/test/index.html | 74 -----
custom-series/violin/src/index.ts | 7 +-
scripts/generate.js | 2 +-
scripts/rollup.config.js | 58 +++-
scripts/template/README.md | 2 +-
27 files changed, 859 insertions(+), 552 deletions(-)
diff --git a/custom-series/barRange/README.md b/custom-series/barRange/README.md
index aad08fe..afdc519 100644
--- a/custom-series/barRange/README.md
+++ b/custom-series/barRange/README.md
@@ -2,7 +2,7 @@
`barRange` is a custom series for [Apache
ECharts](https://github.com/apache/echarts). It's typically used to display the
range of data using bars.
-
+
[Source
Code](https://github.com/apache/echarts-custom-series/tree/main/custom-series/barRange)
@@ -76,11 +76,11 @@ The first element of the sub-array is the x value. The
second and third elements
The `itemPayload` is an object that contains the following properties:
-| Property | Type | Default | Description
|
-| -------------- | -------- | ------- |
----------------------------------------- | --------------------- |
-| `barWidth` | `number` | string` | `70%`
| The width of the bar. |
-| `borderRadius` | `number` | `0` | The border radius of the bar.
|
-| `margin` | `number` | `10` | The margin between the bars and the
text. |
+| Property | Type | Default | Description
|
+| -------------- | ----------------- | ------- |
----------------------------------------- |
+| `barWidth` | `number \| string` | `70%` | The width of the bar.
|
+| `borderRadius` | `number` | `0` | The border radius of the bar.
|
+| `margin` | `number` | `10` | The margin between the bars
and the text. |
### series.encode
diff --git a/custom-series/barRange/package-lock.json
b/custom-series/barRange/package-lock.json
index 3731728..807b384 100644
--- a/custom-series/barRange/package-lock.json
+++ b/custom-series/barRange/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@echarts-x/custom-bar-range",
- "version": "1.0.0-beta.0",
+ "version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@echarts-x/custom-bar-range",
- "version": "1.0.0-beta.0",
+ "version": "1.0.0",
"license": "Apache-2.0",
"devDependencies": {
"echarts": "^6.0.0",
diff --git a/custom-series/barRange/package.json
b/custom-series/barRange/package.json
index 796b71b..0b32f87 100644
--- a/custom-series/barRange/package.json
+++ b/custom-series/barRange/package.json
@@ -1,6 +1,6 @@
{
"name": "@echarts-x/custom-bar-range",
- "version": "1.0.0-beta.0",
+ "version": "1.0.0",
"description": "Custom barRange series for Apache ECharts",
"main": "dist/index.js",
"module": "dist/index.esm.mjs",
diff --git a/custom-series/barRange/src/index.ts
b/custom-series/barRange/src/index.ts
index c45be8d..db8fa06 100644
--- a/custom-series/barRange/src/index.ts
+++ b/custom-series/barRange/src/index.ts
@@ -17,10 +17,11 @@
* under the License.
*/
-import * as echarts from 'echarts';
import type {
CustomRootElementOption,
CustomSeriesRenderItem,
+ CustomSeriesRenderItemParams,
+ CustomSeriesRenderItemAPI,
} from 'echarts/types/src/chart/custom/CustomSeries.d.ts';
import type {
EChartsExtensionInstallRegisters,
@@ -28,8 +29,8 @@ import type {
} from 'echarts/types/src/extension.d.ts';
const renderItem = (
- params: echarts.CustomSeriesRenderItemParams,
- api: echarts.CustomSeriesRenderItemAPI
+ params: CustomSeriesRenderItemParams,
+ api: CustomSeriesRenderItemAPI
) => {
const x = api.value(0);
const valueStart = api.value(1);
diff --git a/custom-series/contour/README.md b/custom-series/contour/README.md
index 4cb4cef..5becf16 100644
--- a/custom-series/contour/README.md
+++ b/custom-series/contour/README.md
@@ -1,58 +1,70 @@
-# contour
+# @echarts-x/custom-contour
-`contour` is a custom series for [Apache
ECharts](https://github.com/apache/echarts). It's typically used to visualize
where the data points are concentrated.
+`contour` is a custom series for [Apache
ECharts](https://github.com/apache/echarts). It's typically used to ...
-This is a contour custom series for Apache ECharts using
[d3-contour](https://d3js.org/d3-contour).
+
-
+[Source
Code](https://github.com/apache/echarts-custom-series/tree/main/custom-series/contour)
## Usage
-Import the custom series JavaScript file and ECharts, then use `echarts.use`
to install it.
+### Browser Environment
+
+For browser usage, use the auto-registration version that automatically
installs the custom series when loaded:
```html
<script src="./node_modules/echarts/dist/echarts.js"></script>
-<script src="./dist/index.js"></script>
+<script
src="./node_modules/@echarts-x/custom-contour/dist/index.auto.js"></script>
<script>
- echarts.use(window.contourCustomSeriesInstaller);
+ // No need to call echarts.use(), automatically registered
const chart = echarts.init(...);
// ...
</script>
```
-Or, if using module bundler, install the package from npm and import it.
+### UMD (Universal Module Definition)
-```bash
-npm install d3 d3-contour @echarts/custom-contour
+For environments that need manual registration or when using AMD/CommonJS
loaders:
+
+```js
+// CommonJS
+const echarts = require('echarts');
+const contourInstaller = require('@echarts-x/custom-contour');
+echarts.use(contourInstaller);
+const chart = echarts.init(...);
+// ...
+
+// AMD
+require(['echarts', '@echarts-x/custom-contour'], function(echarts,
contourInstaller) {
+ echarts.use(contourInstaller);
+});
```
-You need to import `d3` and `d3-contour` before importing calling
`echarts.use(contourCustomSeriesInstaller);`.
+### ESM (ES Modules)
-```html
-<script src="../node_modules/d3/dist/d3.js"></script>
-<script src="../node_modules/d3-contour/dist/d3-contour.js"></script>
+For modern module bundlers or native ES module environments:
+
+```bash
+npm install @echarts-x/custom-contour
```
```js
-import echarts from 'echarts';
-import contourCustomSeriesInstaller from '@echarts/custom-contour';
+import * as echarts from 'echarts';
+import contourCustomSeriesInstaller from '@echarts-x/custom-contour';
echarts.use(contourCustomSeriesInstaller);
```
-See [test](./test/index.html) for more details.
+See [examples](./examples) for more details.
## API
### series.data
-The data of the series is an array of arrays. Each sub-array represents the x
and y value of a point. The contour is generated automatically based on the
data.
+The data of the series is an array of arrays. Each sub-array represents ...
```js
-const data = [
- [12, 100],
- [20, 34]
-];
+const data = [];
```
### series.itemPayload
@@ -61,15 +73,6 @@ The `itemPayload` is an object that contains the following
properties:
| Property | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
-| `thresholds` | `number` | 8 | Bypassed to
[d3-contour.thresholds](https://d3js.org/d3-contour/density#density_thresholds)
|
-| `bandwidth` | `number` | 20 | Bypassed to
[d3-contour.bandwidth](https://d3js.org/d3-contour/density#density_bandwidth) |
-| `itemStyle` | `object` | `{}` | The style of the contour. |
-| `itemStyle.opacity` | `number | number[]` | `[0.3, 1]` | The opacity of the
contour. If it's typed in `number`, all contours will have the same opacity. If
it's typed in `number[]`, it should have a length at 2, representing the min
and max opacity. In this case, the opacity of each contour will be set
according to the interpolation of the array. |
-| `itemStyle.color` | `string | string[]` | `null` | The color of the contour.
If it's typed in `string`, all contours will have the same color. If it's typed
in `string[]`, the color of each contour will be set according to the
interpolation of the array. If it's `null`, series color will be used. |
-| `itemStyle.lineStyle` | `object` | `{}` | The style of the contour line. |
-| `itemStyle.lineStyle.color` | `string` | `null` | The color of the contour
line. If it's `null`, the stroke will not be shown. |
-| `itemStyle.lineStyle.width` | `number` | `1` | The width of the contour
line. |
-| `itemStyle.lineStyle.opacity` | `number` | `1` | The opacity of the contour
line. |
### series.encode
@@ -82,5 +85,3 @@ encode: {
tooltip: 2
}
```
-
-See [test](./test/index.html) for more details.
diff --git a/custom-series/contour/dist/index.js
b/custom-series/contour/dist/index.auto.js
similarity index 56%
copy from custom-series/contour/dist/index.js
copy to custom-series/contour/dist/index.auto.js
index 9db8235..e36991c 100644
--- a/custom-series/contour/dist/index.js
+++ b/custom-series/contour/dist/index.auto.js
@@ -16,11 +16,28 @@
* specific language governing permissions and limitations
* under the License.
*/
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ?
module.exports = factory(require('echarts')) :
- typeof define === 'function' && define.amd ? define(['echarts'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self,
global.contourCustomSeriesInstaller = factory(global.echarts));
-})(this, (function (echarts) { 'use strict';
+
+this.contourCustomSeriesInstaller = (function (echarts, d3) {
+ 'use strict';
+
+ function _interopNamespaceDefault(e) {
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () { return e[k]; }
+ });
+ }
+ });
+ }
+ n.default = e;
+ return Object.freeze(n);
+ }
+
+ var d3__namespace = /*#__PURE__*/_interopNamespaceDefault(d3);
var blendColors = function (colors, dataLength, index) {
if (dataLength <= 1) {
@@ -35,10 +52,10 @@
return colors[colors.length - 1];
}
else {
- var leftColor = d3.color(colors[colorIndex]);
- var rightColor = d3.color(colors[colorIndex + 1]);
+ var leftColor = d3__namespace.color(colors[colorIndex]);
+ var rightColor = d3__namespace.color(colors[colorIndex + 1]);
var ratio = (dataRatio - colorIndex / (colors.length - 1)) *
(colors.length - 1);
- return d3.interpolate(leftColor, rightColor)(ratio);
+ return d3__namespace.interpolate(leftColor, rightColor)(ratio);
}
};
var renderItem = function (params, api) {
@@ -59,24 +76,24 @@
}
var width = coordSys.width;
var height = coordSys.height;
- var x_1 = d3
+ var x_1 = d3__namespace
.scaleLinear()
- .domain(d3.extent(data, function (d) { return d.coord[0]; }))
+ .domain(d3__namespace.extent(data, function (d) { return
d.coord[0]; }))
.range([0, width]);
- var y_1 = d3
+ var y_1 = d3__namespace
.scaleLinear()
- .domain(d3.extent(data, function (d) { return d.coord[1]; }))
+ .domain(d3__namespace.extent(data, function (d) { return
d.coord[1]; }))
.range([0, height]);
var thresholds_1 =
echarts.zrUtil.retrieve2(itemPayload.thresholds, 8);
var bandwidth = echarts.zrUtil.retrieve2(itemPayload.bandwidth,
20);
- var contours = d3
+ var contours = d3__namespace
.contourDensity()
.x(function (d) { return x_1(d.coord[0]); })
.y(function (d) { return y_1(d.coord[1]); })
.size([width, height])
.bandwidth(bandwidth)
.thresholds(thresholds_1)(data.map(function (d) { return ({
coord: d.coord, value: d.value }); }));
- var paths_1 = contours.map(d3.geoPath());
+ var paths_1 = contours.map(d3__namespace.geoPath());
var itemStyle = itemPayload.itemStyle || {};
var colors_1 = itemStyle.color || [api.visual('color')];
var itemOpacity_1 = echarts.zrUtil.retrieve2(itemStyle.opacity,
[0.3, 1]);
@@ -88,34 +105,38 @@
var lineWidth_1 = echarts.zrUtil.retrieve2(lineStyle_1.width, 1);
var children_1 = [];
paths_1.forEach(function (path, index) {
- var fill = blendColors(colors_1, thresholds_1, index);
- children_1.push({
- type: 'path',
- shape: {
- pathData: path,
- },
- style: {
- fill: fill,
- opacity: itemOpacity_1[0] +
- (itemOpacity_1[1] - itemOpacity_1[0]) * (index /
(paths_1.length - 1)),
- },
- z2: -1,
- disableTooltip: true,
- });
- children_1.push({
- type: 'path',
- shape: {
- pathData: path,
- },
- style: {
- fill: 'none',
- stroke: echarts.zrUtil.retrieve2(stroke_1, fill),
- lineWidth: lineWidth_1,
- opacity: echarts.zrUtil.retrieve2(lineStyle_1.opacity,
1),
- },
- z2: -1,
- disableTooltip: true,
- });
+ var fill = colors_1 === 'none' ? 'none' :
blendColors(colors_1, thresholds_1, index);
+ if (colors_1 !== 'none') {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: fill,
+ opacity: itemOpacity_1[0] +
+ (itemOpacity_1[1] - itemOpacity_1[0]) * (index
/ (paths_1.length - 1)),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
+ if (stroke_1 !== 'none' && (stroke_1 != null || colors_1 !==
'none')) {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: 'none',
+ stroke: echarts.zrUtil.retrieve2(stroke_1, fill),
+ lineWidth: lineWidth_1,
+ opacity:
echarts.zrUtil.retrieve2(lineStyle_1.opacity, 1),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
});
return {
type: 'group',
@@ -134,4 +155,8 @@
return index;
-}));
+})(echarts, d3);
+// Automatically register the custom series
+if (typeof window !== 'undefined' && window.echarts) {
+ window.echarts.use(window.contourCustomSeriesInstaller);
+}
diff --git a/custom-series/contour/dist/index.auto.min.js
b/custom-series/contour/dist/index.auto.min.js
new file mode 100644
index 0000000..ff97cd9
--- /dev/null
+++ b/custom-series/contour/dist/index.auto.min.js
@@ -0,0 +1,22 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+this.contourCustomSeriesInstaller=function(e,t){"use strict";function r(e){var
t=Object.create(null);return
e&&Object.keys(e).forEach((function(r){if("default"!==r){var
n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return
e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(t),o=function(t,r){var
o=t.dataInsideLength;if(t.dataIndex===o-1){for(var
i=t.itemPayload,a=t.coordSys,l=[],u=0;u<o;u++){var
c=r.value(0,u),s=r.value(1,u),d=r.value [...]
+// Automatically register the custom series
+"undefined"!=typeof
window&&window.echarts&&window.echarts.use(window.contourCustomSeriesInstaller);
+//# sourceMappingURL=index.auto.min.js.map
diff --git a/custom-series/contour/dist/index.auto.min.js.map
b/custom-series/contour/dist/index.auto.min.js.map
new file mode 100644
index 0000000..e9e68d2
--- /dev/null
+++ b/custom-series/contour/dist/index.auto.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.auto.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/custom-series/contour/dist/index.d.ts
b/custom-series/contour/dist/index.d.ts
new file mode 100644
index 0000000..a8e7d81
--- /dev/null
+++ b/custom-series/contour/dist/index.d.ts
@@ -0,0 +1,5 @@
+// Tricky: use1 and use2 are incompatible.
+import type {use as use1} from 'echarts/core';
+import type {use as use2} from 'echarts';
+declare const _default: Parameters<typeof use1>[0] & Parameters<typeof
use2>[0];
+export default _default;
diff --git a/custom-series/contour/dist/index.esm.min.mjs
b/custom-series/contour/dist/index.esm.min.mjs
new file mode 100644
index 0000000..98af376
--- /dev/null
+++ b/custom-series/contour/dist/index.esm.min.mjs
@@ -0,0 +1,20 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+import{zrUtil}from"echarts";import*as d3 from"d3";var
blendColors=function(e,r,t){if(r<=1)return e[0];var
o=t/(r-1),n=Math.floor(o*(e.length-1));if(n<=0)return
e[0];if(n>=e.length-1)return e[e.length-1];var
i=d3.color(e[n]),a=d3.color(e[n+1]),l=(o-n/(e.length-1))*(e.length-1);return
d3.interpolate(i,a)(l)},renderItem=function(e,r){var
t=e.dataInsideLength;if(e.dataIndex===t-1){for(var
o=e.itemPayload,n=e.coordSys,i=[],a=0;a<t;a++){var
l=r.value(0,a),d=r.value(1,a),u=r.value(2,a),c=r.coor [...]
+//# sourceMappingURL=index.esm.min.mjs.map
diff --git a/custom-series/contour/dist/index.esm.min.mjs.map
b/custom-series/contour/dist/index.esm.min.mjs.map
new file mode 100644
index 0000000..671f88a
--- /dev/null
+++ b/custom-series/contour/dist/index.esm.min.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.esm.min.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/custom-series/contour/dist/index.esm.mjs
b/custom-series/contour/dist/index.esm.mjs
new file mode 100644
index 0000000..bf42484
--- /dev/null
+++ b/custom-series/contour/dist/index.esm.mjs
@@ -0,0 +1,137 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import { zrUtil } from 'echarts';
+import * as d3 from 'd3';
+
+var blendColors = function (colors, dataLength, index) {
+ if (dataLength <= 1) {
+ return colors[0];
+ }
+ var dataRatio = index / (dataLength - 1);
+ var colorIndex = Math.floor(dataRatio * (colors.length - 1));
+ if (colorIndex <= 0) {
+ return colors[0];
+ }
+ else if (colorIndex >= colors.length - 1) {
+ return colors[colors.length - 1];
+ }
+ else {
+ var leftColor = d3.color(colors[colorIndex]);
+ var rightColor = d3.color(colors[colorIndex + 1]);
+ var ratio = (dataRatio - colorIndex / (colors.length - 1)) *
(colors.length - 1);
+ return d3.interpolate(leftColor, rightColor)(ratio);
+ }
+};
+var renderItem = function (params, api) {
+ var cnt = params.dataInsideLength;
+ if (params.dataIndex === cnt - 1) {
+ var itemPayload = params.itemPayload;
+ var coordSys = params.coordSys;
+ var data = [];
+ for (var i = 0; i < cnt; i++) {
+ var xValue = api.value(0, i);
+ var yValue = api.value(1, i);
+ var value = api.value(2, i);
+ var coord = api.coord([xValue, yValue]);
+ data.push({
+ coord: coord,
+ value: value,
+ });
+ }
+ var width = coordSys.width;
+ var height = coordSys.height;
+ var x_1 = d3
+ .scaleLinear()
+ .domain(d3.extent(data, function (d) { return d.coord[0]; }))
+ .range([0, width]);
+ var y_1 = d3
+ .scaleLinear()
+ .domain(d3.extent(data, function (d) { return d.coord[1]; }))
+ .range([0, height]);
+ var thresholds_1 = zrUtil.retrieve2(itemPayload.thresholds, 8);
+ var bandwidth = zrUtil.retrieve2(itemPayload.bandwidth, 20);
+ var contours = d3
+ .contourDensity()
+ .x(function (d) { return x_1(d.coord[0]); })
+ .y(function (d) { return y_1(d.coord[1]); })
+ .size([width, height])
+ .bandwidth(bandwidth)
+ .thresholds(thresholds_1)(data.map(function (d) { return ({ coord:
d.coord, value: d.value }); }));
+ var paths_1 = contours.map(d3.geoPath());
+ var itemStyle = itemPayload.itemStyle || {};
+ var colors_1 = itemStyle.color || [api.visual('color')];
+ var itemOpacity_1 = zrUtil.retrieve2(itemStyle.opacity, [0.3, 1]);
+ if (typeof itemOpacity_1 === 'number') {
+ itemOpacity_1 = [itemOpacity_1, itemOpacity_1];
+ }
+ var lineStyle_1 = itemPayload.lineStyle || {};
+ var stroke_1 = lineStyle_1.color;
+ var lineWidth_1 = zrUtil.retrieve2(lineStyle_1.width, 1);
+ var children_1 = [];
+ paths_1.forEach(function (path, index) {
+ var fill = colors_1 === 'none' ? 'none' : blendColors(colors_1,
thresholds_1, index);
+ if (colors_1 !== 'none') {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: fill,
+ opacity: itemOpacity_1[0] +
+ (itemOpacity_1[1] - itemOpacity_1[0]) * (index /
(paths_1.length - 1)),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
+ if (stroke_1 !== 'none' && (stroke_1 != null || colors_1 !==
'none')) {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: 'none',
+ stroke: zrUtil.retrieve2(stroke_1, fill),
+ lineWidth: lineWidth_1,
+ opacity: zrUtil.retrieve2(lineStyle_1.opacity, 1),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
+ });
+ return {
+ type: 'group',
+ children: children_1,
+ x: coordSys.x,
+ y: coordSys.y,
+ };
+ }
+ return null;
+};
+var index = {
+ install: function (registers) {
+ registers.registerCustomSeries('contour', renderItem);
+ },
+};
+
+export { index as default };
diff --git a/custom-series/contour/dist/index.js
b/custom-series/contour/dist/index.js
index 9db8235..07242df 100644
--- a/custom-series/contour/dist/index.js
+++ b/custom-series/contour/dist/index.js
@@ -16,11 +16,31 @@
* specific language governing permissions and limitations
* under the License.
*/
+
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ?
module.exports = factory(require('echarts')) :
- typeof define === 'function' && define.amd ? define(['echarts'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self,
global.contourCustomSeriesInstaller = factory(global.echarts));
-})(this, (function (echarts) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ?
module.exports = factory(require('echarts'), require('d3')) :
+ typeof define === 'function' && define.amd ? define(['echarts', 'd3'],
factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self,
global.contourCustomSeriesInstaller = factory(global.echarts, global.d3));
+})(this, (function (echarts, d3) { 'use strict';
+
+ function _interopNamespaceDefault(e) {
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () { return e[k]; }
+ });
+ }
+ });
+ }
+ n.default = e;
+ return Object.freeze(n);
+ }
+
+ var d3__namespace = /*#__PURE__*/_interopNamespaceDefault(d3);
var blendColors = function (colors, dataLength, index) {
if (dataLength <= 1) {
@@ -35,10 +55,10 @@
return colors[colors.length - 1];
}
else {
- var leftColor = d3.color(colors[colorIndex]);
- var rightColor = d3.color(colors[colorIndex + 1]);
+ var leftColor = d3__namespace.color(colors[colorIndex]);
+ var rightColor = d3__namespace.color(colors[colorIndex + 1]);
var ratio = (dataRatio - colorIndex / (colors.length - 1)) *
(colors.length - 1);
- return d3.interpolate(leftColor, rightColor)(ratio);
+ return d3__namespace.interpolate(leftColor, rightColor)(ratio);
}
};
var renderItem = function (params, api) {
@@ -59,24 +79,24 @@
}
var width = coordSys.width;
var height = coordSys.height;
- var x_1 = d3
+ var x_1 = d3__namespace
.scaleLinear()
- .domain(d3.extent(data, function (d) { return d.coord[0]; }))
+ .domain(d3__namespace.extent(data, function (d) { return
d.coord[0]; }))
.range([0, width]);
- var y_1 = d3
+ var y_1 = d3__namespace
.scaleLinear()
- .domain(d3.extent(data, function (d) { return d.coord[1]; }))
+ .domain(d3__namespace.extent(data, function (d) { return
d.coord[1]; }))
.range([0, height]);
var thresholds_1 =
echarts.zrUtil.retrieve2(itemPayload.thresholds, 8);
var bandwidth = echarts.zrUtil.retrieve2(itemPayload.bandwidth,
20);
- var contours = d3
+ var contours = d3__namespace
.contourDensity()
.x(function (d) { return x_1(d.coord[0]); })
.y(function (d) { return y_1(d.coord[1]); })
.size([width, height])
.bandwidth(bandwidth)
.thresholds(thresholds_1)(data.map(function (d) { return ({
coord: d.coord, value: d.value }); }));
- var paths_1 = contours.map(d3.geoPath());
+ var paths_1 = contours.map(d3__namespace.geoPath());
var itemStyle = itemPayload.itemStyle || {};
var colors_1 = itemStyle.color || [api.visual('color')];
var itemOpacity_1 = echarts.zrUtil.retrieve2(itemStyle.opacity,
[0.3, 1]);
@@ -88,34 +108,38 @@
var lineWidth_1 = echarts.zrUtil.retrieve2(lineStyle_1.width, 1);
var children_1 = [];
paths_1.forEach(function (path, index) {
- var fill = blendColors(colors_1, thresholds_1, index);
- children_1.push({
- type: 'path',
- shape: {
- pathData: path,
- },
- style: {
- fill: fill,
- opacity: itemOpacity_1[0] +
- (itemOpacity_1[1] - itemOpacity_1[0]) * (index /
(paths_1.length - 1)),
- },
- z2: -1,
- disableTooltip: true,
- });
- children_1.push({
- type: 'path',
- shape: {
- pathData: path,
- },
- style: {
- fill: 'none',
- stroke: echarts.zrUtil.retrieve2(stroke_1, fill),
- lineWidth: lineWidth_1,
- opacity: echarts.zrUtil.retrieve2(lineStyle_1.opacity,
1),
- },
- z2: -1,
- disableTooltip: true,
- });
+ var fill = colors_1 === 'none' ? 'none' :
blendColors(colors_1, thresholds_1, index);
+ if (colors_1 !== 'none') {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: fill,
+ opacity: itemOpacity_1[0] +
+ (itemOpacity_1[1] - itemOpacity_1[0]) * (index
/ (paths_1.length - 1)),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
+ if (stroke_1 !== 'none' && (stroke_1 != null || colors_1 !==
'none')) {
+ children_1.push({
+ type: 'path',
+ shape: {
+ pathData: path,
+ },
+ style: {
+ fill: 'none',
+ stroke: echarts.zrUtil.retrieve2(stroke_1, fill),
+ lineWidth: lineWidth_1,
+ opacity:
echarts.zrUtil.retrieve2(lineStyle_1.opacity, 1),
+ },
+ z2: -1,
+ disableTooltip: true,
+ });
+ }
});
return {
type: 'group',
diff --git a/custom-series/contour/dist/index.min.js
b/custom-series/contour/dist/index.min.js
index efffe37..db88d23 100644
--- a/custom-series/contour/dist/index.min.js
+++ b/custom-series/contour/dist/index.min.js
@@ -16,4 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof
module?module.exports=t(require("echarts")):"function"==typeof
define&&define.amd?define(["echarts"],t):(e="undefined"!=typeof
globalThis?globalThis:e||self).contourCustomSeriesInstaller=t(e.echarts)}(this,(function(e){"use
strict";var t=function(t,r){var
o=t.dataInsideLength;if(t.dataIndex===o-1){for(var
n=t.itemPayload,i=t.coordSys,a=[],l=0;l<o;l++){var
u=r.value(0,l),d=r.value(1,l),c=r.value(2,l),s=r.coord([u,d]);a.push({coo [...]
\ No newline at end of file
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof
module?module.exports=t(require("echarts"),require("d3")):"function"==typeof
define&&define.amd?define(["echarts","d3"],t):(e="undefined"!=typeof
globalThis?globalThis:e||self).contourCustomSeriesInstaller=t(e.echarts,e.d3)}(this,(function(e,t){"use
strict";function r(e){var t=Object.create(null);return
e&&Object.keys(e).forEach((function(r){if("default"!==r){var
n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r, [...]
+//# sourceMappingURL=index.min.js.map
diff --git a/custom-series/contour/dist/index.min.js.map
b/custom-series/contour/dist/index.min.js.map
index 259768a..f63dfe5 100644
--- a/custom-series/contour/dist/index.min.js.map
+++ b/custom-series/contour/dist/index.min.js.map
@@ -1 +1 @@
-{"version":3,"names":["global","factory","exports","module","require","define","amd","globalThis","self","contourCustomSeriesInstaller","echarts","this","renderItem","params","api","cnt","dataInsideLength","dataIndex","itemPayload","coordSys","data","i","xValue","value","yValue","coord","push","width","height","x_1","d3","scaleLinear","domain","extent","d","range","y_1","thresholds_1","zrUtil","retrieve2","thresholds","bandwidth","paths_1","contourDensity","x","y","size","map","geoPath",
[...]
\ No newline at end of file
+{"version":3,"file":"index.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/custom-series/contour/examples/index.html
b/custom-series/contour/examples/index.html
new file mode 100644
index 0000000..25834aa
--- /dev/null
+++ b/custom-series/contour/examples/index.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Apache ECharts Custom Series Test</title>
+ </head>
+
+ <body>
+ <div
+ id="main"
+ style="width: 1000px; height: 400px; border: 1px solid #ccc"
+ ></div>
+
+ <script src="../node_modules/echarts/dist/echarts.js"></script>
+ <script src="../node_modules/d3/dist/d3.js"></script>
+ <script src="../dist/index.auto.js"></script>
+ <script>
+ echarts.use(window.contourCustomSeriesInstaller);
+ const chart = echarts.init(document.getElementById('main'));
+
+ const data = [];
+ const cnt = 300;
+ for (let i = 0; i < cnt; i++) {
+ data.push([
+ (Math.sin((i / cnt) * Math.PI * 2) + Math.random() * 0.2 - 0.4) *
+ 100 *
+ Math.random(),
+ (Math.cos((i / cnt) * Math.PI * 2) + Math.random() * 0.2 - 0.4) *
+ 100 *
+ Math.random(),
+ Math.random() * 10000,
+ ]);
+ }
+
+ option = {
+ xAxis: {},
+ yAxis: {},
+ series: [
+ {
+ type: 'custom',
+ renderItem: 'contour',
+ data,
+ itemPayload: {
+ itemStyle: {
+ color: ['#5470c6', '#91cc75', '#fac858', '#ee6666'],
+ },
+ lineStyle: {
+ opacity: 0.5,
+ },
+ bandwidth: 30,
+ },
+ encode: {
+ x: 0,
+ y: 1,
+ tooltip: 2,
+ },
+ name: 'data',
+ // }, {
+ // type: 'scatter',
+ // data,
+ // name: 'data'
+ },
+ ],
+ visualMap: {
+ seriesIndex: 1,
+ min: 0,
+ max: 10000,
+ inRange: {
+ symbolSize: [3, 5],
+ },
+ show: false,
+ },
+ };
+
+ chart.setOption(option);
+ </script>
+ </body>
+</html>
diff --git a/custom-series/contour/examples/ssr.js
b/custom-series/contour/examples/ssr.js
new file mode 100644
index 0000000..ad8ae9c
--- /dev/null
+++ b/custom-series/contour/examples/ssr.js
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const echarts = require('echarts');
+const contourInstaller = require('../dist/index.js');
+
+echarts.use(contourInstaller);
+
+const chart = echarts.init(null, null, {
+ renderer: 'svg',
+ ssr: true,
+ width: 600,
+ height: 400,
+});
+
+// Set up seeded random for consistent thumbnails
+const seedrandom = require('seedrandom');
+const myRandom = new seedrandom('echarts-random');
+Math.random = function () {
+ return myRandom();
+};
+
+const data = [];
+const cnt = 300;
+for (let i = 0; i < cnt; i++) {
+ data.push([
+ (Math.sin((i / cnt) * Math.PI * 2) + Math.random() * 0.2 - 0.4) *
+ 100 *
+ Math.random(),
+ (Math.cos((i / cnt) * Math.PI * 2) + Math.random() * 0.2 - 0.4) *
+ 100 *
+ Math.random(),
+ Math.random() * 10000,
+ ]);
+}
+
+option = {
+ xAxis: {},
+ yAxis: {},
+ series: [
+ {
+ type: 'custom',
+ renderItem: 'contour',
+ data,
+ itemPayload: {
+ itemStyle: {
+ color: ['#5470c6', '#91cc75', '#fac858', '#ee6666'],
+ },
+ lineStyle: {
+ opacity: 0.5,
+ },
+ bandwidth: 30,
+ },
+ encode: {
+ x: 0,
+ y: 1,
+ tooltip: 2,
+ },
+ name: 'data',
+ // }, {
+ // type: 'scatter',
+ // data,
+ // name: 'data'
+ },
+ ],
+ visualMap: {
+ seriesIndex: 1,
+ min: 0,
+ max: 10000,
+ inRange: {
+ symbolSize: [3, 5],
+ },
+ show: false,
+ },
+};
+
+chart.setOption(option);
+
+const svg = chart.renderToSVGString();
+console.log(svg);
+
+chart.dispose();
diff --git a/custom-series/contour/package-lock.json
b/custom-series/contour/package-lock.json
index fb9a085..d680d75 100644
--- a/custom-series/contour/package-lock.json
+++ b/custom-series/contour/package-lock.json
@@ -1,286 +1,29 @@
{
- "name": "@echarts/custom-contour",
- "version": "0.0.1-beta.1",
+ "name": "@echarts-x/custom-contour",
+ "version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "@echarts/custom-contour",
- "version": "0.0.1-beta.1",
+ "name": "@echarts-x/custom-contour",
+ "version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
- "d3": "^7.9.0",
- "d3-contour": "^4.0.2",
- "echarts": "github:apache/echarts#v6"
+ "d3": "^7.9.0"
},
"devDependencies": {
- "@types/d3": "^7.4.3",
+ "echarts": "^6.0.0",
"typescript": "^5.5.4"
+ },
+ "peerDependencies": {
+ "echarts": "^6.0.0"
}
},
- "node_modules/@types/d3": {
- "version": "7.4.3",
- "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",
- "integrity":
"sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",
- "dev": true,
- "dependencies": {
- "@types/d3-array": "*",
- "@types/d3-axis": "*",
- "@types/d3-brush": "*",
- "@types/d3-chord": "*",
- "@types/d3-color": "*",
- "@types/d3-contour": "*",
- "@types/d3-delaunay": "*",
- "@types/d3-dispatch": "*",
- "@types/d3-drag": "*",
- "@types/d3-dsv": "*",
- "@types/d3-ease": "*",
- "@types/d3-fetch": "*",
- "@types/d3-force": "*",
- "@types/d3-format": "*",
- "@types/d3-geo": "*",
- "@types/d3-hierarchy": "*",
- "@types/d3-interpolate": "*",
- "@types/d3-path": "*",
- "@types/d3-polygon": "*",
- "@types/d3-quadtree": "*",
- "@types/d3-random": "*",
- "@types/d3-scale": "*",
- "@types/d3-scale-chromatic": "*",
- "@types/d3-selection": "*",
- "@types/d3-shape": "*",
- "@types/d3-time": "*",
- "@types/d3-time-format": "*",
- "@types/d3-timer": "*",
- "@types/d3-transition": "*",
- "@types/d3-zoom": "*"
- }
- },
- "node_modules/@types/d3-array": {
- "version": "3.2.1",
- "resolved":
"https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz",
- "integrity":
"sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==",
- "dev": true
- },
- "node_modules/@types/d3-axis": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",
- "integrity":
"sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",
- "dev": true,
- "dependencies": {
- "@types/d3-selection": "*"
- }
- },
- "node_modules/@types/d3-brush": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",
- "integrity":
"sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",
- "dev": true,
- "dependencies": {
- "@types/d3-selection": "*"
- }
- },
- "node_modules/@types/d3-chord": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",
- "integrity":
"sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",
- "dev": true
- },
- "node_modules/@types/d3-color": {
- "version": "3.1.3",
- "resolved":
"https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
- "integrity":
"sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",
- "dev": true
- },
- "node_modules/@types/d3-contour": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",
- "integrity":
"sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",
- "dev": true,
- "dependencies": {
- "@types/d3-array": "*",
- "@types/geojson": "*"
- }
- },
- "node_modules/@types/d3-delaunay": {
- "version": "6.0.4",
- "resolved":
"https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
- "integrity":
"sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",
- "dev": true
- },
- "node_modules/@types/d3-dispatch": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz",
- "integrity":
"sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ==",
- "dev": true
- },
- "node_modules/@types/d3-drag": {
- "version": "3.0.7",
- "resolved":
"https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",
- "integrity":
"sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",
- "dev": true,
- "dependencies": {
- "@types/d3-selection": "*"
- }
- },
- "node_modules/@types/d3-dsv": {
- "version": "3.0.7",
- "resolved":
"https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",
- "integrity":
"sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",
- "dev": true
- },
- "node_modules/@types/d3-ease": {
- "version": "3.0.2",
- "resolved":
"https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",
- "integrity":
"sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",
- "dev": true
- },
- "node_modules/@types/d3-fetch": {
- "version": "3.0.7",
- "resolved":
"https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",
- "integrity":
"sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",
- "dev": true,
- "dependencies": {
- "@types/d3-dsv": "*"
- }
- },
- "node_modules/@types/d3-force": {
- "version": "3.0.10",
- "resolved":
"https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",
- "integrity":
"sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",
- "dev": true
- },
- "node_modules/@types/d3-format": {
- "version": "3.0.4",
- "resolved":
"https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",
- "integrity":
"sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",
- "dev": true
- },
- "node_modules/@types/d3-geo": {
- "version": "3.1.0",
- "resolved":
"https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz",
- "integrity":
"sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==",
- "dev": true,
- "dependencies": {
- "@types/geojson": "*"
- }
- },
- "node_modules/@types/d3-hierarchy": {
- "version": "3.1.7",
- "resolved":
"https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",
- "integrity":
"sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",
- "dev": true
- },
- "node_modules/@types/d3-interpolate": {
- "version": "3.0.4",
- "resolved":
"https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
- "integrity":
"sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",
- "dev": true,
- "dependencies": {
- "@types/d3-color": "*"
- }
- },
- "node_modules/@types/d3-path": {
- "version": "3.1.0",
- "resolved":
"https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz",
- "integrity":
"sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ==",
- "dev": true
- },
- "node_modules/@types/d3-polygon": {
- "version": "3.0.2",
- "resolved":
"https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",
- "integrity":
"sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",
- "dev": true
- },
- "node_modules/@types/d3-quadtree": {
- "version": "3.0.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",
- "integrity":
"sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",
- "dev": true
- },
- "node_modules/@types/d3-random": {
- "version": "3.0.3",
- "resolved":
"https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz",
- "integrity":
"sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==",
- "dev": true
- },
- "node_modules/@types/d3-scale": {
- "version": "4.0.8",
- "resolved":
"https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz",
- "integrity":
"sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==",
- "dev": true,
- "dependencies": {
- "@types/d3-time": "*"
- }
- },
- "node_modules/@types/d3-scale-chromatic": {
- "version": "3.0.3",
- "resolved":
"https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz",
- "integrity":
"sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw==",
- "dev": true
- },
- "node_modules/@types/d3-selection": {
- "version": "3.0.11",
- "resolved":
"https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",
- "integrity":
"sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",
- "dev": true
- },
- "node_modules/@types/d3-shape": {
- "version": "3.1.6",
- "resolved":
"https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.6.tgz",
- "integrity":
"sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==",
- "dev": true,
- "dependencies": {
- "@types/d3-path": "*"
- }
- },
- "node_modules/@types/d3-time": {
- "version": "3.0.3",
- "resolved":
"https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz",
- "integrity":
"sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==",
- "dev": true
- },
- "node_modules/@types/d3-time-format": {
- "version": "4.0.3",
- "resolved":
"https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",
- "integrity":
"sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",
- "dev": true
- },
- "node_modules/@types/d3-timer": {
- "version": "3.0.2",
- "resolved":
"https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",
- "integrity":
"sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",
- "dev": true
- },
- "node_modules/@types/d3-transition": {
- "version": "3.0.9",
- "resolved":
"https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",
- "integrity":
"sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",
- "dev": true,
- "dependencies": {
- "@types/d3-selection": "*"
- }
- },
- "node_modules/@types/d3-zoom": {
- "version": "3.0.8",
- "resolved":
"https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",
- "integrity":
"sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",
- "dev": true,
- "dependencies": {
- "@types/d3-interpolate": "*",
- "@types/d3-selection": "*"
- }
- },
- "node_modules/@types/geojson": {
- "version": "7946.0.14",
- "resolved":
"https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz",
- "integrity":
"sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==",
- "dev": true
- },
"node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity":
"sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "license": "MIT",
"engines": {
"node": ">= 10"
}
@@ -289,6 +32,7 @@
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz",
"integrity":
"sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==",
+ "license": "ISC",
"dependencies": {
"d3-array": "3",
"d3-axis": "3",
@@ -329,6 +73,7 @@
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",
"integrity":
"sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",
+ "license": "ISC",
"dependencies": {
"internmap": "1 - 2"
},
@@ -340,6 +85,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz",
"integrity":
"sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -348,6 +94,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",
"integrity":
"sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",
+ "license": "ISC",
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
@@ -363,6 +110,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz",
"integrity":
"sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",
+ "license": "ISC",
"dependencies": {
"d3-path": "1 - 3"
},
@@ -374,6 +122,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
"integrity":
"sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -382,6 +131,7 @@
"version": "4.0.2",
"resolved":
"https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz",
"integrity":
"sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",
+ "license": "ISC",
"dependencies": {
"d3-array": "^3.2.0"
},
@@ -393,6 +143,7 @@
"version": "6.0.4",
"resolved":
"https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
"integrity":
"sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",
+ "license": "ISC",
"dependencies": {
"delaunator": "5"
},
@@ -404,6 +155,7 @@
"version": "3.0.1",
"resolved":
"https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz",
"integrity":
"sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -412,6 +164,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz",
"integrity":
"sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",
+ "license": "ISC",
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-selection": "3"
@@ -424,6 +177,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz",
"integrity":
"sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",
+ "license": "ISC",
"dependencies": {
"commander": "7",
"iconv-lite": "0.6",
@@ -448,6 +202,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",
"integrity":
"sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
+ "license": "BSD-3-Clause",
"engines": {
"node": ">=12"
}
@@ -456,6 +211,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz",
"integrity":
"sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",
+ "license": "ISC",
"dependencies": {
"d3-dsv": "1 - 3"
},
@@ -467,6 +223,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",
"integrity":
"sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",
+ "license": "ISC",
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-quadtree": "1 - 3",
@@ -480,6 +237,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz",
"integrity":
"sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -488,6 +246,7 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",
"integrity":
"sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",
+ "license": "ISC",
"dependencies": {
"d3-array": "2.5.0 - 3"
},
@@ -499,6 +258,7 @@
"version": "3.1.2",
"resolved":
"https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",
"integrity":
"sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -507,6 +267,7 @@
"version": "3.0.1",
"resolved":
"https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
"integrity":
"sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
+ "license": "ISC",
"dependencies": {
"d3-color": "1 - 3"
},
@@ -518,6 +279,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",
"integrity":
"sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -526,6 +288,7 @@
"version": "3.0.1",
"resolved":
"https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz",
"integrity":
"sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -534,6 +297,7 @@
"version": "3.0.1",
"resolved":
"https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",
"integrity":
"sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -542,6 +306,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz",
"integrity":
"sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -550,6 +315,7 @@
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",
"integrity":
"sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",
+ "license": "ISC",
"dependencies": {
"d3-array": "2.10.0 - 3",
"d3-format": "1 - 3",
@@ -565,6 +331,7 @@
"version": "3.1.0",
"resolved":
"https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",
"integrity":
"sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",
+ "license": "ISC",
"dependencies": {
"d3-color": "1 - 3",
"d3-interpolate": "1 - 3"
@@ -577,6 +344,7 @@
"version": "3.0.0",
"resolved":
"https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity":
"sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -585,6 +353,7 @@
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",
"integrity":
"sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",
+ "license": "ISC",
"dependencies": {
"d3-path": "^3.1.0"
},
@@ -596,6 +365,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",
"integrity":
"sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",
+ "license": "ISC",
"dependencies": {
"d3-array": "2 - 3"
},
@@ -607,6 +377,7 @@
"version": "4.1.0",
"resolved":
"https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",
"integrity":
"sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",
+ "license": "ISC",
"dependencies": {
"d3-time": "1 - 3"
},
@@ -618,6 +389,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",
"integrity":
"sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -626,6 +398,7 @@
"version": "3.0.1",
"resolved":
"https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz",
"integrity":
"sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",
+ "license": "ISC",
"dependencies": {
"d3-color": "1 - 3",
"d3-dispatch": "1 - 3",
@@ -644,6 +417,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz",
"integrity":
"sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",
+ "license": "ISC",
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
@@ -659,23 +433,27 @@
"version": "5.0.1",
"resolved":
"https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz",
"integrity":
"sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==",
+ "license": "ISC",
"dependencies": {
"robust-predicates": "^3.0.2"
}
},
"node_modules/echarts": {
- "version": "5.5.1",
- "resolved":
"git+ssh://[email protected]/apache/echarts.git#817ef5cffdfda777e5b5383596f0dd7e6ed5755b",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/echarts/-/echarts-6.0.0.tgz",
+ "integrity":
"sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "2.3.0",
- "zrender": "5.6.0"
+ "zrender": "6.0.0"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved":
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity":
"sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
@@ -687,6 +465,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",
"integrity":
"sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
@@ -694,28 +473,34 @@
"node_modules/robust-predicates": {
"version": "3.0.2",
"resolved":
"https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",
- "integrity":
"sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg=="
+ "integrity":
"sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==",
+ "license": "Unlicense"
},
"node_modules/rw": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
- "integrity":
"sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="
+ "integrity":
"sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
+ "license": "BSD-3-Clause"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved":
"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity":
"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ "integrity":
"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
},
"node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
- "integrity":
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+ "integrity":
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
+ "dev": true,
+ "license": "0BSD"
},
"node_modules/typescript": {
- "version": "5.6.3",
- "resolved":
"https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
- "integrity":
"sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
+ "version": "5.9.2",
+ "resolved":
"https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
+ "integrity":
"sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
"dev": true,
+ "license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -725,9 +510,11 @@
}
},
"node_modules/zrender": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.6.0.tgz",
- "integrity":
"sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/zrender/-/zrender-6.0.0.tgz",
+ "integrity":
"sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg==",
+ "dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
"tslib": "2.3.0"
}
diff --git a/custom-series/contour/package.json
b/custom-series/contour/package.json
index 90adf89..c7217c8 100644
--- a/custom-series/contour/package.json
+++ b/custom-series/contour/package.json
@@ -1,28 +1,51 @@
{
- "name": "@echarts/custom-contour",
- "version": "0.0.1-beta.1",
+ "name": "@echarts-x/custom-contour",
+ "version": "1.0.0",
"description": "Custom contour series for Apache ECharts",
"main": "dist/index.js",
- "scripts": {
- "build": "tsc"
+ "module": "dist/index.esm.mjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.esm.mjs",
+ "require": "./dist/index.js"
+ }
},
- "keywords": [],
+ "types": "dist/index.d.ts",
+ "keywords": [
+ "echarts",
+ "apache-echarts",
+ "data-visualization",
+ "chart",
+ "dataviz"
+ ],
"author": "",
"license": "Apache-2.0",
- "dependencies": {
- "d3": "^7.9.0",
- "d3-contour": "^4.0.2",
- "echarts": "github:apache/echarts#v6"
+ "homepage":
"https://github.com/apache/echarts-custom-series/tree/main/custom-series/violin",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/apache/echarts-custom-series.git"
+ },
+ "scripts": {
+ "test:browser": "npx http-server . -p 8088 -o examples/index.html",
+ "test:ssr": "node examples/ssr.js",
+ "test": "npm run test:ssr"
},
"devDependencies": {
- "@types/d3": "^7.4.3",
+ "echarts": "^6.0.0",
"typescript": "^5.5.4"
},
+ "peerDependencies": {
+ "echarts": "^6.0.0"
+ },
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
+ },
+ "dependencies": {
+ "d3": "^7.9.0"
}
}
diff --git a/custom-series/contour/rollup.config.js
b/custom-series/contour/rollup.config.js
index 6243e9a..53e574a 100644
--- a/custom-series/contour/rollup.config.js
+++ b/custom-series/contour/rollup.config.js
@@ -1,38 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Contour specific rollup configuration
module.exports = {
- input: 'lib/index.js',
+ external: ['d3'],
output: {
- file: 'dist/index.js',
- format: 'umd',
- name: 'contourCustomSeriesInstaller',
- extend: true,
globals: {
- window: 'window',
+ d3: 'd3',
},
},
- plugins: [
- {
- name: 'add-license',
- renderChunk(code) {
- return `/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-${code}`;
- },
- },
- ],
};
diff --git a/custom-series/contour/screenshots/contour.svg
b/custom-series/contour/screenshots/contour.svg
new file mode 100644
index 0000000..5a12a08
--- /dev/null
+++ b/custom-series/contour/screenshots/contour.svg
@@ -0,0 +1,110 @@
+<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full"
viewBox="0 0 600 400">
+<rect width="600" height="400" x="0" y="0" fill="none"></rect>
+<path d="M90 320.5L540 320.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 288.5L540 288.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 256.5L540 256.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 224.5L540 224.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 192.5L540 192.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 160.5L540 160.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 129.5L540 129.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 97.5L540 97.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90 65.5L540 65.5" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M90.5 65L90.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M146.5 65L146.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M202.5 65L202.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M259.5 65L259.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M315.5 65L315.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M371.5 65L371.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M427.5 65L427.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M484.5 65L484.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M540.5 65L540.5 320" fill="none" pointer-events="visible"
stroke="#dbdee4" class="zr0-cls-0"></path>
+<path d="M371.5 320L371.5 65" fill="none" pointer-events="visible"
stroke="#54555a" stroke-linecap="round" class="zr0-cls-0"></path>
+<path d="M90 160.5L540 160.5" fill="none" pointer-events="visible"
stroke="#54555a" stroke-linecap="round" class="zr0-cls-0"></path>
+<path d="M371.3 320.5L366.3 320.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 288.5L366.3 288.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 256.5L366.3 256.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 224.5L366.3 224.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 192.5L366.3 192.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 160.5L366.3 160.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 129.5L366.3 129.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 97.5L366.3 97.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.3 65.5L366.3 65.5" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M90.5 160.6L90.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M146.5 160.6L146.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M202.5 160.6L202.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M259.5 160.6L259.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M315.5 160.6L315.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M371.5 160.6L371.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M427.5 160.6L427.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M484.5 160.6L484.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<path d="M540.5 160.6L540.5 165.6" fill="none" pointer-events="visible"
stroke="#54555a" class="zr0-cls-0"></path>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 320)"
fill="#54555a">-150</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82
288.125)" fill="#54555a">-120</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 256.25)"
fill="#54555a">-90</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82
224.375)" fill="#54555a">-60</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 192.5)"
fill="#54555a">-30</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82
160.625)" fill="#54555a">0</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 128.75)"
fill="#54555a">30</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 96.875)"
fill="#54555a">60</text>
+<text dominant-baseline="central" text-anchor="end"
style="font-size:12px;font-family:sans-serif;" transform="translate(82 65)"
fill="#54555a">90</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6" transform="translate(90
328)" fill="#54555a">-150</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6"
transform="translate(146.25 328)" fill="#54555a">-120</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6" transform="translate(202.5
328)" fill="#54555a">-90</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6"
transform="translate(258.75 328)" fill="#54555a">-60</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6" transform="translate(315
328)" fill="#54555a">-30</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6"
transform="translate(371.25 328)" fill="#54555a">0</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6" transform="translate(427.5
328)" fill="#54555a">30</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6"
transform="translate(483.75 328)" fill="#54555a">60</text>
+<text dominant-baseline="central" text-anchor="middle"
style="font-size:12px;font-family:sans-serif;" y="6" transform="translate(540
328)" fill="#54555a">90</text>
+<path d="M290.7 269.5L293.5 268.9L297.5 267.8L301.5 266.5L304.3 265.5L305.5
265.1L309.5 263.6L313.5 261.9L314.3 261.5L317.5 260L321.5 257.9L322.1
257.5L325.5 255.5L328.8 253.5L329.5 253L333.5 250.5L335 249.5L337.5 247.8L341
245.5L341.5 245.2L345.5 242.6L347.1 241.5L349.5 240L353.3 237.5L353.5
237.4L357.5 234.8L359.4 233.5L361.5 232.1L365.2 229.5L365.5 229.3L369.5
226.4L370.7 225.5L373.5 223.4L375.9 221.5L377.5 220.2L380.9 217.5L381.5
217L385.5 213.8L385.9 213.5L389.5 210.6L390.8 209.5L39 [...]
+<path d="M290.7 269.5L293.5 268.9L297.5 267.8L301.5 266.5L304.3 265.5L305.5
265.1L309.5 263.6L313.5 261.9L314.3 261.5L317.5 260L321.5 257.9L322.1
257.5L325.5 255.5L328.8 253.5L329.5 253L333.5 250.5L335 249.5L337.5 247.8L341
245.5L341.5 245.2L345.5 242.6L347.1 241.5L349.5 240L353.3 237.5L353.5
237.4L357.5 234.8L359.4 233.5L361.5 232.1L365.2 229.5L365.5 229.3L369.5
226.4L370.7 225.5L373.5 223.4L375.9 221.5L377.5 220.2L380.9 217.5L381.5
217L385.5 213.8L385.9 213.5L389.5 210.6L390.8 209.5L39 [...]
+<path d="M286.7 245.5L289.5 245L293.5 244.1L297.5 243L301.5 241.6L301.9
241.5L305.5 240.1L309.5 238.4L311.5 237.5L313.5 236.6L317.5 234.5L319.2
233.5L321.5 232.1L325.5 229.6L325.6 229.5L329.5 226.9L331.6 225.5L333.5
224.2L337.3 221.5L337.5 221.4L341.5 218.5L342.9 217.5L345.5 215.5L348.1
213.5L349.5 212.4L353 209.5L353.5 209.1L357.5 205.6L357.7 205.5L361.5 202L362.1
201.5L365.5 198.2L366.3 197.5L369.5 194.3L370.3 193.5L373.5 190.4L374.5
189.5L377.5 186.7L378.9 185.5L381.5 183.3L383.7 181. [...]
+<path d="M286.7 245.5L289.5 245L293.5 244.1L297.5 243L301.5 241.6L301.9
241.5L305.5 240.1L309.5 238.4L311.5 237.5L313.5 236.6L317.5 234.5L319.2
233.5L321.5 232.1L325.5 229.6L325.6 229.5L329.5 226.9L331.6 225.5L333.5
224.2L337.3 221.5L337.5 221.4L341.5 218.5L342.9 217.5L345.5 215.5L348.1
213.5L349.5 212.4L353 209.5L353.5 209.1L357.5 205.6L357.7 205.5L361.5 202L362.1
201.5L365.5 198.2L366.3 197.5L369.5 194.3L370.3 193.5L373.5 190.4L374.5
189.5L377.5 186.7L378.9 185.5L381.5 183.3L383.7 181. [...]
+<path d="M309.3 213.5L309.5 213.4L313.5 211.7L317.5 209.7L317.8 209.5L321.5
207.2L323.9 205.5L325.5 204.3L329 201.5L329.5 201.1L333.5 197.5L333.5
197.5L337.5 193.7L337.7 193.5L341.5 189.8L341.8 189.5L345.5 185.8L345.8
185.5L349.5 182L350 181.5L353.5 178.2L354.3 177.5L357.5 174.6L358.7 173.5L361.5
171.1L363.3 169.5L365.5 167.6L368.1 165.5L369.5 164.4L373.1 161.5L373.5
161.2L377.5 158.3L378.7 157.5L381.5 155.6L384.7 153.5L385.5 153L389.5
150.4L390.9 149.5L393.5 147.8L396.9 145.5L397.5 145L [...]
+<path d="M309.3 213.5L309.5 213.4L313.5 211.7L317.5 209.7L317.8 209.5L321.5
207.2L323.9 205.5L325.5 204.3L329 201.5L329.5 201.1L333.5 197.5L333.5
197.5L337.5 193.7L337.7 193.5L341.5 189.8L341.8 189.5L345.5 185.8L345.8
185.5L349.5 182L350 181.5L353.5 178.2L354.3 177.5L357.5 174.6L358.7 173.5L361.5
171.1L363.3 169.5L365.5 167.6L368.1 165.5L369.5 164.4L373.1 161.5L373.5
161.2L377.5 158.3L378.7 157.5L381.5 155.6L384.7 153.5L385.5 153L389.5
150.4L390.9 149.5L393.5 147.8L396.9 145.5L397.5 145L [...]
+<path d="M306.1 181.5L309.5 180.9L313.5 179.6L317.5 177.9L318.2 177.5L321.5
175.8L325.2 173.5L325.5 173.3L329.5 170.6L331 169.5L333.5 167.7L336.3
165.5L337.5 164.6L341.4 161.5L341.5 161.4L345.5 158.3L346.6 157.5L349.5
155.3L352 153.5L353.5 152.4L357.5 149.6L357.6 149.5L361.5 146.8L363.3
145.5L365.5 143.9L368.7 141.5L369.5 140.9L373.5 137.9L374 137.5L377.5
134.7L378.9 133.5L381.5 131.2L383.3 129.5L385.5 127L386.8 125.5L389.5
121.6L389.6 121.5L391.5 117.5L392.6 113.5L393 109.5L392.8 105.5L [...]
+<path d="M306.1 181.5L309.5 180.9L313.5 179.6L317.5 177.9L318.2 177.5L321.5
175.8L325.2 173.5L325.5 173.3L329.5 170.6L331 169.5L333.5 167.7L336.3
165.5L337.5 164.6L341.4 161.5L341.5 161.4L345.5 158.3L346.6 157.5L349.5
155.3L352 153.5L353.5 152.4L357.5 149.6L357.6 149.5L361.5 146.8L363.3
145.5L365.5 143.9L368.7 141.5L369.5 140.9L373.5 137.9L374 137.5L377.5
134.7L378.9 133.5L381.5 131.2L383.3 129.5L385.5 127L386.8 125.5L389.5
121.6L389.6 121.5L391.5 117.5L392.6 113.5L393 109.5L392.8 105.5L [...]
+<path d="M320.1 153.5L321.5 153L325.5 151.3L329.1 149.5L329.5 149.3L333.5
147.1L336.2 145.5L337.5 144.7L341.5 142.2L342.5 141.5L345.5 139.5L348.4
137.5L349.5 136.7L353.5 133.8L353.8 133.5L357.5 130.5L358.7 129.5L361.5
126.9L363 125.5L365.5 122.7L366.6 121.5L369.4 117.5L369.5 117.4L371.6
113.5L373.1 109.5L373.5 107.4L373.9 105.5L374 101.5L373.7 97.5L373.5 96.7L372.8
93.5L371.5 89.5L369.7 85.5L369.5 85.1L367.6 81.5L365.5 78.2L365.1 77.5L362.3
73.5L361.5 72.4L359.3 69.5L357.5 67.4L356 65.5L [...]
+<path d="M320.1 153.5L321.5 153L325.5 151.3L329.1 149.5L329.5 149.3L333.5
147.1L336.2 145.5L337.5 144.7L341.5 142.2L342.5 141.5L345.5 139.5L348.4
137.5L349.5 136.7L353.5 133.8L353.8 133.5L357.5 130.5L358.7 129.5L361.5
126.9L363 125.5L365.5 122.7L366.6 121.5L369.4 117.5L369.5 117.4L371.6
113.5L373.1 109.5L373.5 107.4L373.9 105.5L374 101.5L373.7 97.5L373.5 96.7L372.8
93.5L371.5 89.5L369.7 85.5L369.5 85.1L367.6 81.5L365.5 78.2L365.1 77.5L362.3
73.5L361.5 72.4L359.3 69.5L357.5 67.4L356 65.5L [...]
+<path d="M321 137.5L321.5 137.3L325.5 135.8L329.5 134L330.5 133.5L333.5
131.9L337.4 129.5L337.5 129.4L341.5 126.6L343 125.5L345.5 123.4L347.6
121.5L349.5 119.6L351.4 117.5L353.5 114.7L354.4 113.5L356.6 109.5L357.5
107.2L358.1 105.5L359 101.5L359.3 97.5L359 93.5L358.2 89.5L357.5 87.3L356.9
85.5L355.2 81.5L353.5 78.4L353 77.5L350.5 73.5L349.5 72.1L347.6 69.5L345.5
66.9L344.3 65.5L341.5 62.5L340.6 61.5L337.5 58.5L336.4 57.5L333.5 55L331.7
53.5L329.5 51.8L326.4 49.5L325.5 48.8L321.5 46.2L320 [...]
+<path d="M321 137.5L321.5 137.3L325.5 135.8L329.5 134L330.5 133.5L333.5
131.9L337.4 129.5L337.5 129.4L341.5 126.6L343 125.5L345.5 123.4L347.6
121.5L349.5 119.6L351.4 117.5L353.5 114.7L354.4 113.5L356.6 109.5L357.5
107.2L358.1 105.5L359 101.5L359.3 97.5L359 93.5L358.2 89.5L357.5 87.3L356.9
85.5L355.2 81.5L353.5 78.4L353 77.5L350.5 73.5L349.5 72.1L347.6 69.5L345.5
66.9L344.3 65.5L341.5 62.5L340.6 61.5L337.5 58.5L336.4 57.5L333.5 55L331.7
53.5L329.5 51.8L326.4 49.5L325.5 48.8L321.5 46.2L320 [...]
+<path d="M315.4 125.5L317.5 125L321.5 123.7L325.5 122.1L326.6 121.5L329.5
119.9L333.1 117.5L333.5 117.2L337.5 113.6L337.6 113.5L341 109.5L341.5
108.7L343.4 105.5L345 101.5L345.5 99.4L345.9 97.5L346.1 93.5L345.7 89.5L345.5
88.5L344.7 85.5L343.2 81.5L341.5 78.1L341.2 77.5L338.6 73.5L337.5 72L335.5
69.5L333.5 67.2L331.8 65.5L329.5 63.3L327.5 61.5L325.5 59.8L322.4 57.5L321.5
56.8L317.5 54.3L316 53.5L313.5 52.2L309.5 50.5L306.5 49.5L305.5 49.2L301.5
48.3L297.5 48L293.5 48.1L289.5 48.9L287.8 4 [...]
+<path d="M315.4 125.5L317.5 125L321.5 123.7L325.5 122.1L326.6 121.5L329.5
119.9L333.1 117.5L333.5 117.2L337.5 113.6L337.6 113.5L341 109.5L341.5
108.7L343.4 105.5L345 101.5L345.5 99.4L345.9 97.5L346.1 93.5L345.7 89.5L345.5
88.5L344.7 85.5L343.2 81.5L341.5 78.1L341.2 77.5L338.6 73.5L337.5 72L335.5
69.5L333.5 67.2L331.8 65.5L329.5 63.3L327.5 61.5L325.5 59.8L322.4 57.5L321.5
56.8L317.5 54.3L316 53.5L313.5 52.2L309.5 50.5L306.5 49.5L305.5 49.2L301.5
48.3L297.5 48L293.5 48.1L289.5 48.9L287.8 4 [...]
+<path d="M319.2 109.5L321.5 108.3L325.3 105.5L325.5 105.3L328.7 101.5L329.5
100.2L330.8 97.5L331.8 93.5L331.8 89.5L331.1 85.5L329.6 81.5L329.5 81.3L327.3
77.5L325.5 75L324.2 73.5L321.5 70.7L320.2 69.5L317.5 67.4L314.6 65.5L313.5
64.8L309.5 63L305.5 61.8L303.6 61.5L301.5 61.2L297.5 61.3L296.6 61.5L293.5
62.3L289.5 64.4L288 65.5L285.5 68L284.3 69.5L282 73.5L281.5 74.8L280.6
77.5L279.8 81.5L279.5 85.5L279.9 89.5L280.8 93.5L281.5 95.4L282.4 97.5L284.7
101.5L285.5 102.5L288.2 105.5L289.5 106. [...]
+<path d="M319.2 109.5L321.5 108.3L325.3 105.5L325.5 105.3L328.7 101.5L329.5
100.2L330.8 97.5L331.8 93.5L331.8 89.5L331.1 85.5L329.6 81.5L329.5 81.3L327.3
77.5L325.5 75L324.2 73.5L321.5 70.7L320.2 69.5L317.5 67.4L314.6 65.5L313.5
64.8L309.5 63L305.5 61.8L303.6 61.5L301.5 61.2L297.5 61.3L296.6 61.5L293.5
62.3L289.5 64.4L288 65.5L285.5 68L284.3 69.5L282 73.5L281.5 74.8L280.6
77.5L279.8 81.5L279.5 85.5L279.9 89.5L280.8 93.5L281.5 95.4L282.4 97.5L284.7
101.5L285.5 102.5L288.2 105.5L289.5 106. [...]
+<style ><![CDATA[
+.zr0-cls-0:hover {
+pointer-events:none;
+}
+.zr0-cls-1:hover {
+cursor:pointer;
+fill:rgba(92,123,217,1);
+}
+.zr0-cls-2:hover {
+cursor:pointer;
+}
+.zr0-cls-3:hover {
+cursor:pointer;
+fill:rgba(192,223,119,1);
+}
+.zr0-cls-4:hover {
+cursor:pointer;
+fill:rgba(242,221,105,1);
+}
+.zr0-cls-5:hover {
+cursor:pointer;
+fill:rgba(255,204,99,1);
+}
+.zr0-cls-6:hover {
+cursor:pointer;
+fill:rgba(255,158,105,1);
+}
+.zr0-cls-7:hover {
+cursor:pointer;
+fill:rgba(255,112,112,1);
+}
+
+]]>
+
+</style>
+</svg>
\ No newline at end of file
diff --git a/custom-series/contour/src/index.ts
b/custom-series/contour/src/index.ts
index d8704eb..ec701bc 100644
--- a/custom-series/contour/src/index.ts
+++ b/custom-series/contour/src/index.ts
@@ -17,14 +17,19 @@
* under the License.
*/
-import echarts, { zrUtil } from 'echarts';
import type {
CustomRootElementOption,
- CustomElementOption,
CustomSeriesRenderItem,
+ CustomElementOption,
+ CustomSeriesRenderItemParams,
+ CustomSeriesRenderItemAPI,
} from 'echarts/types/src/chart/custom/CustomSeries.d.ts';
-import type { EChartsExtensionInstallRegisters } from
'echarts/src/extension.ts';
-declare var d3: any;
+import type {
+ EChartsExtensionInstallRegisters,
+ EChartsExtension,
+} from 'echarts/types/src/extension.d.ts';
+import { zrUtil } from 'echarts';
+import * as d3 from 'd3';
type ContourItemPayload = {
thresholds?: number;
@@ -60,8 +65,8 @@ const blendColors = (colors: string[], dataLength: number,
index: number) => {
};
const renderItem = (
- params: echarts.CustomSeriesRenderItemParams,
- api: echarts.CustomSeriesRenderItemAPI
+ params: CustomSeriesRenderItemParams,
+ api: CustomSeriesRenderItemAPI
) => {
const cnt = params.dataInsideLength;
if (params.dataIndex === cnt - 1) {
@@ -180,4 +185,4 @@ export default {
renderItem as unknown as CustomSeriesRenderItem
);
},
-};
+} as EChartsExtension;
diff --git a/custom-series/contour/test/index.html
b/custom-series/contour/test/index.html
deleted file mode 100644
index ae2ea6b..0000000
--- a/custom-series/contour/test/index.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Apache ECharts Custom Series Test</title>
-</head>
-
-<body>
- <div id="main" style="width: 1000px;height:400px;border:1px solid
#ccc"></div>
-
- <script src="../node_modules/echarts/dist/echarts.js"></script>
- <script src="../node_modules/d3/dist/d3.js"></script>
- <script src="../node_modules/d3-contour/dist/d3-contour.js"></script>
-
- <script src="../dist/index.js"></script>
- <script>
- echarts.use(window.contourCustomSeriesInstaller);
- const chart = echarts.init(document.getElementById('main'));
-
- const data = [];
- const cnt = 300;
- for (let i = 0; i < cnt; i++) {
- data.push([
- (Math.sin(i / cnt * Math.PI * 2) + Math.random() * 0.2 - 0.4)
* 100 * Math.random(),
- (Math.cos(i / cnt * Math.PI * 2) + Math.random() * 0.2 - 0.4)
* 100 * Math.random(),
- Math.random() * 10000
- ]);
- }
-
- option = {
- xAxis: {},
- yAxis: {},
- series: [{
- type: 'custom',
- renderItem: 'contour',
- data,
- itemPayload: {
- itemStyle: {
- color: ['#5470c6', '#91cc75', '#fac858', '#ee6666']
- },
- lineStyle: {
- opacity: 0.5
- },
- bandwidth: 30
- },
- encode: {
- x: 0,
- y: 1,
- tooltip: 2
- },
- name: 'data'
- // }, {
- // type: 'scatter',
- // data,
- // name: 'data'
- }],
- visualMap: {
- seriesIndex: 1,
- min: 0,
- max: 10000,
- inRange: {
- symbolSize: [3, 5]
- },
- show: false
- }
- };
-
- chart.setOption(option);
- </script>
-</body>
-
-</html>
\ No newline at end of file
diff --git a/custom-series/violin/src/index.ts
b/custom-series/violin/src/index.ts
index 4c7ff7b..c6d71a7 100644
--- a/custom-series/violin/src/index.ts
+++ b/custom-series/violin/src/index.ts
@@ -17,11 +17,12 @@
* under the License.
*/
-import * as echarts from 'echarts';
import type {
CustomPathOption,
CustomRootElementOption,
CustomSeriesRenderItem,
+ CustomSeriesRenderItemParams,
+ CustomSeriesRenderItemAPI,
} from 'echarts/types/src/chart/custom/CustomSeries.d.ts';
import type {
EChartsExtensionInstallRegisters,
@@ -47,8 +48,8 @@ function kernelDensityEstimator(
}
const renderItem = (
- params: echarts.CustomSeriesRenderItemParams,
- api: echarts.CustomSeriesRenderItemAPI
+ params: CustomSeriesRenderItemParams,
+ api: CustomSeriesRenderItemAPI
) => {
let violins: { [key: number]: { firstDataIndex: number; data: number[] } } =
{};
diff --git a/scripts/generate.js b/scripts/generate.js
index b33ed65..1920664 100644
--- a/scripts/generate.js
+++ b/scripts/generate.js
@@ -52,7 +52,7 @@ function create(name) {
const packageJsonPath = path.join(seriesPath, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
- packageJson.name = `@echarts/custom-${kebabCaseName}`;
+ // packageJson.name = `@echarts-x/custom-${kebabCaseName}`;
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
// Run `npm install`
diff --git a/scripts/rollup.config.js b/scripts/rollup.config.js
index 0aaf27b..bcdb799 100644
--- a/scripts/rollup.config.js
+++ b/scripts/rollup.config.js
@@ -18,10 +18,18 @@
*/
const path = require('path');
+const fs = require('fs');
const seriesName = process.env.CUSTOM_SERIES_NAME || 'customSeries';
const seriesPath = process.env.CUSTOM_SERIES_PATH || '.';
+// Check if series has its own rollup config
+let seriesRollupConfig = {};
+const seriesConfigPath = path.join(seriesPath, 'rollup.config.js');
+if (fs.existsSync(seriesConfigPath)) {
+ seriesRollupConfig = require(seriesConfigPath);
+}
+
const licenseHeader = `/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -46,8 +54,34 @@ const licenseHeader = `/*
const baseConfig = {
input: path.join(seriesPath, 'lib/index.js'),
plugins: [],
+ external: seriesRollupConfig.external || [],
};
+// Helper function to get all external dependencies for UMD
+function getUMDExternals() {
+ const allExternals = [...(baseConfig.external || []), 'echarts'];
+ return allExternals;
+}
+
+// Helper function to get all globals for UMD
+function getUMDGlobals() {
+ const allExternals = getUMDExternals();
+ const globals = {};
+
+ // Map each external to its global variable name
+ allExternals.forEach((ext) => {
+ // Default: use the same name as the package name
+ globals[ext] = ext;
+ });
+
+ // Override with series-specific globals from config if provided
+ if (seriesRollupConfig.output && seriesRollupConfig.output.globals) {
+ Object.assign(globals, seriesRollupConfig.output.globals);
+ }
+
+ return globals;
+}
+
const autoRegisterFooter = `
// Automatically register the custom series
if (typeof window !== 'undefined' && window.echarts) {
@@ -102,14 +136,13 @@ module.exports = [
// UMD version
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.js'),
format: 'umd',
name: `${seriesName}CustomSeriesInstaller`,
extend: true,
- globals: {
- window: 'window',
- },
+ globals: getUMDGlobals(),
},
plugins: [licensePlugin],
},
@@ -117,30 +150,28 @@ module.exports = [
// UMD minified version
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.min.js'),
format: 'umd',
name: `${seriesName}CustomSeriesInstaller`,
extend: true,
- globals: {
- window: 'window',
- },
+ globals: getUMDGlobals(),
sourcemap: true,
},
plugins: [licensePlugin, terserPlugin],
},
- // Browser version - automatically registers
+ // Browser version - automatically registers (IIFE with all dependencies)
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.auto.js'),
format: 'iife',
name: `${seriesName}CustomSeriesInstaller`,
extend: true,
- globals: {
- window: 'window',
- },
+ globals: getUMDGlobals(),
},
plugins: [autoRegisterPlugin],
},
@@ -148,14 +179,13 @@ module.exports = [
// Browser minified version - automatically registers
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.auto.min.js'),
format: 'iife',
name: `${seriesName}CustomSeriesInstaller`,
extend: true,
- globals: {
- window: 'window',
- },
+ globals: getUMDGlobals(),
sourcemap: true,
},
plugins: [autoRegisterPlugin, terserPlugin],
@@ -164,6 +194,7 @@ module.exports = [
// ES Module version
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.esm.mjs'),
format: 'esm',
@@ -174,6 +205,7 @@ module.exports = [
// ES Module minified version
{
...baseConfig,
+ external: getUMDExternals(),
output: {
file: path.join(seriesPath, 'dist/index.esm.min.mjs'),
format: 'esm',
diff --git a/scripts/template/README.md b/scripts/template/README.md
index 440ea00..88650f9 100644
--- a/scripts/template/README.md
+++ b/scripts/template/README.md
@@ -2,7 +2,7 @@
`$CUSTOM_SERIES_NAME$` is a custom series for [Apache
ECharts](https://github.com/apache/echarts). It's typically used to ...
-
+
[Source
Code](https://github.com/apache/echarts-custom-series/tree/main/custom-series/$CUSTOM_SERIES_NAME$)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]