Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Styling markers

Is it possible to add style to markers in plotly.js? I tried to add a standard CSS style to the marker hash in plotly. ie marker: { “stroke-width”:“1px”}; but this was not applied. It was possible to apply it in a stylesheet, but then whenever the plot is resized or zoomed, it resets. A workaround I used was to add an event listener for the plotly_relayout event, but it would be nice to be able to natively apply style elements so that they apply on relayout.

Example:

Here’s how: http://codepen.io/etpinard/pen/ZLMBGW?

1 Like

Thanks, I’d tried to review the API documentation but couldn’t figure out where this sort of option is.