NAME

Chart::OFC2::Element - OFC2 base module for chart elements

SYNOPSIS

    use Moose;
    extends 'Chart::OFC2::Element';

DESCRIPTION

PROPERTIES

    has 'type_name'    => (is => 'rw', isa => enum([qw(
        bar bar_3d bar_filled bar_glass
        pie
        hbar
        line line_dot line_hollow
        area_hollow
        scatter
    )]), required => 1);
    has 'values'       => (is => 'rw', isa => 'ArrayRef', trigger => sub { $_[0]->extremes->reset('y' => $_[1]); } );
    has 'extremes'     => (is => 'rw', isa => 'Chart::OFC2::Extremes',  default => sub { Chart::OFC2::Extremes->new() }, lazy => 1, coerce  => 1);
    has 'use_extremes' => (is => 'rw', isa => 'Bool',  default => 0 );
    has 'on-click'     => (is => 'rw', isa => 'Str', );
    has 'tip'          => (is => 'rw', isa => 'Str',);
    has 'alpha'        => (is => 'rw', isa => 'Num',);
    has 'colour'       => (is => 'rw', isa => 'Str',);
    has 'text'         => (is => 'rw', isa => 'Str',);

METHODS

new()

Object constructor.

TO_JSON()

Returns HashRef that is possible to give to encode_json() function.

AUTHOR

Jozef Kutej