The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Rest::HtmlVis::Key - Base class for easy-to-use html vis

VERSION

Version 0.01

SYNOPSIS

All you have to do is to inherit from Rest::HtmlVis::Key and then implement the callback html.

Example:

    package Rest::HtmlVis::MyGraph;
        use parent qw( Rest::HtmlVis::Key );
        
        use YAML::Syck;

        sub html {
                my ($self) = @_;

                local $Data::Dumper::Indent=1;
                local $Data::Dumper::Quotekeys=0;
                local $Data::Dumper::Terse=1;
                local $Data::Dumper::Sortkeys=1;

                return '<div class="col-lg-12">'.Dump($self->getStruct).'</div>';
        }

SUBROUTINES/METHODS

new

baseurl

setStruct

getStruct

Return html hash with input structure.

getEnv

Return env variables.

getOrder

Return wight on elemnt on html page. Default 1 means in middle;

blocks

Number of blocks in row. Max 12. (ala bootstrap)

Default is 12;

newRow

Define if element is on new row or is the part of previous row.

Default is 0 - no new row;

Return head of page as HTML string.

Default empty.

onload

Return onload javascript function of onload attr in body. It must ends with ;

Default empty.

html

Return body part of HTML.

Default empty.

AUTHOR

Václav Dovrtěl <vaclav.dovrtel@gmail.com>

BUGS

Please report any bugs or feature requests to github repository.

ACKNOWLEDGEMENTS

Inspired by https://github.com/towhans/hochschober

REPOSITORY

https://github.com/vasekd/Rest-HtmlVis

LICENSE AND COPYRIGHT

Copyright 2015 Vaclav Dovrtel.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.