NAME
Chart::GGPlot::Backend::Plotly::Util - Utilities used by Chart::GGPlot::Backend::Plotly
VERSION
version 0.0007
FUNCTIONS
group_to_NA
group_to_NA($df, :$group_vars=['group'],
:$nested=[], :$ordered=[], :$retrace_first=false)
If a group of scatter traces share the same non-positional characteristics (i.e., color, fill, etc), it is more efficient to draw them as a single trace with missing values that separate the groups (instead of multiple traces) In this case, one should also take care to make sure connectgaps is set to false.
Returns a data frame with rows ordered by $nested
then $group_vars
then $ordered
. As long as $group_vars
contains valid variable names, new rows will be inserted to separate the groups, at places where group changes in each chunk of same $nested
values.
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.