apache / apache/echarts

If the histogram data is 0, the view will occupy a place柱状图数据为0视图会占位

Open
#20,633 2 comments 0 reactions 0 assignees View on GitHub
new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

![longshot20241231165134](https://github.com/user-attachments/assets/efda86f5-77c6-4ee6-ae44-49e7e1047a80)

{
"label": {
"show": true
},
"tooltip": {
"trigger": "axis",
"axisPointer": {
"type": "shadow"
}
},
"legend": {
"data": [
"微博-近30天阅读量",
"抖音-近30天新增作品数"
],
"top": 10,
"type": "scroll",
"width": "80%"
},
"grid": {
"left": "3%",
"right": "4%",
"bottom": "3%",
"containLabel": true,
"top": "60"
},
"xAxis": {
"type": "category",
"data": [
"周深",
"周杰伦"
],
"axisLabel": {
"interval": 0,
"rotate": 30
}
},
"yAxis": {
"type": "value",
"axisLabel": {}
},
"series": [
{
"name": "抖音-近30天新增作品数",
"type": "bar",
"data": [
{
"topicName": "#周深",
"topicId": 225,
"platformId": 0,
"dataMap": {
"1": 12,
"6": 22
},
"showName": "抖音-近30天新增作品数",
"key": "周深",
"indicator": "1",
"value": 12
},
{
"topicName": "#周杰伦",
"topicId": 224,
"platformId": 0,
"dataMap": {
"1": 45,
"6": 33
},
"showName": "抖音-近30天新增作品数",
"key": "周杰伦",
"indicator": "1",
"value": 45
}
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
},
{
"name": "抖音-近30天新增作品数",
"type": "bar",
"data": [
{
"topicName": "#周深222",
"topicId": 225,
"platformId": 0,
"dataMap": {
"1": 12,
"6": 69
},
"showName": "抖音-近30天新增作品数",
"key": "周深",
"indicator": "1",
"value": 12
},
0
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
},
{
"name": "抖音-近30天新增作品数",
"type": "bar",
"data": [
{
"topicName": "#周深111",
"topicId": 227,
"platformId": 0,
"dataMap": {
"1": 32,
"6": 44
},
"showName": "抖音-近30天新增作品数",
"key": "周深",
"indicator": "1",
"value": 32
},
0
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
},
{
"name": "微博-近30天阅读量",
"type": "bar",
"data": [
{
"topicName": "周深",
"topicId": 5648,
"platformId": 2,
"dataMap": {
"1": 55,
"6": 66
},
"showName": "微博-近30天阅读量",
"key": "周深",
"indicator": "6",
"value": 66
},
{
"topicName": "周杰伦",
"topicId": 5818,
"platformId": 2,
"dataMap": {
"1": 30,
"6": 65
},
"showName": "微博-近30天阅读量",
"key": "周杰伦",
"indicator": "6",
"value": 65
}
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
},
{
"name": "微博-近30天阅读量",
"type": "bar",
"data": [
{
"topicName": "周深演唱会",
"topicId": 5649,
"platformId": 2,
"dataMap": {
"1": 88,
"6": 77
},
"showName": "微博-近30天阅读量",
"key": "周深",
"indicator": "6",
"value": 77
},
{
"topicName": "周杰伦演唱会",
"topicId": 5819,
"platformId": 2,
"dataMap": {
"1": 0,
"6": 34
},
"showName": "微博-近30天阅读量",
"key": "周杰伦",
"indicator": "6",
"value": 34
}
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
},
{
"name": "微博-近30天阅读量",
"type": "bar",
"data": [
0,
{
"topicName": "周杰伦演唱会11",
"topicId": 5819,
"platformId": 2,
"dataMap": {
"1": 0,
"6": 59
},
"showName": "微博-近30天阅读量",
"key": "周杰伦",
"indicator": "6",
"value": 59
}
],
"itemStyle": {
"borderRadius": [
4,
4,
0,
0
]
}
}
]
}

### What does the proposed API look like?

我希望不占位

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.