apache / apache/echarts-custom-series
[feat] `lineRange` not support `xAxis.type` !== `category`
- Dominant language
- TypeScript
- Stars
- 72
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
实测,`@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"],
},
},
],
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided ECharts example with @echarts-x/custom-line-range and compare category versus non-category xAxis types. Trace the lineRange custom-series entry point and its handling of the dataset encode values; done means the range renders correctly when xAxis.type is not category.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100