Main Content

Using WC Graph Table

Basic Setup

The basic setup (using default options) for the built-in charts and graphs is as follows:

    Insert the table.

    The table tag only requires the following:

    • a unique id
    • the graphme class
    <table id="table1" summary="..." class="graphme">
    </table>

    Insert a table caption.

    Add the table caption to the caption tag of your table.

    <table id="table1" summary="..." class="graphme">
    <caption>...</caption>
    </table>

    Insert the series labels

    Add each series label to the thead section as a th.

    Note: Some simpler pie charts do not need the thead section for your data series. See Chart Types: Line, Bar and Pie for more information.
    <table id="table1" summary="..." class="graphme">
    <caption>...</caption>
    <thead>
    <tr>
    <td> </td>
    <th scope="col">Television</th>
    <th scope="col">Newspapers</th>
    ...
    <th scope="col">Mobile</th>
    </tr>
    </thead>
    <tbody>...</tbody> </table>

    Insert the data.

    Add the data to the tbody section as a td.

    <table id="table1" summary="..." class="graphme">
    <caption>...</caption>
    <thead>...</thead>
    <tbody>
    <tr>
    <td> </td>
    <td>319.2</td>
    <td>26.4</td>
    ...
    <td>19.2</td>
    </tr>
    </tbody>
    </table>

    Top of page