Bonjour

Mon idée est la suivante , obtenir un histogramme en cercle avec trois elements

sql , js, jsp
code 1 JS
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
$(function () {
    $('#container').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: 0,
            plotShadow: false
        },
        title: {
            text: 'Browser<br>shares',
            align: 'center',
            verticalAlign: 'middle',
            y: 50
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -50,
                    style: {
                        fontWeight: 'bold',
                        color: 'white',
                        textShadow: '0px 1px 2px black'
                    }
                },
                startAngle: -90,
                endAngle: 90,
                center: ['50%', '75%']
            }
        },
        series: [{
            type: 'pie',
            name: 'Browser share',
            innerSize: '50%',
            data: [
                ['E',   45.0],
                ['D',       26.8],
                ['C', 12.8],
                ['B',    8.5],
                ['A',     6.2],
                {
                    name: 'Others',
                    y: 0.7,
                    dataLabels: {
                        enabled: false
                   }
                }
            ]
        }]
    });
});
code recuperer highcharts
code 2 SQL format JSP

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
<% rs = statement.executeQuery("SELECT * FROM Produits"); %>
<% while (rs.next()) {
out.print ("+ rs.getString("fournisseur")+") ;
} %>
Il est vrai que cela ressemble à une invention à un bricolage
il existe des conflits serveur (jsp) et client (js) mais essayons mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
            data: [
		[<% rs = statement.executeQuery("SELECT * FROM Produits"); %><% while (rs.next()) { out.print ("+rs.getString("marque")+");} %>,24],
                ['B',       26.8],
                ['A',     6.2],
                {
                    name: 'Others',
                    y: 0.7,
                    dataLabels: {
                        enabled: false
                    }
                }
Ce que j'obtiens est l'erreur suivante
An error occurred at line: blahblah in the jsp file: /log/examples/pie-semi-circle/indexe.jsp
The method print(String) in the type JspWriter is not applicable for the arguments (String, String)
Auriez vous une correction à m'infliger sans être sado .

Je vous remercie