Element, Collage, Graphics

Have these all been consigned to the dustbin in 0.19? The old evancz/elm-graphics package has not been updated for 2 years and doesn’t appear in the list of searchable packages, so I guess it is unusable now.

What alternatives might there be in 0.19? All I need to do is to retrieve a background picture, layer some objects and lines on top of it, and include it as a [div], formerly using the command .toHtml.

An alternative you have is including the image inside an SVG element and adding on top the other objects and lines you need. You can use elm/svg for that.

If you have to do any sort of drawing/graphing/etc., I’d highly recommend taking a peek at elm-visualization. (We are using it in production.)

It seems to be in the process of being updated to 0.19. It’s basically a replacement for D3.

Also, if you are looking to use SVG directly, maybe take a look at the TypedSVG package–it makes for much cleaner code.

There’s also elm-vegalite (which uses the widely adopted Grammar of Graphics) and elm-vega (which uses a D3 type approach). Both work with Elm 0.19. (Disclosure: I am the author of both).

Although for the OP’s tasks, I agree that elm/svg is probably the way to go.

Thanks for all the suggestions, I guess I’ll have to bite the bullet one way or another…

Elm Collage is ported to 0.19!

Only measuring the size of text is done using heuristics now, as the usage of native code is forbidden. I’m still open for suggestions on that!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.