New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making an SVG Timeline with XSLT #578

Open
ebeshero opened this Issue Nov 26, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@ebeshero

This comment has been minimized.

Owner

ebeshero commented Nov 26, 2018

Fundamental concepts:

  • Thinking your way through, step by step, and writing XSLT like a scratchpad to test your variables. (I like to use <xsl:comment> for this: it produces XML comments in the output, and lets me look at the values my variables are making.)
  • Date arithmetic with years and "nth days" in a year
  • Drawing a shape based on the difference between the maximum and minimum (year) value, and a spacer value
  • "nth day in a year": use the format-date() function with a picture string to return the number of days into the year a given date represents. Divide by 365 to turn this into a fraction to be added to a year value.
  • Plotting events as they relate to the minimum value on the timeline. (Subtraction of Event year from Minimum year, then adding the nth day value =).
  • Tinkering with vertical and horizontal spacing for legibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment