You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/30 22:50:18 UTC
[GitHub] [echarts] dirslashls opened a new issue #16776: [Bug] js exception with radar char, grid and tooltip
dirslashls opened a new issue #16776:
URL: https://github.com/apache/echarts/issues/16776
### Version
5.3.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
1. Go to https://echarts.apache.org/examples/en/editor.html?c=radar
2. Add the following to the options
```js
"tooltip": {
"trigger": "item",
"axisPointer": {
"type": "line",
"animation": false
},
"confine": false,
"appendToBody": true,
"extraCssText": "max-height: 400px; overflow-y: scroll;z-index:100"
},
xAxis: [{
data: ['a','c']
}],
yAxis: [{
data: ['b','d']
}],
grid: [{
show: true,
tooltip: {
show: true,
trigger: 'item',
axisPointer: {
type: 'cross'
}
},
}
],
```
The labels of the radar chart disappear and in the console there is the following error
```js
modelHelper.js:323 Uncaught TypeError: Cannot read properties of undefined (reading 'type')
at makeKey (modelHelper.js:323:16)
at modelHelper.js:215:34
at GlobalModel.<anonymous> (Global.js:654:10)
at Array.forEach (<anonymous>)
at each (util.js:205:13)
at GlobalModel.eachSeries (Global.js:651:5)
at collectSeriesInfo (modelHelper.js:205:11)
at collect (modelHelper.js:75:28)
at Object.overallReset (install.js:76:60)
```
### Current Behavior
Exception is being thrown
### Expected Behavior
Exception should not be thrown and the chart should render correctly
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
I have a chart with both radar and grid. I isolated the problem to the above config. There is infact a scatter series associated with the x and y axis and grid.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] jiawulin001 edited a comment on issue #16776: [Bug] js exception with radar char, grid and tooltip
Posted by GitBox <gi...@apache.org>.
jiawulin001 edited a comment on issue #16776:
URL: https://github.com/apache/echarts/issues/16776#issuecomment-1084035244
Hi, as tested, if you move `grid.tooltip.axisPointer` out of tooltip and put it at `grid.axisPointer`, no errors would occur. The reason why the error would occur needs further debug.
<details>
<summary>Code Sample</summary>
```
option = {
title: {
text: 'Basic Radar Chart'
},
legend: {
data: ['Allocated Budget', 'Actual Spending']
},
radar: {
// shape: 'circle',
indicator: [
{ name: 'Sales', max: 6500 },
{ name: 'Administration', max: 16000 },
{ name: 'Information Technology', max: 30000 },
{ name: 'Customer Support', max: 38000 },
{ name: 'Development', max: 52000 },
{ name: 'Marketing', max: 25000 }
]
},
series: [
{
name: 'Budget vs spending',
type: 'radar',
data: [
{
value: [4200, 3000, 20000, 35000, 50000, 18000],
name: 'Allocated Budget'
},
{
value: [5000, 14000, 28000, 26000, 42000, 21000],
name: 'Actual Spending'
}
]
}
],
tooltip: {
show: true,
trigger: "item",
axisPointer: {
"type": "line",
"animation": false
},
"confine": false,
"appendToBody": true,
"extraCssText": "max-height: 400px; overflow-y: scroll;z-index:100"
},
xAxis: [{
data: ['a','c']
}],
yAxis: [{
data: ['b','d']
}],
grid: [{
show: true,
axisPointer: {
type: 'cross'
},
tooltip: {
show: true,
trigger: 'item',
},
}
],
};
```
</details>
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] dirslashls commented on issue #16776: [Bug] js exception with radar char, grid and tooltip
Posted by GitBox <gi...@apache.org>.
dirslashls commented on issue #16776:
URL: https://github.com/apache/echarts/issues/16776#issuecomment-1085012269
https://user-images.githubusercontent.com/2200491/161133370-680bc055-878b-4702-9c08-05cc6b451b76.mov
@jiawulin001 , see the attached video. I am trying to overlay a grid layout for various types of charts and when the user is on a specific chart within the grid, I want the cross axis pointer to show the x and y dimensions that chart is meant for.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] jiawulin001 commented on issue #16776: [Bug] js exception with radar char, grid and tooltip
Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16776:
URL: https://github.com/apache/echarts/issues/16776#issuecomment-1084035244
Hi, as tested, if you move `grid.tooltip.axisPointer` out of tooltip and put it at `grid.axisPointer`, no errors would occur. The reason why the error would occur needs further debug.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] jiawulin001 commented on issue #16776: [Bug] js exception with radar char, grid and tooltip
Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16776:
URL: https://github.com/apache/echarts/issues/16776#issuecomment-1084146449
@dirslashls I am very sorry I made a mistake. You are right, grid.axisPointer does not exist. The problem seems to be that radar chart does not accept 'cross' as the type of axisPointer. If you use other types of axisPointer, error would not occur.
Also I am not sure what effect you are looking for, so if you can provide with some relavant images, I might be able to better help with you.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] dirslashls commented on issue #16776: [Bug] js exception with radar char, grid and tooltip
Posted by GitBox <gi...@apache.org>.
dirslashls commented on issue #16776:
URL: https://github.com/apache/echarts/issues/16776#issuecomment-1084066746
Hi @jiawulin001 , grid.axisPointer is not a valid option as per the docs and I also don't see it having the desired effect.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org