Created
February 12, 2018 16:42
-
-
Save philippeback/11f9f15ccb8d8805b6b3e0a3262a6210 to your computer and use it in GitHub Desktop.
RTInteractionPopup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b := RTGrapher new. | |
b extent: 200 @ 150. | |
ds := RTData new. | |
ds interaction popup group: [:group :aClassElement | | |
| background label | | |
b2 := RTPieBuilder new. | |
b2 shape color: [ Color random ]. | |
b2 objects: aClassElement model rtmethods. | |
b2 slice: #numberOfLinesOfCode. | |
b2 build. | |
background := (RTBox new color: Color white trans) element. | |
RTNest new | |
centerOn: background | |
elements: b2 view elements. | |
label := (RTLabel new | |
color: Color white; | |
text: aClassElement model) element. | |
TRConstraint move: label above: background. | |
group | |
add: label; | |
add: background; | |
addAll: b2 view elements. | |
]. | |
ds points: {String. OrderedCollection. Set. Array}. | |
ds y: [ :cls | cls rtmethods size ]. | |
ds barShape rectangle color: Color lightBlue. | |
b add: ds. | |
b axisX; axisYWithNumberOfTicks: 4. | |
b build. | |
^ b view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment