This shows you the differences between two versions of the page.
fr:pie [2016/01/01 22:45] |
fr:pie [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Pie ===== | ||
+ | ==== Format ==== | ||
+ | |||
+ | **pie** // | ||
+ | **pie** ( // | ||
+ | |||
+ | |||
+ | ==== Description ==== | ||
+ | Dessine une part de camembert (comme celles des histogrammes circulaires), | ||
+ | |||
+ | ==== Exemple ==== | ||
+ | |||
+ | < | ||
+ | # pie_chart.kbs | ||
+ | # 2012-12-29 j.m.reneau | ||
+ | # 2013-08-27 Traduction des commentaires en français par Philippe RICHARD | ||
+ | # exemple avec l' | ||
+ | |||
+ | dim data(5) | ||
+ | data = {1, | ||
+ | dim colors(5) | ||
+ | colors = {red, | ||
+ | total = 0 | ||
+ | for n = 0 to data[?]-1 | ||
+ | total += data[n] | ||
+ | next n | ||
+ | |||
+ | clg | ||
+ | font " | ||
+ | startangle = 0 | ||
+ | for n = 0 to data[?]-1 | ||
+ | # Calcul la largeur de la part de camembert en radian | ||
+ | | ||
+ | color colors[n] | ||
+ | pie 50, | ||
+ | # Dessine le nombre correspondant en dehors de la part de camembert | ||
+ | text 140+sin(startangle+slicesize*.5)*120, | ||
+ | | ||
+ | next n</ | ||
+ | Ceci affichera: | ||
+ | {{: | ||
+ | |||
+ | ==== Disponible depuis la version ==== | ||
+ | 0.9.9.25 | ||
+ | |||
+ | ==== Voir Aussi ==== | ||
+ | {{page> |