Airkro opened a new issue, #9:
URL: https://github.com/apache/echarts-custom-series/issues/9
实测,`@echarts-x/custom-line-range` 目前只支持 `xAxis.type: category`,改为其他则显示异常。
```js
import * as echarts from "echarts";
import lineRangeCustomSeriesInstaller from "@echarts-x/custom-line-range";
echarts.use(lineRangeCustomSeriesInstaller);
const temperatureData = [
{ time: 0, min: 26.7, max: 32.5, avg: 29.1 },
{ time: 100000000, min: 25.3, max: 32.4, avg: 28.4 },
{ time: 200000000, min: 24.6, max: 32.7, avg: 28.2 },
{ time: 300000000, min: 26.8, max: 35.8, avg: 30.5 },
{ time: 400000000, min: 26.2, max: 33.1, avg: 29.3 },
{ time: 500000000, min: 24.9, max: 31.4, avg: 27.8 },
{ time: 600000000, min: 25.3, max: 32.9, avg: 28.7 },
];
const options = {
dataset: {
source: temperatureData,
},
xAxis: {
type: "category",
},
yAxis: {
type: "value",
},
tooltip: {
trigger: "axis",
},
legend: {
top: 15,
},
series: [
{
type: "line",
name: "Average",
datasetIndex: 0,
smooth: true,
encode: {
x: "time",
y: "avg",
tooltip: "avg",
},
},
{
type: "custom",
name: "Range",
renderItem: "lineRange",
datasetIndex: 0,
itemPayload: {
areaStyle: {},
},
encode: {
x: "time",
y: ["min", "max"],
tooltip: ["min", "max"],
},
},
],
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]