question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[URGENT] How to bold sub label/title?

See original GitHub issue

What I wanna achieve is to make the 2nd label (sub-label/sub-title) bold.

...
labels: [
     ["Main Label", "This is a sub-label" /* i wanna make this sub label to be bold */ ], ...
],
...

The closest solution I could find online, but it’s inactive: https://stackoverflow.com/questions/46221425/chart-js-make-part-of-labels-bold

also tried https://jsfiddle.net/Leelenaleee/3d50fkL9/26/

But none of them is working, so I’m here asking for help, thanks in advance

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
LeeLenaleeecommented, Sep 28, 2021

Seems to be working fine, improved a bit by adding padding at bottom so text doesnt get cut off, also instead of drawing white box make default text transparent. Depending on your subTitle text length you might need to also add some padding on the right.

To make it bold did you replace the italic to bold in the fontStringSubTitle option?

https://jsfiddle.net/Leelenaleee/3d50fkL9/30/

0reactions
enkr1commented, Nov 10, 2021

Solution:

instead of setting white, i set to transparent.

ticks: {
    color: 'transparent',
},
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bold, italics and underlining - Overleaf, Online LaTeX Editor
Using italics, bold or underlined words can change the perception of the reader. In this article three basic text formatting tools will be...
Read more >
How to Bold, Italicize & Format Text in HTML - HubSpot Blog
Learn how to format bold, italicized, underlined, strikethrough, subscript, and superscript text using HTML and CSS.
Read more >
python matplotlib make everything bold - Stack Overflow
Making everything bold is rather easy. Just add plt.rcParams["font.weight"] = "bold" plt.rcParams["axes.labelweight"] = "bold".
Read more >
How do I add rich text formatting (i.e. bold, italics, subscripts ...
Go to Edit > Emoji & Symbols which opens 'Character Viewer.' Locate the symbol, sub- or superscript you want, double click and it...
Read more >
VBA Bold - Automate Excel
In this tutorial, you will learn how to make text bold. Bold Text With VBA. You would set the Font.Bold Property of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found