Daisuke Maki > Google-Chart-0.09000_05 > Google::Chart::WithData

Download:
Google-Chart-0.09000_05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  13
Open  5
View/Report Bugs
Source  

NAME ^

Google::Chart::WithData - Role For Charts That Have "Plottable" Data

SYNOPSIS ^

    my $chart = Google::Chart->create(...);
    $chart->add_dataset( @args ); # delegates to Google::Chart::Data
                                  # see there for details

ATTRIBUTES ^

data

Google::Chart::Data instance.

data_class

Class name to use when auto-generating the data object. If your chart class needs some extra mangling, you may want to check this or data_traits

data_traits

Role names to be applied to the data object upon creation. If your chart class needs some extra mangling, you may want to check this or data_class

dataset_class

Class name to use when auto-generating the dataset object. If your chart class needs some extra mangling, you may want to check this or dataset_traits

dataset_traits

Role names to be applied to the dataset object upon creation. If your chart class needs some extra mangling, you may want to check this or dataset_class

encoding_class

Name of the Encoding class that will encode your data. See Google::Chart::Encoding::Extended, Google::Chart::Encoding::Simple, and Google::Chart::Encoding::Text

METHODS ^

BUILDARGS

Hooks in to Google::Chart's BUILDARGS, and allows the following extra constructor parameters:

    Google::Chart->create(
        Line => (
            encoding => 'Simple', # Data encoding scheme
        )
    );

add_dataset( @args )

Adds a new dataset. @args are used to instantiate the dataset object, whose class definition is decided by the conbination of dataset_class and dataset_traits

data_encoding( $class [, %args] )

Change the default encoding. This is a convenience function to change the encoding scheme after you've created the object.

get_datasets()

Returns the list (as reference) of the underlying dataset objects.

syntax highlighting: