chartjs / chartjs/chartjs-plugin-annotation

Content Wrapping within a box label

Open
#876 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
623
Forks
377
PR merge metrics
No merged PRs in 30d

Description

### Discussed in https://github.com/chartjs/chartjs-plugin-annotation/discussions/875

Originally posted by **Camology** April 13, 2023
Tried to search for others with a similar issue but did not find one, apologies if there is one out there already just point me towards it please.

Basically the goal here is to have my text wrap when used as a label for a box annotation, currently you can split by using the content array which is fine if you have set boundaries, however I have variable width boxes that will be placed when needed for example:

![image](https://user-images.githubusercontent.com/12652920/231813231-bacc7af3-e902-4e1c-9667-ca5c38982d84.png)

When the caution block covers a few spots on the X axis it's fine, but it can theoretically cover just 1 place or all of them, is there a way to adjust the label such that it will wrap text at the edges? I tried using inline SVGs but nothing seemed to function properly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.