Welcome Guest, Not a member yet? Register   Sign In
gVis - Google Visualization Library
#11

[eluser]whobutsb[/eluser]
Congrats! Blame it on the ghost in the machine, happens to me all the time. One minute going along coding everything is fine, refresh, bam nothing works, give up, and go to bed, wake up the next day and refresh, everything works fine!

With that all said and done, can you suggest any improvements to the library? I think I'm going to rename set_header to set_column, because that is more relevant to what you are actually doing.
#12

[eluser]naim[/eluser]
I'm very grateful for your helpSmile!

You can also try to implement overrided add_row($name, $value, $color),
maybe some drill-down charts - but that's probably a bigger part to doSmile
#13

[eluser]whobutsb[/eluser]
Drill downs you would need to start implementing javascript events (click) which Google visualization does support. I might take a stab at that one day Wink
#14

[eluser]naim[/eluser]
Great, i will use gvis in my poll generator and in analitical module Smile
If you'll make that add_row with color code then the tool will be complete for meSmile
#15

[eluser]whobutsb[/eluser]
Just added the set_colors method:

You can use it with the updated gVis Library:
http://codeigniter.com/wiki/gVis_-_Googl...n_Library/

Usage:
Code:
$this->gvis->set_colors('Red', '#00d607', '0044d6');
or
$this->gvis->set_colors(array('Red', '#00d607', '0044d6'));

Cheers!
#16

[eluser]naim[/eluser]
I mean set different colors for different row - could you change that? :-)
#17

[eluser]Andres F.[/eluser]
Fantastic contribution! Tried your library yesterday and it worked like a charm! Thanks for doing this.

I might work on the ability to set the Gauge options easily, or if you have that planned for a future release, that would be great.

By the way, the wiki shows set_header, but I believe it should be set_heading... didn't want to change it if you plan on setting it back for some reason.

Thanks again,
Andres
#18

[eluser]Mat-Moo[/eluser]
This is pretty neat library! Lot of options though via this library, I wanted to do filled area chart and wanted to set fill :25%. So I added to the library
Code:
var $custom = array();

function add_custom($customarray)
{
$this->custom = array_merge($this->custom,$customarray);
}

// mod the generate
$data .= "chart.draw(gData, {
            height:        ".$this->height.",
            width:      ".$this->width.",
            title:         '".$this->title."',
            is3D:          ".$this->is3D.",
            legend:     '".$this->legend."', ";
            
        // add additional options;
        foreach($this->custom as $option=>$value)
        {
            $data.="$option: $value,";
        }
        
        $data .="colors:     [".$this->_compile_colors()."]
        });\n";

Then it's pretty easy to add custom options, e.g.
Code:
$this->gvis->add_custom(array("fill" => "25"));
#19

[eluser]Unknown[/eluser]
please include OrgChart... thanx...




Theme © iAndrew 2016 - Forum software by © MyBB