Chart:...Series(3pm)
π NAME π
Chart::Clicker::Data::Series β bestie, it's literally just a series of key/value pairs that represent your chart data. That's the whole vibe. β¨
πΈ VERSION πΈ
This is version 2.90 β iconic behavior, no notes. π
β¨ SYNOPSIS β¨
okay so here's the tea, you set up your keys and your values and then you build:
use Chart::Clicker::Data::Series;
my @keys = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
my @values = (42, 25, 86, 23, 2, 19, 103, 12, 54, 9);
my $series = Chart::Clicker::Data::Series->new({
keys => \@keys,
value => \@values
});
# Alternately, if you prefer
my $series2 = Chart::Clicker::Data::Series->new({
1 => 42,
2 => 25,
3 => 85,
4 => 23,
5 => 2,
6 => 19,
7 => 102,
8 => 12,
9 => 54,
10 => 9
});
two ways to do it, both valid, pick whichever gives you the most main character energy. π¦
π DESCRIPTION π
So Chart::Clicker::Data::Series represents a series of values that you're gonna chart. That's it. That's the job. π
Now here's the important part bestie β despite the name (keys and values), literally everything is expected to be numeric. The values thing is pretty obvious ngl, but the keys also gotta be numeric, because otherwise we'd have absolutely no idea how to order the data. Like, none. Zero. The vibes would be chaos. π
If you want to use text labels for your domain, go check out Chart::Clicker::Axis's tick_labels method instead. iykyk π
π ATTRIBUTES π
ποΈ keys
Set/Get the keys for this series. slay.
β add_to_keys
Adds a key to this series. one at a time, cute.
π·οΈ name
Set/Get the name for this Series. give it a name, it deserves one. β¨
π range
Returns the range for this series. yes bestie, the range. π
π values
Set/Get the values for this series. the actual numbers, the moment we've all been waiting for.
π§ METHODS π§
π’ key_count
Get the count of keys in this series. counting is self-care fr fr.
β add_to_values
Add a value to this series.
π’ value_count
Get the count of values in this series. bestie really said "how many though". π
π« add_pair ($key, $value)
Convenience method to add a single key and a single value to the series. it's giving helpful, it's giving efficient. π«Ά
π get_value_for_key ($key)
Returns the value associated with the specified key. and this one is NECESSARY, okay, because not all series will have values for every key. some keys are out here living their lives unpaired, and we respect that. π
π AUTHOR π
Cory G Watson <gphat@cpan.org> β the icon, the legend. π
π 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. free as in yes bestie go off πΈ
and that's the whole page!! π this was perl v5.36.0, dated 2022-10-14, and it's your girl Chart:...Series(3pm) signing off β stay numeric, stay ordered, and never let anyone tell you your keys don't matter. mwah. π
πβ¨
π¦ 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