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

NAME

Chart::Plotly::Image::Orca - Export static images of Plotly charts using orca

VERSION

version 0.024

SYNOPSIS

 #!/usr/bin/env perl 
 
 use strict;
 use warnings;
 use utf8;
 
 use Chart::Plotly::Plot;
 use Chart::Plotly::Trace::Scatter;
 use Chart::Plotly::Image::Orca;
 
 my $plot = Chart::Plotly::Plot->new(traces => [ Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] )]);
 
 Chart::Plotly::Image::Orca::orca(plot => $plot, file => "TestOrca.png");

DESCRIPTION

This module generate static images of Plotly charts without a browser using Orca

Orca is an Electron app that must be installed before using this module. You can either,

FUNCTIONS

orca

    orca(plot => $plot, file => $file, %rest)

Export Chart::Plotly::Plot as a static image file.

This function is a wrapper over the plotly orca command. Most of its named parameters are mapped to orca's command line options. See also the output of orca graph --help.

Returns a true value if the orca command is successful.

plot

Object to export

file

Filename (with or without path) to export

format

Sets the output format (png, jpeg, webp, svg, pdf, eps). By default it's inferred from the specified file name extension.

scale

Sets the image scale.

width

Sets the image width.

height

Sets the image height.

mathjax

Sets path to MathJax files. Required to export LaTeX characters.

safe

Turns on safe mode: where figures likely to make browser window hang during image generating are skipped.

verbose

Turn on verbose logging on stdout.

debug

Starts app in debug mode and turn on verbose logs on stdout.

correct_orca

Checks that orca command available is the plotly image exporter, as there may be some other different command also named "orca", like https://help.gnome.org/users/orca/stable/

orca_available

Checks that orca command is available and the plotly image exporter

orca_version

Returns the orca version

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

Alien::Plotly::Orca

AUTHOR

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

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

  The MIT (X11) License