Hello,
I need to use icon for the marker. How can i do it? Or even customize it with some kind of canvas or etc?
Hello,
I need to use icon for the marker. How can i do it? Or even customize it with some kind of canvas or etc?
scatter
traces donât allow that at the moment. Youâll need to use layout.shapes
.
Is it still not possible to add icons as markers ? I want to add icons(.png format) instead of dots in scatterplot using plotly.js.
I would like to do the exact same thing! Have you figured out how to do that? Perhaps some hacky solution?
One hacky solution is to add layout images as suggested by @etienne (please see https://plot.ly/javascript/images/). You wonât have hover for them but you can have a scatter trace with invisible points for the hover and then the layout images as icons.
Hi, one very easy solution is to use UTF-8 icons. This will expand the ânomalâ plotly markers by a lot
UTF-8 res: https://www.compart.com/de/unicode/search?q=bell#characters
Plotly.plot('graph', [{
mode: 'text',
x: [1],
y: [1],
text: ['â˝'],
type: 'scatter',
textfont: {
size: 25,
color: 'black'
}
}])
You can easily exchange them. I havnât found out yet, if using a custom created font also allows to use own icons.
I made a codepen for that: https://codepen.io/cherzog/pen/YzqBNvx?editors=0010
Hopefully this will help you!