Finally came back to this, WIP for now. Have something working for the color legend side of things, nothing for thickness yet. This is a bit of a silly example mixing solid colours and colour ramps;
but it shows that I've got categorical legend entries working, as well as graduated entries for the color ramp option, which also supports different color ramps and data for the AB and BA directions (unticking dual fields). I've added things hierarchically into the legend rules as I think that makes the most sense.
Edit: Also now with a thickness legend:
There are a couple of TODOs of things in the code I'm not sure about / could be cleaned up.
Also was wondering about how to expose this. Currently I'm always generating the legends, but I could see an argument there should be a checkbox to turn legend generation off?
Finally came back to this, WIP for now. Have something working for the color legend side of things, nothing for thickness yet. This is a bit of a silly example mixing solid colours and colour ramps; but it shows that I've got categorical legend entries working, as well as graduated entries for the color ramp option, which also supports different color ramps and data for the AB and BA directions (unticking dual fields). I've added things hierarchically into the legend rules as I think that makes the most sense.
Edit: Also now with a thickness legend:
There are a couple of TODOs of things in the code I'm not sure about / could be cleaned up. Also was wondering about how to expose this. Currently I'm always generating the legends, but I could see an argument there should be a checkbox to turn legend generation off?