18 lines
547 B
Smalltalk
18 lines
547 B
Smalltalk
accessing
|
|
retweetsReportData
|
|
|
|
| tempDict labels xAxis |
|
|
tempDict := self retweets asMessagesUserNamesSortedByOccurrences.
|
|
|
|
tempDict size > 10 ifTrue: [
|
|
tempDict := (tempDict associations copyFrom: 1 to: 10) asOrderedDictionary ].
|
|
|
|
labels := tempDict keys.
|
|
labels := labels collect: [ :profile | ($' asString), '@', profile, ($' asString) ].
|
|
xAxis := tempDict values.
|
|
xAxis := xAxis collect: [ :value | ($' asString), (value asString), ($' asString) ].
|
|
^ {
|
|
tempDict.
|
|
('[', (',' join: xAxis), ']').
|
|
('[', (',' join: labels), ']').
|
|
} |