/* calcul des statistiques par type de véhicule */ ODS OUTPUT summary = work.stats ; PROC MEANS DATA = livre.voitures MEAN ; VAR conso_: ; CLASS type ; RUN ; /* jointure avec les données pour le graphique */ PROC SORT DATA = livre.voitures OUT = work.voitures ; BY type ; RUN ; DATA work.voitures ; MERGE work.voitures work.stats ; BY type ; LENGTH bulle $ 200 ; /* prévoir une longueur importante */ bulle = 'TITLE="Conso moyenne...'!!"0A"x!! /* "0A"x = retour à la ligne */ "ville : " !!PUT(conso_ville_mean, NUMX6.1)!!" L/100 km"!!"0A"x!! "autoroute : "!!PUT(conso_auto_mean , NUMX6.1)!!' L/100 km"' ; bulle = COMPBL(bulle) ; /* élimination des blancs inutiles */ RUN ; ODS HTML FILE="c:\temp\infobulles.htm" ; PROC GCHART DATA=work.voitures ; PIE3D type / TYPE=PERCENT EXPLODE="Familiale" HTML=bulle ; RUN ; QUIT ; ODS HTML CLOSE ;