NAME

Chart::GGPlot::Backend::Plotly::Geom - Role for geom-specific details with the Plotly backend

VERSION

version 0.0003

METHODS

use_webgl

use_webgl($df)

Returns a boolean value for whether or not to use webgl, like for scatter plots where Plotly is very slow to generate SVG when the data count is large. Now it decides by comparing the data count in $df against variable $Chart::GGPlot::Backend::Plotly::WEBGL_THRESHOLD. The variable can be adjusted by like,

$Chart::GGPlot::Backend::Plotly::WEBGL_THRESHOLD = 2000;

to_trace

to_trace($df, $params, $plot)

This shall be implemented by consumers of this role. It should return an arrayref of Chart::Plotly::Trace::X objects.

make_hovertext

make_hovertext($df, ArrayRef $hover_labels)

This method is called by Chart::GGPlot::Backend::Plotly for preparing Plotly hovertext. $hover_labels is an associative arrayref that maps aes names to hover text labels.

SEE ALSO

Chart::GGPlot::Backend::Plotly

AUTHOR

Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.