Chart:...Tabular(3pm)

πŸ“¦
version 2.90 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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.

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. πŸ‘‘


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, dated 2022-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