NAME

Chart::OFC2::Legend - OFC2 legend object

SYNOPSIS

use Chart::OFC2;
use Chart::OFC2::Legend;

$chart = Chart::OFC2->new(
    'x_legend'  => 'Legend for the X axis',
);

$chart = Chart::OFC2->new(
    'x_legend'  => Chart::OFC2::Legend->new(
        'text'  => 'Legend for the X Axis',
        'style' => '{font-size:20px; font-family:Verdana; text-align:center;}',
    ),
);

DESCRIPTION

PROPERTIES

has 'text'  => (is => 'rw', isa => 'Str', );
has 'style' => (is => 'rw', isa => 'Str', );

METHODS

new()

Object constructor.

TO_JSON()

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

AUTHOR

Robin Clarke