piePeripheralLabeler(3tk)

πŸ’– piePeripheralLabeler(3tk) β€” the tkpiechart pie peripheral style labeler class πŸ’–

okay bestie, gather round, because we're about to talk about the most underrated little helper in tkpiechart: the piePeripheralLabeler. she places your slice labels. she minds her own business. she's the main character of exactly one job and she does it flawlessly. 🫢


✨ NAME ✨

piePeripheralLabeler β€” it's the tkpiechart pie peripheral style labeler class. that's it, that's her whole rΓ©sumΓ©, and she's iconic for it. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

stooop::new piePeripheralLabeler canvas ?options?

switched::configure piePeripheralLabelerObject ?options?

switched::cget piePeripheralLabelerObject option

🌸 DESCRIPTION 🌸

so here's the vibe: the pie peripheral style labeler object is what you use as a slice label placer for a pie object, and you hand it over to the pie constructor through its -labeler option (peep the pie class manual for that one, bestie).

the slice description text labels get arranged in 2 columns below the pie graphics. meanwhile the slice values? they get placed next to the slice and β€” this is the cute part β€” they actually follow the slice as the pie is updated. like, they're loyal. πŸ₯Ή

each description label text sits to the right of a rectangle, and that rectangle's background color matches its corresponding slice. so it's color-coded, it's coordinated, it's giving organized. and fun fact: each description label is actually a canvasLabel object. πŸŽ€

πŸ’€ and here's the best news: there is no need to delete a piePeripheralLabeler object, because the pie class handles that automatically. you don't have to clean up after her, she cleans up after herself. periodt.

🌈 stooop::new piePeripheralLabeler canvas ?options?

Creates a piePeripheralLabeler object in the specified Tk canvas. you get back the piePeripheralLabeler object identifier (referred to as piePeripheralLabelerObject in this whole document, so remember that name, iykyk).

🌈 switched::configure piePeripheralLabelerObject ?options?

Configures a piePeripheralLabeler object β€” OR, if you pass zero options as parameters, it just returns all the options with their current values. no options? she's giving you the whole inventory. ✨

🌈 switched::cget piePeripheralLabelerObject option

Returns an option value for the specified piePeripheralLabeler object. one option, one answer, no small talk. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

  • -font value β€” specifies a font for the slice labels. if you don't specify it, the default font is system dependent. so like, she's dressed by the environment, not by you. πŸ™ˆ
  • -justify value β€” specifies how to justify labels within their own column. must be one of left, center or right. defaults to left. for example, if justification is right, all column labels' right edges are aligned. so everyone lines up on the same side, very synchronized. ✨
  • -offset value β€” specifies the distance between the pie graphics and the closest slice label. this value may be specified in any of the forms described in the canvas COORDINATES manual section. so go wild, use whatever coordinate format the canvas gods allow. 🧚
  • -smallfont β€” specifies a font for the slice values. it's usually a small font so the values don't overlap when 2 slices are very close to each other (tight proximity is real and we must respect it πŸ’€). if not specified, the description label font (that's the -font option) is used instead.
  • -widestvaluetext β€” specifies a string of maximum width for slice values (the ones placed around the pie next to the slices), so that enough room gets allocated for these value labels when the pie width and height are set. it defaults to 00.0. for example, it could be set to "00.00 %". plan ahead bestie, future you says thank you. 🫢

πŸŽ€ TAGS πŸŽ€

the labeler has this one specific tag (check the canvas manual page ITEM IDS AND TAGS section for more info, fr fr):

  • piePeripheralLabeler(piePeripheralLabelerObject)

😭 BUGS, IDEAS, FEEDBACK 😭

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. like, she's honest about it. please report such things in the category tkpiechart of the Tklib Trackers at [http://core.tcl.tk/tklib/reportlist]. and please also report any ideas for enhancements you may have for either the package and/or the documentation β€” bestie feedback is how we all grow. πŸ’œ


🌈 SEE ALSO 🌈

canvasLabel, pie, pieBoxLabeler


⭐ KEYWORDS ⭐

canvas, labeler, pie, slice


Copyright (c) 1995-2004 Jean-Luc Fontaine <jfontain@free.fr>


and that's the whole page, bestie!! πŸ’… this was tklib 6.6, and the whole thing is dated right there in the footer with piePeripheralLabeler(3tk). go place some slice labels, you absolute legend. πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from