Bonjour, j'ai réussi à afficher un graphique à partir d'un fichier javascript dans page aspx mais je voudrais maintenant pouvoir l'afficher dans une page html.

Voici mon fichier aspx :

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
	<script language="javascript" type="text/javascript" src="JavaScript/jquery-1.10.2.min.js"></script>
	<script language="javascript" type="text/javascript" src="JavaScript/jquery.visualize.plugin.js"></script>
 
	<script type="text/javascript">
                $(function () {
                    $('table').visualize({ type: 'line' }).appendTo('body');
                });
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
        <asp:Repeater ID="Repeater1" runat="server" OnItemCreated="Repeater1_ItemCreated">
            <HeaderTemplate>
                <table>
			    <caption style="font-size:20px">Statistiek 2 : per productgroep</caption>
			    <thead>
				    <tr>
					    <td></td>
					    <th scope="col"><asp:Label runat="server" ID="Ym4"></asp:Label></th>
					    <th scope="col"><asp:Label runat="server" ID="Ym3"></asp:Label></th>
                        <th scope="col"><asp:Label runat="server" ID="Ym2"></asp:Label></th>
                        <th scope="col"><asp:Label runat="server" ID="Ym1"></asp:Label></th>
                        <th scope="col"><asp:Label runat="server" ID="Ym0"></asp:Label></th>
				    </tr>
			    </thead>
            </HeaderTemplate>
            <ItemTemplate>                       
			    <tbody>
				    <tr>
					    <th style="text-align:left" scope="row"><%%></th>
					    <td><%# Math%></td>
					    <td><%# Math%></td>
					    <td><%# Math%></td>
					    <td><%# Math%></td>
					    <td><%# Math%></td>
				    </tr>
                </tbody>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
 
    </div>
 
    </form>
</body>
</html>

Ca fonctionne bien, en dessous de ma grille avec les chiffres d'affaires, j'ai bien le graphique.

En html :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
$(function () {
    $('table').visualize({ type: 'line' }).appendTo('body');
});
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<body>
    <table id="table_campaigns" class="display">
        <thead>
            <tr>
                <td></td>
                <th>2010</th>
                <th>2011</th>
                <th>2012</th>
                <th>2013</th>
                <th>2014</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</body>
</html>

J'obtiens une erreur : $(...).visualize is not a function.

J'ai essayé jQuery(...).visualize aussi mais rien y fait.
Mais ça ne fonctionne pas.
Quelqu'un aurait une idée?

Merci.