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 extent: 800@200.
|
||||
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.
|
||||
@ -33,14 +32,4 @@ exportTweetsHistogramWithBars: aNumberOfBars
|
||||
integer;
|
||||
fontSize: 72 /aNumberOfBars).
|
||||
tweetsHistogram build.
|
||||
tweetsHistogram canvas pngExporter
|
||||
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'
|
||||
^ tweetsHistogram canvas exportAsFileNamed: 'tweets-histogram' into: self folder
|
@ -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