php_mysql_apache [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

php_mysql_apache [Electronic resources] - نسخه متنی

Julie C. Meloni

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









Q&A




Q1:


How do I use dynamic data to create the slices of a pie chart?



A1:


When creating any image, the start points and drawing lengths do not need to be statically


indicatedthey can be variables whose values are determined by a database, user input, or

calculations within the script. For example, this code creates a red, filled arc of 90[dg]:




ImageFilledArc($myImage, 50, 50, 100, 50, 0, 90, $red, IMG_ARC_PIE);


You could set this up so that the red filled arc at the top of the pie will hold the percentage of

the total for May Sales in a variable called $may_sales_pct. The line then becomes something like this:




ImageFilledArc($myImage, 50, 50, 100, 50, 0, $may_sales_pct, $red, IMG_ARC_PIE);


The number then is filled in from the calculations or database queries in your script. Be sure to add


code to verify that all of your arcs add up to 360.




/ 323