Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tooltip]详情dom上增加css类定义'echarts-tooltip',可通过css附加样式 #2039

Closed
likunNet opened this issue Sep 18, 2015 · 3 comments

Comments

@likunNet
Copy link

请问我在页面定义echarts-tooltip的样式为何对tooltip不起作用,如
.echarts-tooltip {
color: red;
background-color: green;
}

@likunNet
Copy link
Author

调了下源码,发现 _defaultCssText与_gCssText会写上这些属性,那基本可扩展的属性也有限。。。自定义echarts-tooltip 样式与以下属性重复的,都会被覆盖
_defaultCssText:transition:left 0.4s,top 0.4s;-moz-transition:left 0.4s,top 0.4s;-webkit-transition:left 0.4s,top 0.4s;-o-transition:left 0.4s,top 0.4s;background-Color:#000000;filter:alpha(opacity=70);background-Color:rgba(0,0,0,0.7);border-width:0px;border-color:#333;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;-o-border-radius:4px;color:#fff;padding:5px 5px 5px 5px;
_gCssText:position:absolute;display:block;border-style:solid;white-space:nowrap;

@stanleyxu2005
Copy link
Member

通过tooltip的选项去定义样式。下图是我自定义的样式
d6ebd17e-5029-11e5-9950-4758242e8868
可参考https://github.com/stanleyxu2005/dashing/blob/master/src/charts/echarts.js#L190

@pissang pissang closed this as completed Jan 7, 2017
@xpbtmusic
Copy link

xpbtmusic commented Sep 6, 2017

你好,tooltip怎么通过选项自定义css样式。
184332_gfj2_2440437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants