semiotic-docs icon indicating copy to clipboard operation
semiotic-docs copied to clipboard

<Legend> missing in docs

Open dgwyer opened this issue 6 years ago • 4 comments

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? :)

dgwyer avatar Apr 07 '19 08:04 dgwyer

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 avatar Sep 18 '19 20:09 jebeck

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

jebeck avatar Sep 24 '19 02:09 jebeck

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.

emeeks avatar Sep 24 '19 02:09 emeeks

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.

jebeck avatar Sep 28 '19 12:09 jebeck