diff --git a/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogram.st b/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogram.st index bf818c3..e7b0754 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogram.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogram.st @@ -1,14 +1,15 @@ accessing exportQuotesHistogram - | quotesOccurrences labels diagram x quotesHistogram | + | quotesOccurrences labels diagram quotesHistogram | quotesOccurrences := self quotesSortedByOccurrences. - x := 1 to: quotesOccurrences size. labels := quotesOccurrences keys. quotesHistogram := RSChart new. quotesHistogram extent: 800@200. - diagram := RSBarPlot new x: x y: quotesOccurrences values. + diagram := RSBarPlot new + x: (1 to: quotesOccurrences size) + y: quotesOccurrences values. diagram color: (Color r:(89/255) g:(217/255) b:(95/255)). quotesHistogram addPlot: diagram. quotesHistogram addDecoration: (RSHorizontalTick new diff --git a/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogramWithBars..st b/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogramWithBars..st index 81495ae..e852c45 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogramWithBars..st +++ b/Socialmetrica.package/NitterUser.class/instance/exportQuotesHistogramWithBars..st @@ -1,7 +1,7 @@ accessing exportQuotesHistogramWithBars: aNumberOfBars - | keysToRemove quotes x labels quotesHistogram diagram | + | keysToRemove quotes labels quotesHistogram diagram | quotes := self quotesSortedByOccurrences. (aNumberOfBars > quotes size) ifTrue: [ ^ self exportQuotesHistogram ]. keysToRemove := OrderedCollection new. @@ -9,11 +9,12 @@ exportQuotesHistogramWithBars: aNumberOfBars [ :i | keysToRemove add: (quotes keys at: i + aNumberOfBars) ]. quotes removeKeys: keysToRemove. - x := 1 to: quotes size. labels := quotes keys. quotesHistogram := RSChart new. quotesHistogram extent: 800@200. - diagram := RSBarPlot new x: x y: quotes values. + diagram := RSBarPlot new + x: (1 to: quotes size) + y: quotes values. diagram color: (Color r:(89/255) g:(217/255) b:(95/255)). quotesHistogram addPlot: diagram. quotesHistogram addDecoration: (RSHorizontalTick new diff --git a/Socialmetrica.package/NitterUser.class/instance/exportRepliesHistogramWithBars..st b/Socialmetrica.package/NitterUser.class/instance/exportRepliesHistogramWithBars..st index 2081a93..06c1d5c 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportRepliesHistogramWithBars..st +++ b/Socialmetrica.package/NitterUser.class/instance/exportRepliesHistogramWithBars..st @@ -1,16 +1,16 @@ accessing exportRepliesHistogramWithBars: aNumberOfBars - | tweetsByTimeSpan subtotals repliesColor x tweetsHistogram diagram | + | tweetsByTimeSpan subtotals tweetsHistogram diagram | tweetsByTimeSpan := self collectMessages: [ self replies ] byTimeSpanSplits: aNumberOfBars. subtotals := tweetsByTimeSpan values collect: [ :collection | collection size ]. - repliesColor := (Color r:(246/255) g:(185/255) b:(46/255)). - x := 1 to: subtotals size. tweetsHistogram := RSChart new. tweetsHistogram extent: 800@200. - diagram := RSBarPlot new x: x y:subtotals. - diagram color: repliesColor. + diagram := RSBarPlot new + x: (1 to: subtotals size) + y:subtotals. + diagram color: (Color r:(246/255) g:(185/255) b:(46/255)). tweetsHistogram addPlot: diagram. tweetsHistogram addDecoration: (RSHorizontalTick new fromNames: tweetsByTimeSpan keys; diff --git a/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogram.st b/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogram.st index c53b94a..440de3a 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogram.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogram.st @@ -1,15 +1,16 @@ accessing exportRetweetsHistogram - | retweetsOccurrences labels retweetColor diagram x retweetsHistogram | + | retweetsOccurrences labels retweetColor diagram retweetsHistogram | retweetsOccurrences := self retweetsSortedByOccurrences. retweetColor := (Color r:(217/255) g:(56/255) b: (124/255)). - x := 1 to: retweetsOccurrences size. labels := retweetsOccurrences keys. retweetsHistogram := RSChart new. retweetsHistogram extent: 800@200. - diagram := RSBarPlot new x: x y: retweetsOccurrences values. + diagram := RSBarPlot new + x: (1 to: retweetsOccurrences size) + y: retweetsOccurrences values. diagram color: retweetColor. retweetsHistogram addPlot: diagram. retweetsHistogram addDecoration: (RSHorizontalTick new diff --git a/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogramWithBars..st b/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogramWithBars..st index b63a634..a522892 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogramWithBars..st +++ b/Socialmetrica.package/NitterUser.class/instance/exportRetweetsHistogramWithBars..st @@ -1,7 +1,7 @@ accessing exportRetweetsHistogramWithBars: aNumberOfBars - | keysToRemove retweets x labels retweetsHistogram diagram | + | keysToRemove retweets labels retweetsHistogram diagram | retweets := self retweetsSortedByOccurrences. (aNumberOfBars > retweets size) ifTrue: [ ^ self exportRetweetsHistogram ]. keysToRemove := OrderedCollection new. @@ -9,11 +9,12 @@ exportRetweetsHistogramWithBars: aNumberOfBars [ :i | keysToRemove add: (retweets keys at: i + aNumberOfBars) ]. retweets removeKeys: keysToRemove. - x := 1 to: retweets size. labels := retweets keys. retweetsHistogram := RSChart new. retweetsHistogram extent: 800@200. - diagram := RSBarPlot new x: x y: retweets values. + diagram := RSBarPlot new + x: (1 to: retweets size) + y: retweets values. diagram color: (Color r:(217/255) g:(56/255) b: (124/255)). retweetsHistogram addPlot: diagram. retweetsHistogram addDecoration: (RSHorizontalTick new diff --git a/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars..st b/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars..st index 09387d8..595b502 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars..st +++ b/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars..st @@ -1,16 +1,16 @@ accessing exportTweetsHistogramWithBars: aNumberOfBars - | tweetsByTimeSpan subtotals tweetsColor x tweetsHistogram diagram | + | tweetsByTimeSpan subtotals tweetsHistogram diagram | tweetsByTimeSpan := self collectMessages: [ self tweets] byTimeSpanSplits: aNumberOfBars. subtotals := tweetsByTimeSpan values collect: [ :collection | collection size ]. - tweetsColor := (Color r:(91/255) g:(131/255) b:(222/255)). - x := 1 to: subtotals size. tweetsHistogram := RSChart new. tweetsHistogram extent: 800@200. - diagram := RSBarPlot new x: x y:subtotals. - diagram color: tweetsColor. + diagram := RSBarPlot new + x: (1 to: subtotals size) + y:subtotals. + diagram color: (Color r:(91/255) g:(131/255) b:(222/255)). tweetsHistogram addPlot: diagram. tweetsHistogram addDecoration: (RSHorizontalTick new fromNames: tweetsByTimeSpan keys;