英文:
Is there a way to change the formatting (font, color, etc.) of the interactive elements for "bind"?
问题
使用vega-lite中的bind
属性将显示一个交互元素(例如滑块、下拉菜单、单选按钮等)。例如,在https://vega.github.io/vega-lite/docs/bind.html中,有一个示例显示默认字体中的绑定参数名称org_Origin和下拉菜单值。是否有办法更改此内容,例如将名称"org_Origin"的颜色设置为白色?
我尝试过对selection
的config
定义进行调整,以及可能从中继承的其他选项(title
、header
、legend
),但未能找到有效方法。
英文:
Using the bind
property in vega-lite will show an interactive element (e.g., a slider, dropdown, radio, etc.). For example, in https://vega.github.io/vega-lite/docs/bind.html, there is a sample showing the name of the bound parameter, org_Origin, and the dropdown values in the default font. Is there any way to change this, e.g., set the color of the name "org_Origin" to white?
I played around with the config
definition for selection
, as well as potential other options that it could possibly inherit from (title
, header
, legend
), but was unable to find anything that worked.
答案1
得分: 0
你能通过 Deneb 应用 CSS 样式吗?
通过 CSS,你可以添加以下样式,例如:
(在线 CSS:.example .vega-bind select)
.vega-bind select {
max-width: 180px;
font-size: 16px !important;
color: blue !important;
background-color: aliceblue !important;
border-color: silver;
border-radius: 3px !important;
padding: 4px !important;
}
英文:
Are you able to apply a css style or this via deneb?
Via css you could add the following for example:
(Online css: .example .vega-bind select)
.vega-bind select {
max-width: 180px;
font-size: 16px !important;
color: blue !important;
background-color: aliceblue !important;
border-color: silver;
border-radius: 3px !important;
padding: 4px !important;
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论