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 2021/12/04 07:18:14 UTC
[GitHub] [echarts] tomatosqq opened a new issue #16170: echarts 树状图点击label标签 和symbol 子节点都会收起来 不能实现分离 点击symbol收起或者展开 点击lable获取节点信息但是不要展开或者收起子节点
tomatosqq opened a new issue #16170:
URL: https://github.com/apache/echarts/issues/16170
### Version
5.2.2
### Link to minimal reproduction
_No response_
### Steps To Reproduce
const data = {
name: "设备一",
children: [
{
name: "设备一",
children: [
{
name: "设备一",
children: [
{ name: "设备一", value: 721 },
{ name: "设备一", value: 4294 },
],
},
{
name: "设备一",
value: 3322,
},
],
},
{
name: "设备一",
children: [
{ name: "设备一", value: 1616 },
{ name: "设备一", value: 1027 },
{
name: "设备一",
children: [
{ name: "设备一", value: 593 },
{ name: "设备一", value: 330 },
{ name: "设备一", value: 287 },
],
},
{ name: "设备一", value: 843 },
],
},
{
name: "设备一",
children: [
{ name: "设备一", value: 2105 },
{ name: "设备一", value: 1316 },
{ name: "设备一", value: 3151 },
{ name: "设备一", id: 9, value: 5833 },
],
},
],
};
let option = {
tooltip: {
trigger: "item",
triggerOn: "mousemove",
},
series: [
{
type: "tree",
id: 0,
name: "tree1",
data: [data],
top: "10%",
left: "8%",
bottom: "22%",
right: "20%",
symbolSize: 10,
edgeShape: "curve",
edgeForkPosition: "63%",
initialTreeDepth: 3,
selectedMode: false,
lineStyle: {
width: 2,
color: "#000",
},
itemStyle: {
color: "blue",
},
label: {
backgroundColor: "#fff",
borderWidth: 1,
borderColor: "green",
borderRadius: 2,
padding: [3, 5],
color: "green",
position: "right",
verticalAlign: "middle",
align: "left",
fontSize: 14,
},
leaves: {
label: {
position: "right",
verticalAlign: "middle",
align: "left",
},
},
emphasis: {
focus: "series",
},
expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750,
},
],
};
this.dom = echarts.init(this.$refs.dom, "tdTheme");
this.dom.setOption(option);
this.dom.on(
"click",
function (param) {
console.log(param);
if (!param.event.target.culling) {
console.log("点文字");
} else {
console.log("icon");
}
},
false
);
### Current Behavior
点击树状图的symbol和label效果相同 无法达到分离
### Expected Behavior
希望点击label能获取节点信息但是不要收起或者展开子节点 点击symbol可以收起或展开子节点
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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] Ovilia commented on issue #16170: [Feature] tree series nodeClick support clicking
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #16170:
URL: https://github.com/apache/echarts/issues/16170#issuecomment-993124104
Duplicate of #16169. Please update your issue rather than open a new one next time. Thanks!
--
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] echarts-bot[bot] closed issue #16170: [Feature] tree series nodeClick support clicking
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #16170:
URL: https://github.com/apache/echarts/issues/16170
--
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] Ovilia commented on issue #16170: [Feature] tree series nodeClick support clicking
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #16170:
URL: https://github.com/apache/echarts/issues/16170#issuecomment-993123056
It should provide a `nodeClick` option with values of `false | 'expand' | 'link'` similar to [treemap series](https://echarts.apache.org/en/option.html#series-treemap.nodeClick).
--
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] echarts-bot[bot] commented on issue #16170: echarts 树状图点击label标签 和symbol 子节点都会收起来 不能实现分离 点击symbol收起或者展开 点击lable获取节点信息但是不要展开或者收起子节点
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16170:
URL: https://github.com/apache/echarts/issues/16170#issuecomment-985983351
@tomatosqq 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. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
Echarts tree map clicks on the label label and symbol sub-nodes will be put away Can't achieve separation Click symbol to recege or expand Click on the cable to get node information but not expand or recant the child node
**BODY**
### Version
5.2.2
### Link to minimal reproduction
_No response_
### Steps To Reproduce
const data = {
name: "Device One",
children: [
{
name: "Device One",
children: [
{
name: "Device One",
children: [
{name: "Device One", value: 721 },
{name: "Device One", value: 4294 },
],
},
{
name: "Device One",
value: 3322,
},
],
},
{
name: "Device One",
children: [
{name: "Device One", value: 1616 },
{name: "Device One", value: 1027 },
{
name: "Device One",
children: [
{name: "Device One", value: 593 },
{name: "Device One", value: 330 },
{name: "Device One", value: 287 },
],
},
{name: "Device One", value: 843 },
],
},
{
name: "Device One",
children: [
{name: "Device One", value: 2105 },
{name: "Device One", value: 1316 },
{name: "Device One", value: 3151 },
{name: "Device One", id: 9, value: 5833 },
],
},
],
};
let option = {
tooltip: {
trigger: "item",
triggerOn: "mousemove",
},
series: [
{
type: "tree",
id: 0,
name: "tree1",
data: [data],
top: "10%",
left: "8%",
bottom: "22%",
right: "20%",
symbolSize: 10,
edgeShape: "curve",
edgeForkPosition: "63%",
initialTreeDepth: 3,
selectedMode: false,
lineStyle: {
width: 2,
color: "#000",
},
itemStyle: {
color: "blue",
},
label: {
backgroundColor: "#fff",
borderWidth: 1,
borderColor: "green",
borderRadius: 2,
padding: [3, 5],
color: "green",
position: "right",
verticalAlign: "middle",
align: "left",
fontSize: 14,
},
leaves: {
label: {
position: "right",
verticalAlign: "middle",
align: "left",
},
},
emphasis: {
focus: "series",
},
expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750,
},
],
};
this.dom = echarts.init(this.$refs.dom, "tdTheme");
this.dom.setOption(option);
this.dom.on(
"click",
function (param) {
console.log(param);
if (!param.event.target.culling) {
console.log("dot text");
} else {
console.log("icon");
}
},
false
);
### Current Behavior
Clicking on the symbol and label of the dendrogram has the same effect and cannot be separated.
### Expected Behavior
I hope to click on the label to get the node information, but do not collapse or expand the child nodes. Click the symbol to collapse or expand the child nodes.
### Environment
```markdown
-OS:
-Browser:
-Framework:
```
### Any additional comments?
_No response_
</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] echarts-bot[bot] commented on issue #16170: echarts 树状图点击label标签 和symbol 子节点都会收起来 不能实现分离 点击symbol收起或者展开 点击lable获取节点信息但是不要展开或者收起子节点
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16170:
URL: https://github.com/apache/echarts/issues/16170#issuecomment-993122083
This issue is labeled with `difficulty: easy`.
@tomatosqq Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓
--
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