--- title: "Pie Chart (LISTing)" id: 79581 type: "computer_media" slug: "pie-chart-listing" url: "http://localhost/computer_media/pie-chart-listing/" markdown_url: "http://localhost/computer_media/pie-chart-listing.md" published_at: "2026-11-22T19:36:03+00:00" modified_at: "2026-11-22T19:36:03+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/pie-chart-3.png" excerpt: "Draws a pie chart of up to fifteen values on the TS2068." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bill Gunter" slug: "bill-gunter" taxonomy: "indiv" url: "http://localhost/indiv/bill-gunter/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "Bill Gunter" slug: "bill-gunter" taxonomy: "indiv" url: "http://localhost/indiv/bill-gunter/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Pie%20Chart%20%28LISTing%29%20%281985%29%28Gunter%2C%20Bill%29%28TS2068%29%28Program%29.zip" tsrun_member: "Pie Chart (LISTing) (1985)(Gunter, Bill)(TS2068)(Program)/Pie Chart (LISTing) (1985)(Gunter, Bill)(TS2068)(Program).tap" mediadate: "1985" images: - url: "http://localhost/wp-content/uploads/2026/11/pie-chart-3.png" - url: "http://localhost/wp-content/uploads/2026/11/pie-chart-1.png" - url: "http://localhost/wp-content/uploads/2026/11/pie-chart-2.png" - url: "http://localhost/wp-content/uploads/2026/11/pie-chart-4.png" article_media: - id: 46119 title: "Pie Chart" type: "article" url: "http://localhost/article/pie-chart-2/" - id: 37641 title: "Programs: Pie Chart, Boxes" type: "article" url: "http://localhost/article/programs-pie-chart-boxes/" media_type_tags: "Graphics" license: false --- # Pie Chart (LISTing) Draws a pie chart of up to fifteen values and lists each value with its whole-number percentage. The title screen is signed Billy and dated 7/18/84. RUN it, enter how many items and then each value, and press a lower-case c for another chart. The first value must not be zero. First printed in [Time Designs, January/February 1985](https://timexsinclair.com/article/programs-pie-chart-boxes/). Its title screen is dated 7/18/84. Published in LISTing November 1990 ([Pie Chart](https://timexsinclair.com/article/pie-chart-2/)). ## Source Code ``` 5 DIM n(15) 6 GO SUB 200 7 BORDER 6: PAPER 6: INK 0: CLS 10 LET x=180: LET y=87: LET z=50 15 FOR i=3 TO 18: PAPER 1: PRINT AT i,14;" ": NEXT i 17 INK 7 20 CIRCLE x,y,z 30 PLOT x,y: DRAW z,0 35 PAPER 6: INK 0 40 PRINT AT 0,0;"enter number of items" 50 INPUT t 60 PRINT AT 0,0;"enter value each item- " 65>LET s=0 70 FOR i=1 TO t 80 INPUT n(i) 82 PRINT AT 0,24;n(i);" " 85 LET s=s+n(i) 90 NEXT i 92 PRINT AT 0,0;" BILLY'S PIE CHART " 95 LET j=0 100 FOR i=1 TO t 110 LET d=s/(n(i)+j) 115 LET j=j+n(i) 120 LET d=(2*PI)/d 130 LET a=COS d*z: LET b=SIN d*z 135 INK 7 140 PLOT x,y: DRAW a,b 145 INK 0 150 PRINT AT i+3,0;i 151 PRINT AT i+3,3;n(i) 152 PRINT AT 2,0;"# value %" 153>PRINT AT i+3,11;INT ((n(i)/s)*100) 160 NEXT i 165 PRINT AT 21,5;"TO CONTINUE PRESS ""c""" 170 IF INKEY$="c" THEN GO TO 7 180 GO TO 170 200 BORDER 1: PAPER 1: INK 7 205 CLS 210 PRINT AT 10,11;"PIE CHART" 220 PRINT AT 11,14;"by" 230 PRINT AT 12,12;"BILLY" 240 PRINT AT 21,25;"7/18/84" 250 PAUSE 100: CLS : RETURN ```