[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-windows
Subject:    [PHP-WIN] graphs in flash to be integrated with php
From:       toby z <blue_myth_1 () yahoo ! com>
Date:       2003-08-27 12:03:58
[Download RAW message or body]

hay guyz

im stuck with graphs again ......

i am generating bar graphs in simple php code 

now i have to replace these with "folor-full" pie charts in flash

i came accross 2 good flash pie-charts on the net but im clueless as
how i can integrate my php code with either one of these .....

n the one i like better has just these few lines for code:

// Copyright 2001 Zymotik.com
// Created by Ian Brown 3/7/2001
// Last Update: 5/7/2001
// set your colours!
// number of colours
colournum = 7;
// the colours in hex vars
// RRGGBB ( Hex Values! )
colour1 = 0x9CD3F5;
colour2 = 0x62B6F0;
colour3 = 0x0593E2;
colour4 = 0x0056C2;
colour5 = 0x004E9E;
colour6 = 0x003868;
colour7 = 0x002B47;


==========================================================

second flash pie chart:

stop();
// setup tooltip text field
this.fmtToolTip = new TextFormat();
this.fmtToolTip.font = "Arial";
this.fmtToolTip.size = 12;
this.createTextField("textToolTip", 1000, 0, 0, 1, 1);
this.textToolTip.autoSize = true;
this.textToolTip._visible = false;
this.textToolTip.border = true;
this.textToolTip.multiline = true;
this.textToolTip.selectable = false;
this.textToolTip.background = true;
this.textToolTip.backgroundColor = 0xFFFFE0;
newLabel = "";
newValue = "";
scale = 80;
n = 6;
rad = 200;
aValue = new Array(n);
aLabel = new Array(n);
for (var i = 0; i<n; i++) {
    aValue[i] = 30+Math.random()*100;
    aLabel[i] = "Label "+i;
}
attachMovie("panel", "panel", 3);
panel._x = 5;
panel._y = 5;
attachMovie("piegraph", "pg", 2);
pg._x = 400;
pg._y = 250;
pg._xscale = pg._yscale=scale;
pg.setRadius(rad);
function addNewSlice() {
    var val;
    if (newLabel == "" && newValue == "") {
        val = Math.round(30+Math.random()*100);
        pg.addSlice(val, "Label "+val);
    } else {
        val = parseFloat(newValue);
        pg.addSlice(val, newLabel);
    }
    newLabel = "";
    newValue = "";
}
function removeAllSlices() {
    pg.removeAll();
}
function shrink() {
    scale -= 10;
    if (scale<10) {
        scale = 10;
    }
    pg._xscale = pg._yscale=scale;
}
function grow() {
    scale += 10;
    if (scale>100) {
        scale = 100;
    }
    pg._xscale = pg._yscale=scale;
}
function showLabels(bShow) {
    pg.displayLabels(bShow);
}
function showToolTip(str) {
    this.textToolTip.text = str;
    this.textToolTip.setTextFormat(this.fmtToolTip);
    this.textToolTip._x = this._xmouse;
    this.textToolTip._y = this._ymouse-this.textToolTip._height;
    this.textToolTip._visible = true;
}
function hideToolTip() {
    this.textToolTip.text = "";
    this.textToolTip._visible = false;
}
function isToolTipVisible() {
    return this.textToolTip._visible;
}


==============================================================


now for my bar graphs code i pass "rprt_gf.php" 3 variables

1. title of hte graph
2. graph data
3. label == months


===============================================================


i cnt think of a proper and neat way to get about all this

i would really appriciate any ideas 

thnx a million guyz .....


eternally stuck .......
toby ......



________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic