Bonjour à tous,

Quelqu'un serait-il familier avec JQPLOT

J'essaie en vain de générer un chart reprenant les valeur stockées dans un db sqlite.

J'ai une table (T_Mesures) contenant entre autre les champs (DateCourte (Date au format jj/mm/aaaa), MesureGly (INT), Moment (matin,midi,soir,nuit) qui devrait me servir pour construire mon graph.
En abscisse les 'MesureGly' en ordonnées les 'DateCourte' . Une ligne par Moment.

Mon html contenant simplement la div devant contenir mon graph:
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
<div id='chartdiv'></div>

et biensûr incluant les différent .js
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
        <link href="JQPlot/jquery.jqplot.min.css" rel="stylesheet" type="text/css"/>
        <script src="JQPlot/plugins/jqplot.canvasAxisLabelRenderer.js" type="text/javascript"></script>
        <script src="JQPlot/plugins/jqplot.canvasTextRenderer.js" type="text/javascript"></script>
        <script src="plugins/jqPlot/jqplot.categoryAxisRenderer.js" type="text/javascript"></script>
        <script src="plugins/jqPlot/jqplot.dateAxisRenderer.js" type="text/javascript"></script>
un trigger pour la génération du graph au lancement de la page
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
$('#P_Stats').on('pageshow', function ()
{
    StatsInitChart();
}); // ------------------------------------------------------------
Et ma fonction:
Code : 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
function StatsInitChart()
{
    $.jqplot.config.enablePlugins = "true";
    // *****************************************************************
    var sqlDataRetrieve = "SELECT * FROM T_Mesures GROUP BY Moment";
    db.transaction(function (tx)
    {
        tx.executeSql(sqlDataRetrieve, [], function (tx, result)
        {
//            alert(result.rows.length);
            var d1 = [];
            var d2 = [];
            var d3 = [];
            var d4 = [];
 
           if (result.rows.length)
            {
                var Ma = 0; var Mi = 0; var So = 0; var Nu = 0;
 
 
                for (var i = 0; i < result.rows.length; i++)
                {
                    var row = result.rows.item(i);
                    var Date = row.DateCourte;
                    var Mesure = row.MesureGly;
                    var Moment = row.Moment;
                    switch (Moment)
                    {
                        case ("Matin"):
                            {
                                d1[Ma] = [Date, Mesure];
                                Ma++;
                            }
                            break;
                        case ("Midi"):
                            {
                                d2[Mi] = [Date, Mesure];
                                Mi++;
                            }
                            break;
                        case ("Soir"):
                            {
                                d3[So] = [Date, Mesure];
                                So++;
                            }
                            break;
                        case ("Nuit"):
                            {
                                d4[Nu] = [Date, Mesure];
                                Nu++;
                            }
                            break;
                    }
                }  //for loop close
 
 
                $(document).ready(function ()
                {
                    var plot1 = $.jqplot('chartdiv', [d1, d2, d3, d4],
                            {
                                title:
                                        'Tendance Glycémique',
                                grid:
                                        {
                                            drawBorder: true,
                                            shadow: false,
                                            background: 'rgba(0,0,0,0)'
                                        },
                                highlighter:
                                        {
                                            show: true
                                        },
                                seriesDefaults:
                                        {
                                            shadowAlpha: 0.1,
                                            shadowDepth: 2,
                                            fillToZero: true,
                                            rendererOptions:
                                                    {
                                                        smooth: true
                                                    }
 
                                        },
                                series:
                                        [
                                            {
                                                color: 'rgba(198,88,88,.6)',
                                                label: 'Matin',
                                                negativeColor: 'rgba(100,50,50,.6)',
                                                showMarker: true,
                                                showLine: true,
                                                fill: true,
                                                fillAndStroke: true,
                                                markerOptions:
                                                        {
                                                            style: 'filledCircle',
                                                            size: 8
                                                        },
                                                rendererOptions:
                                                        {
                                                            smooth: true
                                                        }
 
                                            },
                                            {
                                                color: 'rgba(44, 190, 160, 0.7)',
                                                label: 'Midi',
                                                showMarker: true,
                                                rendererOptions:
                                                        {
                                                            smooth: true
                                                        },
                                                markerOptions:
                                                        {
                                                            style: 'filledSquare',
                                                            size: 8
                                                        }
 
                                            },
                                            {
                                                color: 'rgba(84, 190, 160, 0.7)',
                                                label: 'Soir',
                                                showMarker: true,
                                                rendererOptions:
                                                        {
                                                            smooth: true
                                                        },
                                                markerOptions:
                                                        {
                                                            style: 'diamond',
                                                            size: 8
                                                        }
 
                                            },
                                            {
                                                color: 'rgba(122, 110, 160, 0.7)',
                                                label: 'Nuit',
                                                showMarker: true,
                                                rendererOptions:
                                                        {
                                                            smooth: true
                                                        },
                                                markerOptions:
                                                        {
                                                            style: 'circle',
                                                            size: 8
                                                        }
 
                                            }
 
                                        ],
                                axes:
                                        {
                                            xaxis:
                                                    {
                                                        // padding of 0 or of 1 produce same results, range 
                                                        // is multiplied by 1x, so it is not padded.
//                                                        label: 'Date',
                                                        labelRenderer: $.jqplot.dateAxisRenderer,
                                                        labelOptions:
                                                                {
                                                                    fontFamily: 'Georgia, Serif', fontSize: '10pt'
                                                                },
                                                        pad: 1.0,
                                                        renderer: $.jqplot.CategoryAxisRenderer,
                                                        tickRenderer: $.jqplot.CanvasAxisTickRenderer,
                                                        tickOptions:
                                                                {
 
                                                                    angle: -40,
                                                                    showGridline: true
//                                                                    formatString: '%b' ,
//                                                                    tickInterval: '1 day'
                                                                }
                                                    },
                                            yaxis:
                                                    {
                                                        label: 'Glycémie',
                                                        labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
                                                        pad: 1.05,
                                                        labelOptions:
                                                                {
                                                                    fontFamily: 'Georgia, Serif', fontSize: '10pt'
                                                                }
 
                                                    }
                                        }
                            });
                });
            }
        }, erreur_bd);
    });
} // *****************************************************************
Mais je n'obtient qu'un graph obstinément vide :
Nom : stats.png
Affichages : 152
Taille : 13,0 Ko

quelqu'un pourrait-il me mettre sur la voie ?
D'avance merci