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/24 08:18:55 UTC
[GitHub] [echarts] Hunlongyu opened a new issue #16738: [Feature] Toolbox feature custome icon add click style.
Hunlongyu opened a new issue #16738:
URL: https://github.com/apache/echarts/issues/16738
### What problem does this feature solve?
Toolbox feature: The default icon color changes to blue when clicked, but the color of the custom icon does not change after clicking.
(toolbox feature 里默认的图标如:datazoom,brush 等,点击后颜色变蓝,但是自定义的图标点击后没有变化)
I hope that when hover or click the icon, there are attributes that can change the icon's color or style.
(希望鼠标悬浮或者点击自定义图标的时候,可以有属性值来改变颜色或者样式。)
### What does the proposed API look like?
```js
const toolbox = {
featrure: {
myRecovery: {
show: true,
title: 'recovery'
icon: '',
hover: {
icon: {
color: '#ff0',
size: 14
},
label: {...}
},
focus: {
icon: {},
label: {}
},
onclick () {}
}
}
}
```
--
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 #16738: [Feature] Toolbox feature custome icon add click style.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16738:
URL: https://github.com/apache/echarts/issues/16738#issuecomment-1077355045
@Hunlongyu 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>
**BODY**
### What problem does this feature solve?
Toolbox feature: The default icon color changes to blue when clicked, but the color of the custom icon does not change after clicking.
(The default icons in the toolbox feature, such as: datazoom, brush, etc., the color turns blue after clicking, but the custom icon does not change after clicking)
I hope that when hover or click the icon, there are attributes that can change the icon's color or style.
(When you want to hover over the mouse or click on a custom icon, you can have attribute values to change the color or style.) )
### What does the proposed API look like?
```js
const toolbox = {
featrure: {
myRecovery: {
show: true,
title: 'recovery'
icon: '',
hover: {
icon: {
color: '#ff0',
size: 14
},
label: {...}
},
focus: {
icon: {},
label: {}
},
onclick () {}
}
}
}
```
</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] plainheart commented on issue #16738: [Feature] Toolbox feature custome icon add click style.
Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #16738:
URL: https://github.com/apache/echarts/issues/16738#issuecomment-1077366109
目前可以手动在 click handler 里面设置下颜色,例如:
```js
myRecovery: {
show: true,
title: 'myRecovery',
icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891',
onclick: function () {
// 选中颜色
myChart.setOption({
toolbox: {
feature: {
myRecovery: {
iconStyle: {
borderColor: 'red'
}
}
}
}
})
},
// 鼠标悬浮颜色
emphasis: {
iconStyle: {
borderColor: 'red'
}
}
}
```
--
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] Hunlongyu closed issue #16738: [Feature] Toolbox feature custome icon add click style.
Posted by GitBox <gi...@apache.org>.
Hunlongyu closed issue #16738:
URL: https://github.com/apache/echarts/issues/16738
--
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] Hunlongyu commented on issue #16738: [Feature] Toolbox feature custome icon add click style.
Posted by GitBox <gi...@apache.org>.
Hunlongyu commented on issue #16738:
URL: https://github.com/apache/echarts/issues/16738#issuecomment-1077412601
目前确实也是这么解决的。这样似乎自由度高一点,还好一点。
--
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