Skip to content

Support additional tags for Annotations #1387

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

Closed
destradafilm opened this issue Feb 16, 2017 · 11 comments
Closed

Support additional tags for Annotations #1387

destradafilm opened this issue Feb 16, 2017 · 11 comments
Labels
community community contribution feature something new

Comments

@destradafilm
Copy link

destradafilm commented Feb 16, 2017

It would be great to be able to add html tags (divs, img, svg) into the annotations. Specifically the 'scatter' and 'scattergl' plots.

Currently seems like only basic tags like br, b, i, and span are supported but would be good to not have a limitation

I've seen this brought up in the community boards...Is this being considered at all?

@jackparmer
Copy link
Contributor

@destradafilm Probably not in the near future without sponsorship from a company.

@destradafilm
Copy link
Author

@jackparmer Thanks for your response. What exactly do you mean by sponsorship from a company?

@jackparmer
Copy link
Contributor

jackparmer commented Feb 16, 2017

@destradafilm companies can contact us to financially sponsor plotly.js feature development:
https://plotly.typeform.com/to/mH1Cpb

@etpinard etpinard added community community contribution feature something new labels Feb 17, 2017
@marcusblevin
Copy link

@jackparmer What about adding more basic formatting tags? I currently manually add the following:
strong:"font-weight:bold",
strike:"text-decoration:line-through",
h1:"font-size:2em",
h2:"font-size:1.5em",
h3:"font-size:1.17em",
h4:"font-size:1em",
h5:"font-size:0.83em",
h6:"font-size:0.67em",
p:"padding:0em 1em 0em 1em"

@jonfreedman
Copy link

I would like to be able to use flag-icon-css in an annotation which would require the ability to not strip out classes when converting from span to tspan in svg_text_utils

@alexcjohnson
Copy link
Collaborator

@jonfreedman we could certainly allow class to pass through from the pseudo-html to the svg, my concern (and this applies to some of the other suggested additions as well) is that referencing external content means the plot loses portability, or at least would lose that content if rendered elsewhere. That would be a first for plotly.js, at least as far as the plot's static behavior is concerned.

@jonfreedman
Copy link

I see your point, I noticed that the react wrapper exposes style and classname on the parent element, is that a similar blurring of portability?

@DaniMori
Copy link

DaniMori commented Sep 5, 2019

It would be useful if this applied to tooltips as well. I recently got stuck while trying to include an <img> inside a tooltip in a chart.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@DaniMori

This comment was marked as duplicate.

@DaniMori
Copy link

Already addressed in #6420

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

No branches or pull requests

8 participants