EmmaSchwarz / computational-dostoevsky

1 stars 0 forks source link

Legend for keyword-blocks.xsl #30

Open blueciren opened 4 years ago

blueciren commented 4 years ago

David, I was looking for a way to create a legend. I though I could simply create another table. But seemingly there is a specific way to construct it(?) I could find people using "legendCallback" function, but it seems like this is a javascript command. Is there a separate command in the xslt file for this?

djbpitt commented 4 years ago

@blueciren I think the simplest solution are:

  1. Do it in HTML in the page in which you include the SVG.
  2. Create it in SVG with rectangles of color and text. There’s no need for JavaScript here.
blueciren commented 4 years ago

David, could you have a look at keyword-blocks.xsl and what is wrong with the lines from 66 to 77? I wanted to create a legend right beneath the last bar (of the word scheme), but I got a completely different result from what I expected.

djbpitt commented 4 years ago

@blueciren I've pushed a new version, which includes a legend below the bars. Let me know if that isn't what you wanted, or if you have any questions about how it works.