Graph-Chart

 view release on metacpan or  search on metacpan

Graph-Chart_example.pl  view on Meta::CPAN

                space => 50,
                align => 'right',
                 rotation => -30,
            },
        },
	}
	);
;

my $res =$graph->data(
    {
        layer     => 4,
	set       => $dot_reduced ,
        type      => 'line',
        bar_size  => 1,
        color     => '0x00ff00',
#		color => [
#	'0xff0000',
#	'0xff0000',
#	'0xff0000',
#	'0xff0000',
#	'0x00ff00',
#	'0x00ff00',
#	'0x00ff00',
#	'gdTransparent',
#	'gdTransparent'
#	],
        thickness => 1,
#	offset   => 200,
#	scale => 1,
        scale => '90%',
#        scale => $max,
#        scale =>'auto',
#        scale => 'log',
#	scale => 'ln',
    }
);
#my $res =$graph->data;
#say Dumper(scalar(@{($graph->{ data })->[4]->{set}}));

#$graph->data(
#    {
#        layer => 0,
#        set   => \@dot,
#        type  => 'line',
#	bar_size => 1,
#        color => '0xff0000',
#	thickness => 5,
##        scale => 1.1,
##        scale => 'auto',
#    }
#);
my @alarm;
for ( 90 .. 180 )
{
    $alarm[$_] = 1;

}

#
#$graph->overlay(
#{
#	layer => 1,
#	set   => \@alarm,
#	color => '0xFFFECE',
##	color => '0xFFD2D2',
#	opacity => 100,
#	type => 'pie',
#	merge  => 1,
##	debord => 50,
#}
#);
#
#my @alarm1;
#for ( 100 .. 250 )
#{
#$alarm1[ $_  ] = 1;
#
#}
#
#
#$graph->overlay(
#{
#	layer => 0,
#	set   => \@alarm1,
#	color => '0xFFD2D2',
#	opacity => 100,
#	merge  => 0,
#	type => 'pie',
#}
#);

#$graph->glyph(
#    {
#        x => 0,
#        y => 0,
#
#        color => '0x00ff00',
#        data  => [
#            [ 0,   0 ],
#            [ 20,  4 ],
#            [ 0,   4 ],
#            [ 0,   4 + 20 ],
#            [ 0,   4 ],
#            [ -20, 4 ],
#            [ 0,   0 ]
#
#          ]
#
#    }
#);

say "xmax=".$graph::x_active_max;

$graph->glyph(
    {
        x     => $graph->active->{ x }{min} + 200,
        y     => $graph->active->{ y }{max},
        type  => 'filled',
        color => '0x00FFff',
        data  => [
            [ 0,  0 ],
            [ 8,  10 ],
            [ 0,  10 ],
            [ 0,  10 + 20 ],
            [ 0,  10 ],
            [ -8, 10 ],
            [ 0,  0 ]
          ]
    }
);

#$graph->glyph(
#    {
#        x => 'active_min',
#        y => 'active_min',
#
##        color     => '0xff0000',
#	color => [
#	'0xff0000',
#	'0xff0000',
#	'0xff0000',



( run in 2.623 seconds using v1.01-cache-2.11-cpan-13bb782fe5a )