Open Worschi opened 11 months ago
Good idea, @Worschi. Would you be interested in seeing if you can find this functionality in Mapbox itself and figure out how the API compares with what we have for line dash and scatter traces?
Hello @Coding-with-Adam, thanks for noticing! I'd probably be able to do some more research and post my findings here. I already came accross a working code snippet for "line-dasharray" styled lines in the mapbox-gl.js class.
Have a look at this minimal jsfiddle example. It uses a "line-dasharray" in the mapbox-gl.js to plot dashed lines. There may be better ways though since my initial reseach was not thorough.
Would you be so nice as to point me in the right direction for plotly API to mabox API mapping?
Nice! Thanks, @archmoj. I'll try this out beginning of the week and let you know if it worked for my use case. I'll keep you posted and close this issue in case it did.
Hello, the dashed line style does indeed work in geojson layers. I set up a minimal working example to demonstrate: dashed line in mapbox layer example
I am confident, that I can tweak my code to use geojson lines instead of Scattermapbox traces. I'll go ahead an close this issue now. Although I wonder if the documentation should improve in this regard? Several people looked for this on the internet and could not find solutions. Anyhow, thanks again @archmoj for pointing this out! I'd not have found this in the docs quickly.
Thanks @Worschi! Good to know that this can be done with a geojson layer. But I'd like to keep this issue open until we investigate adding it to scattermapbox, that will still be more useful if we can get it working.
Hi @alexcjohnson, fine with me. I am not sure when/if I'll be able to investigate further. The team already moved on and, for now, settled with not having dashed lines.
@alexcjohnson is this issue still open?
hi @kussshhhh Yes, this issue is still open
Any update ?
is this issue still open?
yes, but I don't know when someone will be able to work on it - we have a very large backlog that we're trying to clear
It would be nice to plot lines of different styles, e.g. dashed, dotted, etc. to a Scattermapbox layer. The lack for this feature has been noted here How do I change the line style to dash in a scattermapbox plot?, and here How to change line shape in mapbox maps?
Currently (Plotly 5.18), the only supported line attributes are "color" and "width" . However, distinguishing lines by color is not sufficient for monochrome styled figures. In addition, certain line styles are frequently expected: