Skip to content

LegendLabels.setFontSize not working #285

Closed

Description

@dhelml

Checklist

  • I am able to reproduce the bug with the latest version
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.

Affected version

2.4.0

Steps to reproduce the bug

  1. Try to set font size via new LegendLabels().setFontSize(5)
  2. Observe created json structure
  3. Observe created chart

Expected behavior

Font size changed from default 12 to 5

Actual behavior

The legend has still the fontsize 12

Additional information

  • Primefaces uses chart.js version 4.4.2
  • Chart.js docu describes font as an own object within label
  • font family also depends on the legends.font object

Activity

  1. naofireblade commented on Nov 19, 2024

    @naofireblade
  2. dhelml commented on Nov 19, 2024

    @dhelml
    Author

    Yes, the library does not support setting an Font object at the moment. It has (maybe deprecated) methods to set each value on the Labels object instead, which do not work anymore.

  3. AB-xdev commented on Nov 20, 2024

    @AB-xdev
    Member

    Fixed / Syned with ChartJS Source in abe81da

  4. self-assigned this
    on Nov 20, 2024
  5. added a commit that references this issue on Nov 20, 2024
    abe81da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions