[JS] modifier abscisse tableau

MouleFrite -  
brute Messages postés 112 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour à tous,

Je viens vers vous car je rencontre un problème, je possède un tableau HTML
|      | Janv. | Fev. | Mars. | ..... | Desc | 
| 2008 | 10    | 11   | 26    | ....  | 37   | 
| 2009 | 10    | 11   | 26    | ....  | 37   | 
| 2010 | 10    | 11   | 26    | ....  | 37   | 


la structure HTML est la suivante :
<table>
  <thead>
    <tr>
      <th></th>
      <th>Janv.</th>
      <th>Fev.</th>
      ....
      <th>Desc.</th>
    </tr>  
</thead>
<tbody>
    <tr>
      <th>2008</th>
      <td>10</td>
      <td>11</td>
      ....
      <td>37</td>
    </tr>
    ....
</tbody>
</table>

Mois en axe X et année en axe Y

est-il possible en javascript de modifier celà afin de changer l'abscisse et obtenir donc un tableau HTML dont l'axe X deviendrais les années et l'axe Y deviendrais les mois.

En claire d'inverser les axes, si oui pouvez-vous m'aider, car je ne vois pas comment m'y prendre ?

D'avance merci de votre contribution
Bien à vous
MouleFrite


A voir également:

1 réponse

brute Messages postés 112 Date d'inscription   Statut Membre Dernière intervention   13
 
est-ce quelque chose comme ca que tu veux ?
| | 2008 | 2009 | 2010 |
|Janv. | 10 | ... | ... |
|Fev. | 11 | ... | ... |
|Mars.| 11 | ... | ... |

?? si oui, voivi le code :
<table>
  <thead>
     <tr>
      <th></th>
      <th>2008</th>
      <th>2009</th>
      <th>2010</th>
  </thead>
  <tbody>
    <tr>
      <th>Janv.</th>
      <td>10</td>
    </tr>
    <tr>
      <th>Fev.</th>
      <td>11</td>
    </tr>
    <tr>
      <th>Mars.</th>
      <td>26</td>
    </tr>
    <tr>
      <th>Dec.</th>
      <td>37</td>
    </tr>
  </tbody>
</table>
0
brute Messages postés 112 Date d'inscription   Statut Membre Dernière intervention   13
 
ah non désolé... c'est en javascript que tu veux faire... désolé... ^^
0