NAME

Chart::Plotly::Image - Export static images of Plotly charts

VERSION

version 0.041

SYNOPSIS

    use Chart::Plotly::Plot;
    use Chart::Plotly::Trace::Scatter;
    use Chart::Plotly::Image qw(save_image);

    my $plot = Chart::Plotly::Plot->new(
        traces => [
            Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] )
        ]
    );
    save_image(file => 'TestOrca.png', plot => $plot,
               width => 1024, height => 768,
               engine => 'auto');

DESCRIPTION

This module generate static images of Plotly charts.

It internally uses either of below modules,

FUNCTIONS

save_image

    save_image(file => $file, plot => $plot,
               width => $width, height => $height,
               engine => $engine,
               %rest)

Parameters

  • file

    Image file path.

  • engine

    One of "auto", "kaleido", "orca". Default is "auto", it tries in this order: kaleido, orca.

  • orca_server

    If this parameter is specified it will use Chart::Plotly::Image::Orca::Client.

    For example,

        save_image(file => $file, plot => $plot,
                   width => $width, height => $height,
                   orca_server => 'http://localhost:9999')
  • %rest

    Rest parameters are passed through to the lower-level functions.

BUGS

Please report any bugs or feature requests via github: https://github.com/pablrod/p5-Chart-Plotly/issues

DISCLAIMER

This is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly. But I think plotly.js is a great library and I want to use it with perl.

If you like plotly.js please consider supporting them purchasing a pro subscription: https://plot.ly/products/cloud/

SEE ALSO

Chart::Kaleido::Plotly, Chart::Plotly::Image::Orca, Chart::Plotly::Image::Orca::Client,

AUTHOR

Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2020 by Pablo Rodríguez González.

This is free software, licensed under:

  The MIT (X11) License