Chart:...Tabular(3pm)
π Chart::Clicker::Decoration::Legend::Tabular β aka the tabular legend, bestie π
okay so first things first: this is a 3pm page, like, from the User Contributed Perl Documentation crew. It's the tea on Chart::Clicker::Decoration::Legend::Tabular, and you're gonna be obsessed.
β¨ NAME β¨
Chart::Clicker::Decoration::Legend::Tabular β it's the Tabular version of Legend. she's a legend who keeps receipts. a table, if u will. π
πΈ VERSION πΈ
version 2.90. iconic. no notes.
π¦ SYNOPSIS π¦
here's the vibe, copy-paste style, exactly as written:
my $cc = Chart::Clicker->new;
my $series1 = Chart::Clicker::Data::Series->new;
my $series2 = Chart::Clicker::Data::Series->new;
$cc->legend(Chart::Clicker::Decoration::Legend::Tabular->new(
header => [ qw(Name Min Max) ],
data => [
[ min(@{ $series1->values }), max(@{ $series1->values }) ],
[ min(@{ $series2->values }), max(@{ $series2->values }) ]
]
));
likeβ¦ she just works. π«Ά
π DESCRIPTION π
Chart::Clicker::Decoration::Legend::Tabular draws a legend on a Chart with tabular data display. so it's a legend, but make it a table. β¨
The Tabular legend is a legend with a few extra attributes that let you pass it data to display. The attributes are header and data. The "header" (optional, so chill) lets you specify the strings to display at the top of the table, and the "data" attribute lets you pass in arrayrefs of strings for display aside each of the series.
β οΈ Note, bestie, read this one: The first string in the "header" arrayref should be the header for the column above the name of the series. This code does not do anything to verify that you've given the appropriate counts of data. It is expected that you will provide "data" with one arrayref for every series, each containing n elements. Having that, "header" will expect n + 1 elements, with one for the series name and the remaining (n) matching the number of elements in each of "data"'s arrayrefs.
translation: she trusts u. she is not checking ur work. do the math urself or perish. π
π ATTRIBUTES π
π border
Set/Get this Legend's border. ur lil frame. ur lil outfit. π
π color
Set/Get the color to use as the foreground for the legend. the lewk. the palette. slay.
π data
Set/Get the data for this legend. Expects an arrayref of arrayrefs, with one inner arrayref for every series charted. arrayrefs inside arrayrefs, it's giving nesting doll energy. πͺ
π font
Set/Get the font used for this legend's items. typography is a personality trait, periodt.
π header
Set/Get the header data used for this legend. Expects an arrayref of Strings. yes, capital-S Strings, we're being fancy. π
π insets
Set/Get this Legend's insets. personal space!! respect it!! π«Ά
π item_padding
Set/Get the padding for this legend's items. breathing room for the little guys. πΈ
β METHODS β
π has_header
Predicate returning true of this legend has a header, else 1.
(yes, that's literally what it says. "of" and "else 1" and all. I am not the one who wrote it, I am merely the messenger. ππ)
π§ AUTHOR π§
Cory G Watson <gphat@cpan.org> β the actual main character who made this happen. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2016 by Cory G Watson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
π and that's the whole page!!perl v5.36.0, dated2022-10-14β that's ur footer, babes, I just folded it into this cute lil sign-off instead of copy-pasting the boring line. go forth and build tables in ur legends, u absolute icon. πβ¨π
π¦ where this page comes from
- ubuntu noble: libchart-clicker-perl 2.90-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libchart-clicker-perl 2.90-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libchart-clicker-perl 2.90-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms