Navigation Menu

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

Cannot add image or icon in menu item since Highcharts 9.0.0 #15449

Closed
jasonclg opened this issue Apr 6, 2021 · 5 comments · Fixed by #15943
Closed

Cannot add image or icon in menu item since Highcharts 9.0.0 #15449

jasonclg opened this issue Apr 6, 2021 · 5 comments · Fixed by #15943
Assignees
Labels
Type: Feature Request Used when a new feature is requested either directly or indirectly Type: Regression

Comments

@jasonclg
Copy link

jasonclg commented Apr 6, 2021

Expected behaviour

Image/icon was allowed to be added in the menu item in Highcharts 8.2.0.

Actual behaviour

It's no longer supported. HTML tags will be converted to text.

Live demo with steps to reproduce

https://jsfiddle.net/5sra4ufe
In HTML, comment line 1&2 and uncomment line 3&4 to compare the behavior in Highcharts 8.2.0.

Product version

Highcharts [9.0.0, 9.0.1]

@KacperMadej
Copy link

A workaround, that might work for some cases, is to use CSS and prepend or append content - https://jsfiddle.net/BlackLabel/jpc4gard/2/

Internal note:
useHTML could be added

@KacperMadej KacperMadej added the Type: Feature Request Used when a new feature is requested either directly or indirectly label Apr 8, 2021
@wergeld
Copy link

wergeld commented Apr 8, 2021

I am not sure this should be a feature request. Using font awesome icons has been possible on highcharts menu options since version 5 at least. This is existing functionality that was removed in v9 without notice - would this not be a bug?

@jordandev
Copy link

Yeah this change broke our menus...

@KacperMadej
Copy link

The introduction of AST and a more strict, secure, and consistent approach to setting any texts in a chart caused this issue to show up. The fact this worked before was just a happy coincidence and was not by design. If HTML should be supported for something then there should be an option useHTML to enable it. Those are rather strong arguments for me and this is why the issue was label as a feature request. I am adding a regression label since this was working before.

I could change this into a bug if you are still more convinced that this is a bug and not a future request (please let me know in a comment). @wergeld

@wergeld
Copy link

wergeld commented Apr 9, 2021

@KacperMadej If this was done in effort for more security, I am all for it - our clients are state workforce systems and we tighten down a lot of our code as well. Put me in the camp of making this a feature. Having icons to represent what the graph buttons do is a great way to allow certain segments of the population with low/no reading skills to still use our systems. We have external export controls in HTML for each chart and use the export menu to handle things like sorting or setting the compare (for stock charts).

I am assuming there is no timeline for release of this so, in the meantime we will remove our FA icons from the menu items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request Used when a new feature is requested either directly or indirectly Type: Regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants