Creating extension for roassal for exporting histograms.
This commit is contained in:
parent
215e83d66e
commit
fdeecc5fde
@ -20,7 +20,6 @@ exportTweetsHistogramWithBars: aNumberOfBars
|
|||||||
tweetsHistogram := RSChart new.
|
tweetsHistogram := RSChart new.
|
||||||
tweetsHistogram extent: 800@200.
|
tweetsHistogram extent: 800@200.
|
||||||
diagram := RSBarPlot new
|
diagram := RSBarPlot new
|
||||||
x: (1 to: subtotals size)
|
|
||||||
y:subtotals.
|
y:subtotals.
|
||||||
diagram color: (Color r:(91/255) g:(131/255) b:(222/255)).
|
diagram color: (Color r:(91/255) g:(131/255) b:(222/255)).
|
||||||
tweetsHistogram addPlot: diagram.
|
tweetsHistogram addPlot: diagram.
|
||||||
@ -33,14 +32,4 @@ exportTweetsHistogramWithBars: aNumberOfBars
|
|||||||
integer;
|
integer;
|
||||||
fontSize: 72 /aNumberOfBars).
|
fontSize: 72 /aNumberOfBars).
|
||||||
tweetsHistogram build.
|
tweetsHistogram build.
|
||||||
tweetsHistogram canvas pngExporter
|
^ tweetsHistogram canvas exportAsFileNamed: 'tweets-histogram' into: self folder
|
||||||
zoomToShapes;
|
|
||||||
noFixedShapes;
|
|
||||||
fileName: (self folder / 'tweets-histogram.png')fullName;
|
|
||||||
export.
|
|
||||||
tweetsHistogram canvas pdfExporter
|
|
||||||
zoomToShapes;
|
|
||||||
noFixedShapes;
|
|
||||||
fileName: (self folder / 'tweets-histogram.pdf')fullName;
|
|
||||||
export.
|
|
||||||
^ self folder / 'tweets-histogram.png'
|
|
@ -0,0 +1,14 @@
|
|||||||
|
*Socialmetrica
|
||||||
|
exportAsFileNamed: aName into: aFolder
|
||||||
|
|
||||||
|
self pngExporter
|
||||||
|
zoomToShapes;
|
||||||
|
noFixedShapes;
|
||||||
|
fileName: (aFolder / (aName, 'png')) fullName;
|
||||||
|
export.
|
||||||
|
"self pdfExporter
|
||||||
|
zoomToShapes;
|
||||||
|
noFixedShapes;
|
||||||
|
fileName: (aFolder / (aName, 'pdf')) fullName;
|
||||||
|
export."
|
||||||
|
^ aFolder / aName, 'png'
|
3
Socialmetrica.package/RSCanvas.extension/properties.json
Normal file
3
Socialmetrica.package/RSCanvas.extension/properties.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"name" : "RSCanvas"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user