nteract / semiotic-docs

Docs for using Semiotic
https://semiotic.nteract.io/
32 stars 12 forks source link

<Legend> missing in docs #7

Open dgwyer opened 5 years ago

dgwyer commented 5 years ago

I can't find any info on adding legends in the docs. The only ref. I can find is the old wiki docs here: https://github.com/nteract/semiotic/wiki/Legend

I'm assuming (hoping) this feature is still supported? :)

jebeck commented 5 years ago

Legends are still supported so far as I can tell! I just made a stacked bar chart with a legend after searching through my old projects to find an example. Here's the code snippet I used as my "documentation":

      legend={{
        legendGroups: [
          {
            items: uniqSizes
              .sort()
              .map(size => ({ label: size, color: colors[size] })),
            styleFn: d => ({ fill: d.color, stroke: "black" }),
            type: "fill",
          },
        ],
      }}
jebeck commented 5 years ago

This is also really useful, from the old Semiotic Wiki: https://github.com/nteract/semiotic/wiki/Legend

emeeks commented 5 years ago

Oh wow, I can't believe I lost track of this issue. I will try to get some legend docs on the new docs. Sorry for missing this.

jebeck commented 5 years ago

Whenever you get around to this, one other place where I noticed the old wiki page is more thorough than the new docs is in enumerating all the types of annotations.

If I'm still working a lot in Semiotic soon, I can try to make some time to make some PRs myself (assuming you're open to that), but I sorta doubt that's gonna be the case. I just finished up a project and am moving on to other things.