Skip to content

Use <thead> as legend #135

Description

@mariusGundersen

The <thead> isn't used for anything today, but it contains the information needed for the legend. The only thing necessary is to remove the first <th>, since it is the x-axis. The rest of the content could be shown as the legend.

A further improvement would be to use the first <th> in the <thead> as the x-axis title. It's possible to get the y-axis as well, using the following table:

<table>
  <thead>
    <tr>
      <th rowspan=2 scope="col">x-axis title</th>
      <th colspan=5 scope="col">y-axis title</th>
    </tr>
    <tr>
      <th scope="col">value-1</th>
      <th scope="col">value-2</th>
      <th scope="col">value-3</th>
      <th scope="col">value-4</th>
      <th scope="col">value-5</th>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>

By using two rows in the thead we get both the legend, the x-axis and the y-axis title

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions