Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

柱状图数据为0视图会占位 #20633

Open
go2fofo opened this issue Dec 31, 2024 · 2 comments
Open

柱状图数据为0视图会占位 #20633

go2fofo opened this issue Dec 31, 2024 · 2 comments
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@go2fofo
Copy link

go2fofo commented Dec 31, 2024

What problem does this feature solve?

longshot20241231165134

{
"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?

我希望不占位

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Dec 31, 2024
Copy link

echarts-bot bot commented Dec 31, 2024

@go2fofo It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

If the histogram data is 0, the view will occupy a place

@go2fofo
Copy link
Author

go2fofo commented Jan 2, 2025

解决了 ,参考https://juejin.cn/post/7455111267360112655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

1 participant