Version
5.5.0
Link to Minimal Reproduction
无
Steps to Reproduce
option = {
"polar": [
{
"radius": [
0,
186.25
]
},
{
"radius": [
216.25,
"80%"
],
"tooltip": {
"trigger": "axis"
}
}
],
"radiusAxis": [
{
"axisLine": {
"show": false
},
"axisTick": {
"show": false
},
"splitLine": {
"show": false
},
},
{
"polarIndex": 1,
"axisLine": {
"show": false
},
"axisTick": {
"show": false
},
"splitLine": {
"show": false
},
"axisLabel": {
"show": false,
}
}
],
"angleAxis": [
{
"type": "category",
"axisLabel": {
"show": false,
},
"axisLine": {
"show": false
},
"splitLine": {
"show": false
}
},
{
"polarIndex": 1,
"type": "category",
"axisLine": {
"show": false
},
"boundaryGap": false,
"splitLine": {
"show": true,
"lineStyle": {
"type": "dotted"
}
},
"startAngle": 88.2,
"triggerEvent": true,
"data": Array.from({
length: 100
},(_,i)=>({
value: i.toString(),
textStyle: {
fontSize: 12,
padding: 0,
fontWeight: "normal",
backgroundColor: "pink",
}
})),
"axisLabel": {
"interval": 0,
verticalAlign: 'middle',
align: 'center'
}
}
],
"tooltip": {
},
"series": [
],
"animation": false
}
Current Behavior
The following configuration items are not working:
- angleAxis.axisLabel.align
- angleAxis.axisLabel.verticalAlign
Expected Behavior
Code links:
- https://github.com/apache/echarts/blob/master/src/component/axis/AngleAxisView.ts#L281
- https://github.com/apache/echarts/blob/master/src/component/axis/AngleAxisView.ts#L282
After checking the source code, I found that these configuration items are hardcoded in the source, making the option configuration ineffective. If these configuration items are needed, how can they be implemented?
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
4条答案
按热度按时间cnjp1d6j1#
I'd like to clearify that when
align
is set to be'right'
, do you expect thelabel 25
to be displayed at the green position? I can't imagine the real-world case when this is necessary. Can you provide a case when setting it to be left or right to be necessary?amrnrhlw2#
I also think this scenario should not occur in real situations. my requirement is to set both
align
andverticalAlign
tocenter
I set
align
andverticalAlign
tocenter
mainly to solve the issue of gaps caused by inconsistent calculation rules for positions in different ranges, like this:If I set them all to
center
&middle
, the gaps will disappear, like this:mwecs4sa3#
If this is the case, maybe it's more important to figure out why the inconsistent happens.
luaexgnf4#
I think the following code is key:
https://github.com/apache/echarts/blob/master/src/component/axis/AngleAxisView.ts#L259
https://github.com/apache/echarts/blob/master/src/component/axis/AngleAxisView.ts#L261
However, if the configuration items work as documented, this issue can be resolved through configuration.