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

How can I adjust font size in a Treeview? #7

Open
jaaaaaang opened this issue May 16, 2023 · 3 comments
Open

How can I adjust font size in a Treeview? #7

jaaaaaang opened this issue May 16, 2023 · 3 comments

Comments

@jaaaaaang
Copy link

hi, thanks to your github !!
I have made my own Treeview in dashapp (plotly).
and then, now I want to adjust font size in a treemap text.

I gave the classname in my code and i set font size in the css file.
but it did not work.

}
.TREE{
    font-size: 40px;
}  

please help me !!!

--------this is my code dashapp----------
html.P(children='my TreeView', style = {'font-size':'25px'}),
html.Div(
TreeView(
id='input',
multiple=True,
checkable=True,
checked=['0-0-1'],
selected=[],
expanded=['0'],
data=mytree,),
className='TREE'),

@jaaaaaang
Copy link
Author

self answer!

in the css file,
I did like below, then I could change the font size. but I still don't know how to adjust line-height and tree indent...etc.

if someone looked at this, help me !!

.TREE .ant-tree-node-content-wrapper {
font-size: 18px;
}

@Juanny-mht
Copy link

Hi i have the same problem, can you explain how did you solve it ? To add style on the component ?
I would like to add a background-color for each children of a node...

@dhknight
Copy link

The following works.
.ant-tree-node-content-wrapper { font-size: 18px; font-weight: bold; }
But it's really hard to customize. The file 'bundle.js' has nearly 50,000 lines.
I search 'dash ant design' and find an alternative to dash: https://fac.feffery.tech/AntdTree.
I think it a better choice.

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

3 participants