Chart:...Series(3pm)

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

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


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