Programming | Pie Chart | object
Common functions
Convert Angle to radians
function Deg2arc ($degrees) {
Return ($degrees * (pi ()/180.0));
}
Rgb
function getRGB ($color) {
$R = ($color >>16) 0xFF;
$G = ($color >>8) 0xFF;
$B = ($color) 0xFF;
Return (Array ($R, $G, $B));
}
Gets the value of the x,y point on the ellipse with the Ellipse Heart as (0,0)
function Pie_point ($deg, $va, $VB) {
$x = cos (DEG
Asp.net| Pie chart topn3dpie.aspx
------------------
Topn3dpie.aspx.cs
-----------------
Using System;
Using System.Collections;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Web;
Using System.Web.SessionState;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.HtmlControls;
Using System.Drawing.Imaging;
Using System.Drawing.Drawing2D;
Using Syste
PHP object programming to implement a 3D pie chart lt ;? Php
// Public functions
// Converts degrees to radians
Function deg2Arc ($ degrees ){
Return ($ degrees * (pi ()/180.0 ));
}
// RGB
Function getRGB ($ color ){
$ R = ($ color> 16) 0xff;
$ G = ($ color> 8) 0xff;
$ B = ($ color) 0xff;
Return (array ($ R, $ G, $ B ));
}
// Obtain the values of the x an
Php uses Jpgraph to draw a 3D pie chart.
This article describes how php uses Jpgraph to draw a 3D pie chart. Share it with you for your reference. The specific implementation method is as follows:
Run the following command:
Common functions
Convert Angle to radians
function Deg2arc ($degrees) {
Return ($degrees * (pi ()/180.0));
}
Rgb
function getRGB ($color) {
$R = ($color >>16) 0xFF;
$G = ($color >>8) 0xFF;
$B = ($color) 0xFF;
Return (Array ($R, $G, $B));
}
Gets the value of the x,y point on the ellipse with the Ellipse Heart as (0,0)
function Pie_point ($deg, $va, $VB) {
$x = cos (DEG2ARC ($deg)) * $VA;
$y = sin (Deg2arc ($deg)) * $VB;
Return (Array ($x, $y));
}
3D
Since my "VC6 3D pie chart," Do a good job, because there are bugs, the mind always feel uncomfortable, through the tips of netizens, thinking, after the suddenly enlightened--VC is so powerful, should not be such a simple problem, do up so troublesome! Or was it misled by the. NET author?
In fact, the original idea is the best way! , it just needs a little modi
? Php public functions convert degrees to radians functiondeg2Arc ($ degrees) {return ($ degrees * (pi () 180.0);} RGBfunctiongetRGB ($ color) {$ R ($ color16) 0xff; $ G ($ color8) 0xff; $ B ($ color) 0xff; return (array ($ R, $ G, $ B ));} obtain x from an elliptic with an elliptic center of (0, 0 ).
// Public functions
// Converts degrees to radians
Function deg2Arc ($ degrees ){
Return ($ degrees * (pi ()/180.0 ));
}
// RGB
Function getRGB ($ color ){
$ R = ($ color> 16) 0xff;
$ G = ($ co
This example describes how PHP uses Jpgraph to draw a 3D pie chart. Share to everyone for your reference. The implementation methods are as follows:
The Operation effect chart is as follows:
I hope this article will help you with your PHP program design.
Common functions
Convert the angle to radians
function Deg2arc ($degrees) {
Return ($degrees * (pi ()/180.0));
}
Rgb
function getRGB ($color) {
$R = ($color >>16) 0xFF;
$G = ($color >>8) 0xFF;
$B = ($color) 0xFF;
Return (Array ($R, $G, $B));
}
Gets the value of the X, Y point on an ellipse with an elliptical heart (0,0)
function Pie_point ($deg, $va, $VB) {
$x = cos (DEG2ARC ($deg)) * $VA;
$y = sin (Deg2arc ($deg)) * $VB;
Return (Array ($x, $y));
}
3D
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.