改变设置交互状态样式的方式
#4506
Replies: 2 comments
-
这里有两个 case,看下这个方案是否可以考虑到下面两种情况。如果可以的话,就忽略 Case1
不过这个 case 的元素选中划出交互可以用其它来处理,不涉及状态样式 Case2下面这个 case 就更复杂了 ResourcesDone 交互稿 (内网访问) |
Beta Was this translation helpful? Give feedback.
0 replies
-
close: #4649 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
通过 state 设置交互状态样式
现在是在
view.interaction
里面的配置交互状态样式,这样是不合理的:解决思路
交互只是消费数据,不提供数据,数据的提供都在编码阶段完成,这样和 tooltip 交互思路也是一致的了。可以看 Vega-Lite 的这个例子:
解决办法
通过 state 或者 style 去设置交互样式。同时一个元素内置只有三种状态:
state.unselected.${StyleKey}
去设置样式state.selected.${StyleKey}
去设置样式这样就可以解决下面的问题:
这样主题里面设置默认值也很容易了:
Beta Was this translation helpful? Give feedback.
All reactions