简体   繁体   English

高图-更改系列的默认不透明度,而不使用RGBA?

[英]Highcharts - change default opacity for series, without using RGBA?

Is there a way to set default opacity for (let's say) pie chart to (let's say 0.5), and then when mouseenter event occurs, revert it back to solid color? 是否可以将饼图的默认不透明度设置为(例如0.5),然后在发生mouseenter事件时将其恢复为纯色?

I know that's possible using rgba notation, but I'm looking for alternative solution. 我知道可以使用rgba表示法,但是我正在寻找替代解决方案。

Looking forward for any suggestions. 期待任何建议。

If rgba notation is out of the question, perhaps you could simply switch the color to a lighter shade to mimic the opacity effect. 如果无法使用rgba表示法,则可能只需将颜色切换为较浅的阴影即可模仿不透明效果。

For example, if your default color was red ( #ff0000 ), you could set the mouseover color to a lighter shade of red ( #ffe6e6 ). 例如,如果默认颜色为红色( #ff0000 ),则可以将mouseover颜色设置为较浅的红色( #ffe6e6 )。 This is, of course, assuming your background is white or another similarly light color. 当然,这是假设您的背景是白色或其他类似的浅色。

An HTML color picker, such as this one from W3Schools, can help you select shades for this effect: http://www.w3schools.com/colors/colors_picker.asp HTML颜色选择器,例如W3Schools的一个,可以帮助您选择具有这种效果的阴影: http : //www.w3schools.com/colors/colors_picker.asp

I hope this is helpful! 我希望这是有帮助的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM