Skip to content

add bold to treemap label#5568

Open
mierin12 wants to merge 1 commit intoportfolio-performance:masterfrom
mierin12:bold_on_treemap
Open

add bold to treemap label#5568
mierin12 wants to merge 1 commit intoportfolio-performance:masterfrom
mierin12:bold_on_treemap

Conversation

@mierin12
Copy link
Contributor

Hello,

This is a proposition to add bold to the security name in TreeMap.
In the tooltips of Donut and Pie Chart they are already in bold, so I thought it looks more consistent.

Before :
Capture d’écran 2026-03-14 112758

After :
Capture d’écran 2026-03-14 112930

I assumed there would always be two lines of label at least, so setFont(defaultFont) is always called in the different loops, so no need to set it again after the loops. but maybe it would have been safer ?

@buchen
Copy link
Member

buchen commented Mar 15, 2026

Nice addition. But I think we should not create the bold font in every drawRectangle function. I think it is a fairly expensive operation.

I assumed there would always be two lines of label at least, so setFont(defaultFont) is always called in the different loops, so no need to set it again after the loops. but maybe it would have been safer ?

I think it is good practice to leave the graphics context as it was received, i.e. set back the default font.

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

Successfully merging this pull request may close these issues.

2 participants