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

legend.usePoint not working for custom points patterns if there is spaces or special chars in data title #2425

Closed
ugoQ opened this issue Nov 18, 2021 · 2 comments
Assignees
Labels

Comments

@ugoQ
Copy link

ugoQ commented Nov 18, 2021

To reproduce this, go here https://naver.github.io/billboard.js/demo/#Legend.usePoint
And rename one of the titles with a custom point pattern associated, for example rename "data3" to "data_3" or "data 3" (same thing happens with slashes, parentheses, brackets...), you will see that the related "point" is not displayed in the legend.

Because the legent point has this href

<use class="bb-legend-item-point" href="#bb-1637241256550-point-data{3" ...>

Whereas the polygon definition has this id

<polygon id="bb-1637241256550-point-data-3" ...>
@ugoQ ugoQ changed the title legend.usePoint not showing for custom points patterns if there is spaces or special chars in data title legend.usePoint not working for custom points patterns if there is spaces or special chars in data title Nov 18, 2021
@netil netil self-assigned this Nov 19, 2021
@netil netil added the bug label Nov 19, 2021
@netil
Copy link
Member

netil commented Nov 19, 2021

Hi @ugoQ, thanks for the report.

netil added a commit to netil/billboard.js that referenced this issue Nov 19, 2021
Make data names to handle special chars.

Ref naver#2425
@netil netil closed this as completed in 275c1cc Nov 19, 2021
github-actions bot pushed a commit that referenced this issue Nov 19, 2021
## [3.2.2](3.2.1...3.2.2) (2021-11-19)

### Bug Fixes

* **api:** Fix zoom reset for  regions(), grids() api call ([679ce73](679ce73)), closes [#2411](#2411)
* **bar:** fix bar radius rendering with clipPath=false option ([80bf491](80bf491)), closes [#2421](#2421)
* **legend:** Fix usePoint option work for spaced data name ([275c1cc](275c1cc)), closes [#2425](#2425)
* **types:** fix candlestick data type ([ccac60d](ccac60d)), closes [#2422](#2422)
@ugoQ
Copy link
Author

ugoQ commented Nov 19, 2021

Hi @ugoQ, thanks for the report.

No problem, thanks for the quick fix and thanks for this amazing library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants