This message was deleted.
# help
s
This message was deleted.
f
p
Ooh, interesting! Almost like cheating 😉
m
You may also want to investigate HTML's
display: flex
or
display: grid
p
Yeah, that would work. In this case I need to be able to export the output as one SVG (or png) as I need to be able to use it in other apps (w/o writing code).
m
ah, yeah. that would make it harder
p
yah. Right now I do the faceting by using a container SVG and SVG groups and translating the groups to their "correct" place. What I don't like with this approach is the need to use "magic" numbers to set the width and height of the container SVG and using the numbers in the calculations for the translate. It gets quite messy and doesn't scale very well.
f
here's another way (that would need to be adapted) https://observablehq.com/@observablehq/autoplot-matrix
👀 1
p
Is it possible to have different projections in each cell of a geo mark facet? I want to be able to set the domain so I can "zoom in" on data. Geo mark facets https://observablehq.com/d/05ba674f5ffcd396 Custom mark (based on subplot example above) pattern https://observablehq.com/d/8d591b40a5e5336a
f
If you ask "is it possible" the answer will always be yes, since you can always use D3 and custom code to achieve whatever you need 🙂 In this case, yes it's possible, but no, it's not easy. I'm sending you a suggestion
p
Nice idea! I like it.
Why would I need to have this line?
Copy code
domain: views[0].projection(continentsDisputedAreasTopo[0])
And where do the facet (grid) labels (0,1,2 on the x and y axis) come from? I would like to disable them if possible.
f
add axis: null in both fx and fy
the first element is needed to fit the projection to the domain somehow. It would be better to do this, though:
Copy code
projection: {
    type: "identity",
    inset: 2,
    domain: {
      type: "MultiPoint",
      coordinates: [
        [0, 0],
        [1000, 1000]
      ]
    }
  },
which corresponds to the projection definition. Note that I haven't tried to care for the aspect ratio, this is another exercise left to the reader
p
Thanks for all the help!
👏 1