2022-06-04 00:43:01 +00:00
|
|
|
accessing
|
|
|
|
repliesByWeeksTimeSpan
|
|
|
|
|
|
|
|
| tweetsByTimeSpan xAxis labels |
|
2023-07-26 02:30:24 +00:00
|
|
|
self replies isEmpty
|
|
|
|
ifTrue: [ ^ { OrderedDictionary new.
|
|
|
|
('[''', '0', ''']').
|
|
|
|
('[''', 'No replies', ''']')} ].
|
2022-06-04 00:43:01 +00:00
|
|
|
tweetsByTimeSpan := self collectMessages: [ self replies ] byTimeSpanSplits: self tweetsDivisionsByWeeks.
|
|
|
|
xAxis := OrderedCollection new.
|
|
|
|
(tweetsByTimeSpan values collect: [ :collection | collection size ]) do: [ :number |
|
|
|
|
xAxis add: ($' asString), (number asString), ($' asString)
|
|
|
|
].
|
|
|
|
labels := OrderedCollection new.
|
|
|
|
tweetsByTimeSpan keys do: [ :string |
|
|
|
|
labels add: ($' asString), string, ($' asString)
|
|
|
|
].
|
|
|
|
^ {
|
|
|
|
tweetsByTimeSpan.
|
|
|
|
('[', (',' join: xAxis), ']').
|
|
|
|
('[', (',' join: labels), ']').
|
|
|
|
}
|
|
|
|
|