diff --git a/src/Roassal-Builders/RSAbstractContainerBuilder.class.st b/src/Roassal-Builders/RSAbstractContainerBuilder.class.st index 633d27d3..10ff6820 100644 --- a/src/Roassal-Builders/RSAbstractContainerBuilder.class.st +++ b/src/Roassal-Builders/RSAbstractContainerBuilder.class.st @@ -2,7 +2,9 @@ I have here for compatibility. Use `RSBuilder` " Class { - #name : #RSAbstractContainerBuilder, - #superclass : #RSBuilder, - #category : #'Roassal-Builders-Core' + #name : 'RSAbstractContainerBuilder', + #superclass : 'RSBuilder', + #category : 'Roassal-Builders-Core', + #package : 'Roassal-Builders', + #tag : 'Core' } diff --git a/src/Roassal-Builders/RSAbstractShapesBuilder.class.st b/src/Roassal-Builders/RSAbstractShapesBuilder.class.st index b7ca0b77..34adfb67 100644 --- a/src/Roassal-Builders/RSAbstractShapesBuilder.class.st +++ b/src/Roassal-Builders/RSAbstractShapesBuilder.class.st @@ -4,27 +4,29 @@ I redefine #renderIn: My subclasses needs to implement #objects and: #shapesFor: " Class { - #name : #RSAbstractShapesBuilder, - #superclass : #RSBuilder, - #category : #'Roassal-Builders-Core' + #name : 'RSAbstractShapesBuilder', + #superclass : 'RSBuilder', + #category : 'Roassal-Builders-Core', + #package : 'Roassal-Builders', + #tag : 'Core' } -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractShapesBuilder >> objects [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractShapesBuilder >> renderIn: aCanvas [ aCanvas addAll: (shapes := self shapesFor: self objects) ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractShapesBuilder >> shapeFor: anObject index: index [ ^ self subclassResponsibility ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractShapesBuilder >> shapesFor: aCollection [ | k | k := 0. diff --git a/src/Roassal-Builders/RSAbstractTreeBuilder.class.st b/src/Roassal-Builders/RSAbstractTreeBuilder.class.st index ea88a756..cd4d73a5 100644 --- a/src/Roassal-Builders/RSAbstractTreeBuilder.class.st +++ b/src/Roassal-Builders/RSAbstractTreeBuilder.class.st @@ -2,16 +2,18 @@ I am a abstract class to create visual elements based on tree structured in Roassal " Class { - #name : #RSAbstractTreeBuilder, - #superclass : #RSBuilder, + #name : 'RSAbstractTreeBuilder', + #superclass : 'RSBuilder', #instVars : [ 'rootNodes', 'weight' ], - #category : #'Roassal-Builders-Core' + #category : 'Roassal-Builders-Core', + #package : 'Roassal-Builders', + #tag : 'Core' } -{ #category : #private } +{ #category : 'private' } RSAbstractTreeBuilder >> createElements: atree nesting: block1 leaves: block2 depth: depth [ | children aShape leaves nodes| @@ -37,7 +39,7 @@ RSAbstractTreeBuilder >> createElements: atree nesting: block1 leaves: block2 de ^ aShape ] -{ #category : #private } +{ #category : 'private' } RSAbstractTreeBuilder >> createElements: atree using: ablock depth: depth [ | children shape | @@ -54,26 +56,26 @@ RSAbstractTreeBuilder >> createElements: atree using: ablock depth: depth [ ^ shape ] -{ #category : #'public - building' } +{ #category : 'public - building' } RSAbstractTreeBuilder >> explore: atree nesting: block1 leaves: block2 [ shapes := RSGroup new. ^ (self from: (Array with: atree) nesting: block1 leaves: block2) first ] -{ #category : #'public - building' } +{ #category : 'public - building' } RSAbstractTreeBuilder >> explore: atree using: ablock [ shapes := RSGroup new. ^ (self from: (Array with: atree) using: ablock) first ] -{ #category : #'public - building' } +{ #category : 'public - building' } RSAbstractTreeBuilder >> from: objects nesting: block1 leaves: block2 [ shapes := RSGroup new. rootNodes := objects collect: [:obj | self createElements: obj nesting: block1 leaves: block2 depth: 1 ]. ^ rootNodes ] -{ #category : #'public - building' } +{ #category : 'public - building' } RSAbstractTreeBuilder >> from: objects using: ablock [ shapes := RSGroup new. "This is the main public method. Takes a list of objects, and a block to specify how to recurse" @@ -81,59 +83,59 @@ RSAbstractTreeBuilder >> from: objects using: ablock [ ^ rootNodes ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractTreeBuilder >> initialize [ super initialize. rootNodes := RSGroup new ] -{ #category : #weight } +{ #category : 'weight' } RSAbstractTreeBuilder >> leafWeight: block [ self weight: [ :shape | self weightLeafShape: shape block: block ] ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractTreeBuilder >> minWeightValue [ ^ 1 ] -{ #category : #weight } +{ #category : 'weight' } RSAbstractTreeBuilder >> modelWeight: anObject [ self weight: [ :shape | anObject rsValue: shape model ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTreeBuilder >> renderIn: aCanvas [ aCanvas addAll: self shapes ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTreeBuilder >> rootNodes [ ^ rootNodes ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTreeBuilder >> rootNodes: anArray [ rootNodes := anArray ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractTreeBuilder >> shapeFor: anObject [ ^ self subclassResponsibility ] -{ #category : #weight } +{ #category : 'weight' } RSAbstractTreeBuilder >> weight [ ^ weight ] -{ #category : #weight } +{ #category : 'weight' } RSAbstractTreeBuilder >> weight: anObject [ "one arg block, example [:aRoassalShape | ]" weight := anObject ] -{ #category : #private } +{ #category : 'private' } RSAbstractTreeBuilder >> weightFromChildren: shape block: aBlock [ | children weightValue | children := shape schildren. @@ -146,12 +148,12 @@ RSAbstractTreeBuilder >> weightFromChildren: shape block: aBlock [ ^ weightValue max: self minWeightValue ] -{ #category : #'accessing - keys' } +{ #category : 'accessing - keys' } RSAbstractTreeBuilder >> weightKey [ ^ #weight ] -{ #category : #private } +{ #category : 'private' } RSAbstractTreeBuilder >> weightLeafShape: shape block: aBlock [ ^ shape propertyAt: self weightKey @@ -159,7 +161,7 @@ RSAbstractTreeBuilder >> weightLeafShape: shape block: aBlock [ self weightFromChildren: shape block: aBlock ] ] -{ #category : #weight } +{ #category : 'weight' } RSAbstractTreeBuilder >> weightOf: aShape [ ^ self weight rsValue: aShape ] diff --git a/src/Roassal-Builders/RSAbstractWrapStrategy.class.st b/src/Roassal-Builders/RSAbstractWrapStrategy.class.st index e24ede7c..1bb058fb 100644 --- a/src/Roassal-Builders/RSAbstractWrapStrategy.class.st +++ b/src/Roassal-Builders/RSAbstractWrapStrategy.class.st @@ -2,31 +2,33 @@ My subclasses can define the way to wrap a text " Class { - #name : #RSAbstractWrapStrategy, - #superclass : #RSObject, + #name : 'RSAbstractWrapStrategy', + #superclass : 'RSObject', #instVars : [ 'wrapMaxWidth' ], - #category : #'Roassal-Builders-Text' + #category : 'Roassal-Builders-Text', + #package : 'Roassal-Builders', + #tag : 'Text' } -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractWrapStrategy >> initialize [ super initialize. self wrapMaxWidth: 200 ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractWrapStrategy >> wrapMaxWidth [ ^ wrapMaxWidth ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractWrapStrategy >> wrapMaxWidth: aNumber [ wrapMaxWidth := aNumber ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractWrapStrategy >> wrapTextFor: aString with: aRSMultilineLabelBuilder [ ^ self subclassResponsibility ] diff --git a/src/Roassal-Builders/RSAdjacencyMatrixBuilder.class.st b/src/Roassal-Builders/RSAdjacencyMatrixBuilder.class.st index bd9273be..a1763b90 100644 --- a/src/Roassal-Builders/RSAdjacencyMatrixBuilder.class.st +++ b/src/Roassal-Builders/RSAdjacencyMatrixBuilder.class.st @@ -2,22 +2,24 @@ Used as example " Class { - #name : #RSAdjacencyMatrixBuilder, - #superclass : #RSBuilder, + #name : 'RSAdjacencyMatrixBuilder', + #superclass : 'RSBuilder', #instVars : [ 'connections', 'objects' ], - #category : #'Roassal-Builders-Example' + #category : 'Roassal-Builders-Example', + #package : 'Roassal-Builders', + #tag : 'Example' } -{ #category : #hooks } +{ #category : 'hooks' } RSAdjacencyMatrixBuilder >> connectingColor [ ^ Color blue ] -{ #category : #accessing } +{ #category : 'accessing' } RSAdjacencyMatrixBuilder >> connections: someConnections [ "Set the connections used by the Adcency Matrix to build the matrix. The connections must be @@ -26,18 +28,18 @@ RSAdjacencyMatrixBuilder >> connections: someConnections [ connections := someConnections ] -{ #category : #hooks } +{ #category : 'hooks' } RSAdjacencyMatrixBuilder >> defaultSize [ ^ 10 ] -{ #category : #'private -testing' } +{ #category : 'private -testing' } RSAdjacencyMatrixBuilder >> does: obj1 dependsOn: obj2 [ "Return true if there is a connection from obj1 to obj2" ^ connections includes: obj1 -> obj2 ] -{ #category : #'public - cycle' } +{ #category : 'public - cycle' } RSAdjacencyMatrixBuilder >> getAllCycles [ "Return all the cycles contained in the graph" @@ -51,7 +53,7 @@ RSAdjacencyMatrixBuilder >> getAllCycles [ ^ answer ] -{ #category : #'public - cycle' } +{ #category : 'public - cycle' } RSAdjacencyMatrixBuilder >> getVisitedNodesStartingFrom: obj [ | visiting | visiting := Set new. @@ -60,18 +62,18 @@ RSAdjacencyMatrixBuilder >> getVisitedNodesStartingFrom: obj [ ^ visiting ] -{ #category : #'public - cycle' } +{ #category : 'public - cycle' } RSAdjacencyMatrixBuilder >> hasCycle [ "Return true if the graph has some cycle. Else return false" ^ objects anySatisfy: [ :obj | self hasCycleStartingFrom: obj ] ] -{ #category : #'public - cycle' } +{ #category : 'public - cycle' } RSAdjacencyMatrixBuilder >> hasCycleStartingFrom: obj [ ^ (self getVisitedNodesStartingFrom: obj) includes: obj ] -{ #category : #'public - cycle' } +{ #category : 'public - cycle' } RSAdjacencyMatrixBuilder >> hasCycleStartingFrom: obj visiting: visiting [ (visiting includes: obj) ifTrue: [ ^ self ]. @@ -81,7 +83,7 @@ RSAdjacencyMatrixBuilder >> hasCycleStartingFrom: obj visiting: visiting [ self hasCycleStartingFrom: o visiting: visiting ] ] -{ #category : #private } +{ #category : 'private' } RSAdjacencyMatrixBuilder >> incomingConnectionsOf: anObject [ ^ connections @@ -89,7 +91,7 @@ RSAdjacencyMatrixBuilder >> incomingConnectionsOf: anObject [ thenCollect: #value ] -{ #category : #initialization } +{ #category : 'initialization' } RSAdjacencyMatrixBuilder >> initialize [ super initialize. @@ -97,42 +99,42 @@ RSAdjacencyMatrixBuilder >> initialize [ connections := #( ) ] -{ #category : #'public - sorting' } +{ #category : 'public - sorting' } RSAdjacencyMatrixBuilder >> noSorting [ "No sorting" ] -{ #category : #hooks } +{ #category : 'hooks' } RSAdjacencyMatrixBuilder >> nonConnectingColor [ ^ Color veryVeryLightGray ] -{ #category : #accessing } +{ #category : 'accessing' } RSAdjacencyMatrixBuilder >> numberOfConnections [ ^ connections size ] -{ #category : #private } +{ #category : 'private' } RSAdjacencyMatrixBuilder >> numberOfIncomingConnectionsOf: anObject [ ^ (self incomingConnectionsOf: anObject) size ] -{ #category : #accessing } +{ #category : 'accessing' } RSAdjacencyMatrixBuilder >> numberOfObjects [ ^ objects size ] -{ #category : #private } +{ #category : 'private' } RSAdjacencyMatrixBuilder >> numberOfOutgoingConnectionsOf: anObject [ ^ (self outgoingConnectionsOf: anObject) size ] -{ #category : #accessing } +{ #category : 'accessing' } RSAdjacencyMatrixBuilder >> objects [ "Return the objects that are used in both axes" @@ -140,7 +142,7 @@ RSAdjacencyMatrixBuilder >> objects [ ^ objects ] -{ #category : #accessing } +{ #category : 'accessing' } RSAdjacencyMatrixBuilder >> objects: someObjects [ "Set the objects that must be used in both axes" @@ -151,7 +153,7 @@ RSAdjacencyMatrixBuilder >> objects: someObjects [ objects := someObjects ] -{ #category : #private } +{ #category : 'private' } RSAdjacencyMatrixBuilder >> outgoingConnectionsOf: anObject [ ^ connections @@ -159,7 +161,7 @@ RSAdjacencyMatrixBuilder >> outgoingConnectionsOf: anObject [ thenCollect: #value ] -{ #category : #rendering } +{ #category : 'rendering' } RSAdjacencyMatrixBuilder >> renderIn: aCanvas [ "Display the adjacency matrix" @@ -182,7 +184,7 @@ RSAdjacencyMatrixBuilder >> renderIn: aCanvas [ aCanvas shapes @ RSPopup ] -{ #category : #'public - sorting' } +{ #category : 'public - sorting' } RSAdjacencyMatrixBuilder >> sortByNumberOfIncomingConnections [ objects := objects asSortedCollection: [ :a :b | @@ -191,7 +193,7 @@ RSAdjacencyMatrixBuilder >> sortByNumberOfIncomingConnections [ objects := objects asArray ] -{ #category : #'public - sorting' } +{ #category : 'public - sorting' } RSAdjacencyMatrixBuilder >> sortByNumberOfOutgoingConnections [ objects := objects asSortedCollection: [ :a :b | diff --git a/src/Roassal-Builders/RSBuilder.class.st b/src/Roassal-Builders/RSBuilder.class.st index 4985d79a..d4c4ffe3 100644 --- a/src/Roassal-Builders/RSBuilder.class.st +++ b/src/Roassal-Builders/RSBuilder.class.st @@ -52,21 +52,23 @@ canvas @ RSCanvasController ``` " Class { - #name : #RSBuilder, - #superclass : #RSObject, + #name : 'RSBuilder', + #superclass : 'RSObject', #instVars : [ 'container', 'shapes' ], - #category : #'Roassal-Builders-Core' + #category : 'Roassal-Builders-Core', + #package : 'Roassal-Builders', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> asShape [ ^ self asShapeFor: nil ] -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> asShapeFor: model [ self build. ^ self container asShape @@ -74,50 +76,52 @@ RSBuilder >> asShapeFor: model [ yourself ] -{ #category : #building } +{ #category : 'building' } RSBuilder >> build [ - self renderIn: self container. - ^ self container + | roassalContainer | + roassalContainer := self container. + self renderIn: roassalContainer. + ^ roassalContainer ] -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> canvas [ ^ self container canvas ] -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> container [ ^ container ifNil: [ container := self defaultContainer ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> container: aTContainer [ container := aTContainer ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSBuilder >> defaultContainer [ ^ RSCanvas new ] -{ #category : #public } +{ #category : 'public' } RSBuilder >> open [ self build. ^ self canvas open ] -{ #category : #rendering } +{ #category : 'rendering' } RSBuilder >> renderIn: aCanvas [ "add some shapes in the canvas" self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSBuilder >> shapes [ ^ shapes ] -{ #category : #updating } +{ #category : 'updating' } RSBuilder >> update [ self container shapes do: #remove. self build diff --git a/src/Roassal-Builders/RSCircleVennDiagram.class.st b/src/Roassal-Builders/RSCircleVennDiagram.class.st index 6cfa7b20..b9fd92d9 100644 --- a/src/Roassal-Builders/RSCircleVennDiagram.class.st +++ b/src/Roassal-Builders/RSCircleVennDiagram.class.st @@ -4,18 +4,20 @@ This does not work for more than two sets for now. The formula used to compute it are available at: https://dspace.library.uvic.ca/bitstream/handle/1828/128/phdGradStudiesMay24.pdf " Class { - #name : #RSCircleVennDiagram, - #superclass : #RSBuilder, + #name : 'RSCircleVennDiagram', + #superclass : 'RSBuilder', #instVars : [ 'bigSet', 'smallSet', 'omega', 'treshold' ], - #category : #'Roassal-Builders-VennDiagram' + #category : 'Roassal-Builders-VennDiagram', + #package : 'Roassal-Builders', + #tag : 'VennDiagram' } -{ #category : #examples } +{ #category : 'examples' } RSCircleVennDiagram class >> example1 [ ^ self new @@ -24,19 +26,19 @@ RSCircleVennDiagram class >> example1 [ open ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> bigSet [ ^ bigSet ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> bigSet: anObject [ bigSet := anObject asSet. ] -{ #category : #computation } +{ #category : 'computation' } RSCircleVennDiagram >> computeDistance [ | bigRadius smallRadius intersection intersectionWeight lowBoundary highBoundary deltaFunction middle | @@ -77,13 +79,13 @@ RSCircleVennDiagram >> computeDistance [ ^ middle ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> computeRadius: aSet [ ^ ((self weight: aSet) / Float pi) sqrt ] -{ #category : #initialization } +{ #category : 'initialization' } RSCircleVennDiagram >> initialize [ super initialize. bigSet := Set new. @@ -91,7 +93,7 @@ RSCircleVennDiagram >> initialize [ treshold := 0.001. "Accuracy of intersection area" ] -{ #category : #rendering } +{ #category : 'rendering' } RSCircleVennDiagram >> renderIn: aCanvas [ | bigRadius smallRadius distance | @@ -114,19 +116,19 @@ RSCircleVennDiagram >> renderIn: aCanvas [ aCanvas @ RSCanvasController. ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> smallSet [ ^ smallSet ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> smallSet: anObject [ smallSet := anObject asSet. ] -{ #category : #accessing } +{ #category : 'accessing' } RSCircleVennDiagram >> weight: aSet [ ^ aSet size / omega size diff --git a/src/Roassal-Builders/RSCoOccurrenceMatrixBuilder.class.st b/src/Roassal-Builders/RSCoOccurrenceMatrixBuilder.class.st index f4e04a60..82d1d3f6 100644 --- a/src/Roassal-Builders/RSCoOccurrenceMatrixBuilder.class.st +++ b/src/Roassal-Builders/RSCoOccurrenceMatrixBuilder.class.st @@ -17,8 +17,8 @@ The input data source should implement these methods: " Class { - #name : #RSCoOccurrenceMatrixBuilder, - #superclass : #RSBuilder, + #name : 'RSCoOccurrenceMatrixBuilder', + #superclass : 'RSBuilder', #instVars : [ 'colorScale', 'dataSource', @@ -26,10 +26,12 @@ Class { 'columnSize', 'domainRange' ], - #category : #'Roassal-Builders-Core' + #category : 'Roassal-Builders-Core', + #package : 'Roassal-Builders', + #tag : 'Core' } -{ #category : #examples } +{ #category : 'examples' } RSCoOccurrenceMatrixBuilder class >> sampleMatrix [ ^ '"","col_1","col_2","col_3","col_4","col_5","col_6","col_7","col_8","col_9" @@ -47,7 +49,7 @@ RSCoOccurrenceMatrixBuilder class >> sampleMatrix [ "row_12","0","0","0","0","0","0","1","0","0"' ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> colorScale [ " Answer a scale on the receiver's domain range " @@ -55,20 +57,20 @@ RSCoOccurrenceMatrixBuilder >> colorScale [ ifNil: [ colorScale := NSScale category20 domain: self domainRange asArray ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSCoOccurrenceMatrixBuilder >> colorScale: anObject [ colorScale := anObject ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> columnNames [ "Answer a of representing the receiver's data source column names" ^ self dataSource columnNames ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> columnSize [ "Answer the of columns in the receiver's data source" @@ -76,7 +78,7 @@ RSCoOccurrenceMatrixBuilder >> columnSize [ ifNil: [ columnSize := self dataSource columns size ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createBoundingBoxIn: canvas [ canvas addShape: (RSBox new @@ -90,7 +92,7 @@ RSCoOccurrenceMatrixBuilder >> createBoundingBoxIn: canvas [ yourself) ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createColumnTicksIn: canvas [ self columnNames doWithIndex: [ :columnName :x | @@ -110,7 +112,7 @@ RSCoOccurrenceMatrixBuilder >> createColumnTicksIn: canvas [ canvas addShape: label ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createDataPointAt: x at: y value: value [ ^ RSCircle new @@ -121,7 +123,7 @@ RSCoOccurrenceMatrixBuilder >> createDataPointAt: x at: y value: value [ yourself ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createDataPointsIn: canvas [ self rows doWithIndex: [ :row :y | @@ -130,7 +132,7 @@ RSCoOccurrenceMatrixBuilder >> createDataPointsIn: canvas [ canvas add: (self createDataPointAt: x at: y value: value) ] ] ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createInteractionsIn: canvas [ canvas nodes @ RSHighlightable red. @@ -139,7 +141,7 @@ RSCoOccurrenceMatrixBuilder >> createInteractionsIn: canvas [ text: [: shape | shape position ]) ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createLabelFor: columnName [ ^ RSLabel new @@ -149,7 +151,7 @@ RSCoOccurrenceMatrixBuilder >> createLabelFor: columnName [ yourself ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createLegendIn: canvas [ | lb | @@ -171,7 +173,7 @@ RSCoOccurrenceMatrixBuilder >> createLegendIn: canvas [ ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createRowTicksIn: canvas [ self rowNames doWithIndex: [ : rowName : y | @@ -190,7 +192,7 @@ RSCoOccurrenceMatrixBuilder >> createRowTicksIn: canvas [ canvas addShape: label ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> createTickLineStart: p2 end: p1 [ ^ RSLine new @@ -201,19 +203,19 @@ RSCoOccurrenceMatrixBuilder >> createTickLineStart: p2 end: p1 [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSCoOccurrenceMatrixBuilder >> dataSource [ ^ dataSource ] -{ #category : #accessing } +{ #category : 'accessing' } RSCoOccurrenceMatrixBuilder >> dataSource: anObject [ dataSource := anObject ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSCoOccurrenceMatrixBuilder >> defaultContainer [ | c | @@ -222,20 +224,20 @@ RSCoOccurrenceMatrixBuilder >> defaultContainer [ ^ RSCanvas new @ c ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> domainRange [ ^ domainRange ifNil: [ domainRange := 1 to: 10 ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSCoOccurrenceMatrixBuilder >> domainRange: anObject [ domainRange := anObject ] -{ #category : #hooks } +{ #category : 'hooks' } RSCoOccurrenceMatrixBuilder >> exportToFile: aString [ self build. @@ -247,7 +249,7 @@ RSCoOccurrenceMatrixBuilder >> exportToFile: aString [ export ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> renderIn: canvas [ self createBoundingBoxIn: canvas. @@ -259,13 +261,13 @@ RSCoOccurrenceMatrixBuilder >> renderIn: canvas [ ] -{ #category : #accessing } +{ #category : 'accessing' } RSCoOccurrenceMatrixBuilder >> rowNames [ ^ self dataSource rowNames ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> rowSize [ "Answer the of rows in the receiver's data source" @@ -273,7 +275,7 @@ RSCoOccurrenceMatrixBuilder >> rowSize [ ifNil: [ rowSize := self dataSource rows size ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSCoOccurrenceMatrixBuilder >> rows [ "Answer a of representing the receiver's data source rows" diff --git a/src/Roassal-Builders/RSMultilineLabelBuilder.class.st b/src/Roassal-Builders/RSMultilineLabelBuilder.class.st index 6c56d091..9ee59b0d 100644 --- a/src/Roassal-Builders/RSMultilineLabelBuilder.class.st +++ b/src/Roassal-Builders/RSMultilineLabelBuilder.class.st @@ -16,18 +16,20 @@ canvas @ RSCanvasController ``` " Class { - #name : #RSMultilineLabelBuilder, - #superclass : #RSObject, + #name : 'RSMultilineLabelBuilder', + #superclass : 'RSObject', #instVars : [ 'labelShape', 'layout', 'textBlock', 'wrapStrategy' ], - #category : #'Roassal-Builders-Text' + #category : 'Roassal-Builders-Text', + #package : 'Roassal-Builders', + #tag : 'Text' } -{ #category : #hooks } +{ #category : 'hooks' } RSMultilineLabelBuilder >> basicShapeFor: aString [ | lines | lines := aString lines. @@ -37,7 +39,7 @@ RSMultilineLabelBuilder >> basicShapeFor: aString [ ifFalse: [ self compositeLabelFor: lines ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSMultilineLabelBuilder >> compositeLabelFor: lines [ | shapes | shapes := lines collect: [:line | @@ -50,24 +52,24 @@ RSMultilineLabelBuilder >> compositeLabelFor: lines [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } RSMultilineLabelBuilder >> initialize [ super initialize. self labelShape: RSLabel new; textBlock: #asString. self wrapStrategy: RSNoWrapStrategy new ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> labelShape [ ^ labelShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> labelShape: aLabelShape [ labelShape := aLabelShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> layout [ ^ layout ifNil: [ layout := RSVerticalLineLayout new alignLeft; @@ -75,41 +77,41 @@ RSMultilineLabelBuilder >> layout [ yourself ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> layout: aRSLayout [ layout := aRSLayout ] -{ #category : #hooks } +{ #category : 'hooks' } RSMultilineLabelBuilder >> shapeFor: anObject [ | text | text := self textFor: anObject. ^ wrapStrategy wrapTextFor: text with: self ] -{ #category : #hooks } +{ #category : 'hooks' } RSMultilineLabelBuilder >> singleLabelFor: text [ ^ self labelShape copy text: text; yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> textBlock: aBlock [ textBlock := aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> textFor: anObject [ ^ (textBlock rsValue: anObject) asString ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> wrapStrategy [ ^ wrapStrategy ] -{ #category : #accessing } +{ #category : 'accessing' } RSMultilineLabelBuilder >> wrapStrategy: aRSWrapStrategy [ wrapStrategy := aRSWrapStrategy ] diff --git a/src/Roassal-Builders/RSNoWrapStrategy.class.st b/src/Roassal-Builders/RSNoWrapStrategy.class.st index 9fc71a51..a1a4a33e 100644 --- a/src/Roassal-Builders/RSNoWrapStrategy.class.st +++ b/src/Roassal-Builders/RSNoWrapStrategy.class.st @@ -2,17 +2,19 @@ This does not apply a wrap in the text " Class { - #name : #RSNoWrapStrategy, - #superclass : #RSAbstractWrapStrategy, - #category : #'Roassal-Builders-Text' + #name : 'RSNoWrapStrategy', + #superclass : 'RSAbstractWrapStrategy', + #category : 'Roassal-Builders-Text', + #package : 'Roassal-Builders', + #tag : 'Text' } -{ #category : #initialization } +{ #category : 'initialization' } RSNoWrapStrategy >> initialize [ "Subclasses should redefine this method to perform initializations on instance creation" ] -{ #category : #hooks } +{ #category : 'hooks' } RSNoWrapStrategy >> wrapTextFor: aString with: aRSMultilineLabelBuilder [ ^ aRSMultilineLabelBuilder basicShapeFor: aString ] diff --git a/src/Roassal-Builders/RSPunchCardBuilder.class.st b/src/Roassal-Builders/RSPunchCardBuilder.class.st index 0c7c23d4..115a6d84 100644 --- a/src/Roassal-Builders/RSPunchCardBuilder.class.st +++ b/src/Roassal-Builders/RSPunchCardBuilder.class.st @@ -2,44 +2,46 @@ I am an example " Class { - #name : #RSPunchCardBuilder, - #superclass : #RSBuilder, + #name : 'RSPunchCardBuilder', + #superclass : 'RSBuilder', #instVars : [ 'objects', 'metrics', 'size' ], - #category : #'Roassal-Builders-Example' + #category : 'Roassal-Builders-Example', + #package : 'Roassal-Builders', + #tag : 'Example' } -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> addMetric: aRoassalValue name: name [ metrics at: name put: aRoassalValue ] -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> boxSize [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> boxSize: aNumber [ size := aNumber ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSPunchCardBuilder >> defaultContainer [ ^ RSCanvas new @ RSCanvasController ] -{ #category : #initialization } +{ #category : 'initialization' } RSPunchCardBuilder >> initialize [ super initialize. metrics := OrderedDictionary new. self boxSize: 10 ] -{ #category : #hooks } +{ #category : 'hooks' } RSPunchCardBuilder >> labelFor: obj [ ^ RSLabel new text: obj; @@ -47,22 +49,22 @@ RSPunchCardBuilder >> labelFor: obj [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> metrics [ ^ metrics ] -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> objects [ ^ objects ] -{ #category : #accessing } +{ #category : 'accessing' } RSPunchCardBuilder >> objects: aCollection [ objects := aCollection ] -{ #category : #hooks } +{ #category : 'hooks' } RSPunchCardBuilder >> renderDots: aCanvas [ | base | base := RSEllipse new popup. @@ -82,7 +84,7 @@ RSPunchCardBuilder >> renderDots: aCanvas [ announcer: base announcer) ] ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSPunchCardBuilder >> renderIn: aCanvas [ self @@ -91,7 +93,7 @@ RSPunchCardBuilder >> renderIn: aCanvas [ renderYAxis: aCanvas ] -{ #category : #hooks } +{ #category : 'hooks' } RSPunchCardBuilder >> renderXAxis: aCanvas [ | labels | @@ -106,7 +108,7 @@ RSPunchCardBuilder >> renderXAxis: aCanvas [ aCanvas addAll: labels ] -{ #category : #hooks } +{ #category : 'hooks' } RSPunchCardBuilder >> renderYAxis: aCanvas [ | labels | diff --git a/src/Roassal-Builders/RSWrapEllipsisStrategy.class.st b/src/Roassal-Builders/RSWrapEllipsisStrategy.class.st index 7b022566..db84d124 100644 --- a/src/Roassal-Builders/RSWrapEllipsisStrategy.class.st +++ b/src/Roassal-Builders/RSWrapEllipsisStrategy.class.st @@ -2,17 +2,19 @@ Basic ellipsis for a single line text " Class { - #name : #RSWrapEllipsisStrategy, - #superclass : #RSAbstractWrapStrategy, - #category : #'Roassal-Builders-Text' + #name : 'RSWrapEllipsisStrategy', + #superclass : 'RSAbstractWrapStrategy', + #category : 'Roassal-Builders-Text', + #package : 'Roassal-Builders', + #tag : 'Text' } -{ #category : #accessing } +{ #category : 'accessing' } RSWrapEllipsisStrategy >> ellipsis [ ^ '...' ] -{ #category : #hooks } +{ #category : 'hooks' } RSWrapEllipsisStrategy >> wrapTextFor: aString with: aRSMultilineLabelBuilder [ | width lines label currentTextWithEllipsis currentText ellipsis | lines := aString lines. diff --git a/src/Roassal-Builders/RSWrapStrategy.class.st b/src/Roassal-Builders/RSWrapStrategy.class.st index f8d6f0ca..38342769 100644 --- a/src/Roassal-Builders/RSWrapStrategy.class.st +++ b/src/Roassal-Builders/RSWrapStrategy.class.st @@ -2,12 +2,14 @@ This uses a wrapMaxWidth and creates a multiline label " Class { - #name : #RSWrapStrategy, - #superclass : #RSAbstractWrapStrategy, - #category : #'Roassal-Builders-Text' + #name : 'RSWrapStrategy', + #superclass : 'RSAbstractWrapStrategy', + #category : 'Roassal-Builders-Text', + #package : 'Roassal-Builders', + #tag : 'Text' } -{ #category : #hooks } +{ #category : 'hooks' } RSWrapStrategy >> wordsAndSpacesFor: aString [ | tokens flag isWord i | tokens := OrderedCollection new. @@ -26,7 +28,7 @@ RSWrapStrategy >> wordsAndSpacesFor: aString [ ^ tokens ] -{ #category : #hooks } +{ #category : 'hooks' } RSWrapStrategy >> wrapLineShapesFor: line with: aRSMultilineLabelBuilder [ | label tokens newLines i currentLine width lastLabel | label := aRSMultilineLabelBuilder @@ -75,7 +77,7 @@ RSWrapStrategy >> wrapLineShapesFor: line with: aRSMultilineLabelBuilder [ ^ newLines ] -{ #category : #hooks } +{ #category : 'hooks' } RSWrapStrategy >> wrapTextFor: aString with: aRSMultilineLabelBuilder [ | lines shapes | lines := aString lines. diff --git a/src/Roassal-Builders/package.st b/src/Roassal-Builders/package.st index 6c9f121b..ddc5e656 100644 --- a/src/Roassal-Builders/package.st +++ b/src/Roassal-Builders/package.st @@ -1 +1 @@ -Package { #name : #'Roassal-Builders' } +Package { #name : 'Roassal-Builders' } diff --git a/src/Roassal-Chart/Collection.extension.st b/src/Roassal-Chart/Collection.extension.st index 39bb61e2..db5f4575 100644 --- a/src/Roassal-Chart/Collection.extension.st +++ b/src/Roassal-Chart/Collection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Collection } +Extension { #name : 'Collection' } -{ #category : #'*Roassal-Chart' } +{ #category : '*Roassal-Chart' } Collection >> interQuartileRange [ | quartiles q1 q3 | quartiles := self quartiles. @@ -9,7 +9,7 @@ Collection >> interQuartileRange [ ^ q3 - q1. ] -{ #category : #'*Roassal-Chart' } +{ #category : '*Roassal-Chart' } Collection >> quartiles [ | q1 q2 q3 quantile | quantile := RSInvertedCDF data: self. @@ -19,7 +19,7 @@ Collection >> quartiles [ ^ { q1. q2. q3 }. ] -{ #category : #'*Roassal-Chart' } +{ #category : '*Roassal-Chart' } Collection >> standardDeviation [ "It follows the implementation of numpy using the size N (instead of N - 1)" | standardDeviation sum mean | diff --git a/src/Roassal-Chart/RSAbstractBandPlot.class.st b/src/Roassal-Chart/RSAbstractBandPlot.class.st index 281cf589..ebae4ee0 100644 --- a/src/Roassal-Chart/RSAbstractBandPlot.class.st +++ b/src/Roassal-Chart/RSAbstractBandPlot.class.st @@ -15,8 +15,8 @@ " Class { - #name : #RSAbstractBandPlot, - #superclass : #RSAbstractPlot, + #name : 'RSAbstractBandPlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'bandScale', 'dataScale', @@ -26,10 +26,12 @@ Class { 'bandPlotShapes', 'positions' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> assignXAndYScales: aChart [ bandScale class = NSOrdinalScale ifFalse: [ self computeScales: aChart. ]. @@ -43,27 +45,27 @@ RSAbstractBandPlot >> assignXAndYScales: aChart [ aChart xScale: xScale. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> bandScale: aNSScale [ bandScale := aNSScale. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> bandsOffset: aNumberInRange [ offset := aNumberInRange ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> bandsWidth [ ^ bandWidth ifNil: [ bandWidth := self defaultBandsWidth ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> bandsWidth: aNumber [ bandWidth := aNumber. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> beforeRenderingIn: aChart [ self computeXAndYValues. super beforeRenderingIn: aChart. @@ -71,7 +73,7 @@ RSAbstractBandPlot >> beforeRenderingIn: aChart [ self assignXAndYScales: aChart. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> computeBandsOffset [ | bandValues | bandValues := horizontal ifFalse: [ xValues ] ifTrue: [ yValues ]. @@ -80,12 +82,12 @@ RSAbstractBandPlot >> computeBandsOffset [ ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> computeBandsWidth [ bandPlotShapes do: [ :graphic | graphic bandWidth: self bandsWidth ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> computeScales: aChart [ bandScale := NSScale ordinal. horizontal ifFalse: [ @@ -97,7 +99,7 @@ RSAbstractBandPlot >> computeScales: aChart [ bandScale rangeBands: yScale range. ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> computeTicks [ | horizontalTick verticalTick | horizontal @@ -113,7 +115,7 @@ RSAbstractBandPlot >> computeTicks [ ]. ] -{ #category : #private } +{ #category : 'private' } RSAbstractBandPlot >> computeXAndYValues [ | dataValues bandPositions maxDataRelatedValue minDataRelatedValue | maxDataRelatedValue := (bandPlotShapes collect: [ :bandPlotShape | bandPlotShape maxDataValue ]) max. @@ -129,49 +131,44 @@ RSAbstractBandPlot >> computeXAndYValues [ yValues := dataValues ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> createdShapes [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> defaultBandsWidth [ ^ bandScale rangeBand * 0.5. ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> defaultOffset [ ^ bandScale scale: 0 ] -{ #category : #'accessing - defaults' } -RSAbstractBandPlot >> defaultShape [ - ^ self subclassResponsibility -] - -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> horizontal [ bandPlotShapes do: [ :bs | bs horizontal ]. horizontal := true. ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> isHorizontal [ ^ horizontal ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractBandPlot >> numberOfBands [ ^ bandPlotShapes size ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractBandPlot >> positions [ positions := positions ifNil: [(1 to: self numberOfBands)]. ^ positions. ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractBandPlot >> positions: aCollection [ self assert: [ aCollection size = bandPlotShapes size ] @@ -179,12 +176,12 @@ RSAbstractBandPlot >> positions: aCollection [ positions := aCollection ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlot >> showBands [ bandPlotShapes do: [ :box | box showBand ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlot >> vertical [ bandPlotShapes do: [ :bs | bs vertical ]. horizontal := false. diff --git a/src/Roassal-Chart/RSAbstractBandPlotShape.class.st b/src/Roassal-Chart/RSAbstractBandPlotShape.class.st index 758d1579..9b284aea 100644 --- a/src/Roassal-Chart/RSAbstractBandPlotShape.class.st +++ b/src/Roassal-Chart/RSAbstractBandPlotShape.class.st @@ -1,6 +1,6 @@ Class { - #name : #RSAbstractBandPlotShape, - #superclass : #RSComposite, + #name : 'RSAbstractBandPlotShape', + #superclass : 'RSComposite', #instVars : [ 'color', 'bandOffset', @@ -10,10 +10,12 @@ Class { 'horizontal', 'shouldShowBand' ], - #category : #'Roassal-Chart-Plots' + #category : 'Roassal-Chart-Plots', + #package : 'Roassal-Chart', + #tag : 'Plots' } -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlotShape >> addChildrenToComposite [ | shapesToRender | shapesToRender := self shapesToRender. @@ -22,37 +24,37 @@ RSAbstractBandPlotShape >> addChildrenToComposite [ ^ self. ] -{ #category : #band } +{ #category : 'band' } RSAbstractBandPlotShape >> bandOffset: aNumber [ bandOffset := aNumber. ] -{ #category : #scales } +{ #category : 'scales' } RSAbstractBandPlotShape >> bandScale [ ^ bandScale. ] -{ #category : #scales } +{ #category : 'scales' } RSAbstractBandPlotShape >> bandScale: aNSScale [ bandScale := aNSScale ] -{ #category : #band } +{ #category : 'band' } RSAbstractBandPlotShape >> bandWidth: aNumber [ bandWidth := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlotShape >> color [ ^ color ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBandPlotShape >> color: aColor [ color := aColor. ] -{ #category : #shapes } +{ #category : 'shapes' } RSAbstractBandPlotShape >> computeBandRectangle [ ^ RSPolygon new points: { @@ -64,47 +66,47 @@ RSAbstractBandPlotShape >> computeBandRectangle [ color: Color blue translucent. ] -{ #category : #shapes } +{ #category : 'shapes' } RSAbstractBandPlotShape >> createShapesAndLines [ ^ self subclassResponsibility ] -{ #category : #scales } +{ #category : 'scales' } RSAbstractBandPlotShape >> dataScale [ ^ dataScale. ] -{ #category : #scales } +{ #category : 'scales' } RSAbstractBandPlotShape >> dataScale: aNSScale [ dataScale := aNSScale ] -{ #category : #defaults } +{ #category : 'defaults' } RSAbstractBandPlotShape >> defaultShouldShowBand [ ^ false ] -{ #category : #public } +{ #category : 'public' } RSAbstractBandPlotShape >> horizontal [ horizontal := true. ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlotShape >> maxDataValue [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlotShape >> minDataValue [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlotShape >> renderIn: canvas [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBandPlotShape >> shapesToRender [ | shapesAndLines band | shapesAndLines := self createShapesAndLines. @@ -115,17 +117,17 @@ RSAbstractBandPlotShape >> shapesToRender [ ^ shapesAndLines ] -{ #category : #band } +{ #category : 'band' } RSAbstractBandPlotShape >> shouldShowBand: aBoolean [ shouldShowBand := aBoolean. ] -{ #category : #public } +{ #category : 'public' } RSAbstractBandPlotShape >> showBand [ self shouldShowBand: true. ] -{ #category : #public } +{ #category : 'public' } RSAbstractBandPlotShape >> vertical [ horizontal := false. ] diff --git a/src/Roassal-Chart/RSAbstractBarPlot.class.st b/src/Roassal-Chart/RSAbstractBarPlot.class.st index 1563a761..484da49e 100644 --- a/src/Roassal-Chart/RSAbstractBarPlot.class.st +++ b/src/Roassal-Chart/RSAbstractBarPlot.class.st @@ -13,61 +13,63 @@ - barOffset: shifts the bars left or right " Class { - #name : #RSAbstractBarPlot, - #superclass : #RSAbstractPlot, + #name : 'RSAbstractBarPlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'barSize', 'bars', 'gapRatio', 'barOffset' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } RSAbstractBarPlot class >> isAbstract [ ^ self == RSAbstractBarPlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> barOffset [ ^ barOffset ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> barOffset: aNumber [ barOffset := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> barScale [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> barSize [ "Return the width of each bar" ^ barSize ifNil: [ self barScale rangeBand ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> barSize: aBarWidth [ "Set the width of the bar" barSize := aBarWidth ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> bars [ ^ bars ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractBarPlot >> computeRectagleFor: aPoint index: index [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBarPlot >> createBarFor: aPoint index: index [ ^ self shape copy @@ -77,29 +79,29 @@ RSAbstractBarPlot >> createBarFor: aPoint index: index [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> createdShapes [ ^ bars ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractBarPlot >> defaultShape [ ^ RSBox new noPaint ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> gapRatio [ ^ gapRatio ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractBarPlot >> gapRatio: aNumber [ "aNumber between 0 and 1" gapRatio := aNumber ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractBarPlot >> initialize [ super initialize. self @@ -107,17 +109,17 @@ RSAbstractBarPlot >> initialize [ barOffset: 0. ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractBarPlot >> isBarPlot [ ^ true ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractBarPlot >> modelFor: aPoint [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractBarPlot >> renderIn: canvas [ | index | super renderIn: canvas. diff --git a/src/Roassal-Chart/RSAbstractBinning.class.st b/src/Roassal-Chart/RSAbstractBinning.class.st index 418e2c9b..994feb90 100644 --- a/src/Roassal-Chart/RSAbstractBinning.class.st +++ b/src/Roassal-Chart/RSAbstractBinning.class.st @@ -4,18 +4,20 @@ source from https://www.answerminer.com/blog/binning-guide-ideal-histogram " Class { - #name : #RSAbstractBinning, - #superclass : #RSObject, - #category : #'Roassal-Chart-Strategy' + #name : 'RSAbstractBinning', + #superclass : 'RSObject', + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractBinning >> computeNumberOfBinsFor: aCollection [ " should return a number" ^ self subclassResponsibility ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractBinning >> createBinsFor: aCollection [ | size | size := self computeNumberOfBinsFor: aCollection. diff --git a/src/Roassal-Chart/RSAbstractChart.class.st b/src/Roassal-Chart/RSAbstractChart.class.st index 62724aa6..2f945e8b 100644 --- a/src/Roassal-Chart/RSAbstractChart.class.st +++ b/src/Roassal-Chart/RSAbstractChart.class.st @@ -22,8 +22,8 @@ " Class { - #name : #RSAbstractChart, - #superclass : #RSBuilder, + #name : 'RSAbstractChart', + #superclass : 'RSBuilder', #instVars : [ 'xScale', 'yScale', @@ -38,16 +38,18 @@ Class { 'ylabel', 'ylabelRight' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #'public - plots' } +{ #category : 'public - plots' } RSAbstractChart class >> barHeights: aCollectionY [ ^ RSBarPlot new x: (1 to: aCollectionY size) y: aCollectionY ] -{ #category : #'public - plots' } +{ #category : 'public - plots' } RSAbstractChart class >> barWidths: aCollectionX [ ^ RSHorizontalBarPlot new @@ -55,19 +57,19 @@ RSAbstractChart class >> barWidths: aCollectionX [ y: (1 to: aCollectionX size) ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChart class >> isAbstract [ ^ self == RSAbstractChart ] -{ #category : #'public - plots' } +{ #category : 'public - plots' } RSAbstractChart class >> lineX: aCollectionX y: aCollectionY [ ^ RSLinePlot new x: aCollectionX y: aCollectionY ] -{ #category : #adding } +{ #category : 'adding' } RSAbstractChart >> addDecoration: aDecoration [ "Add a decoration to the chart @@ -88,44 +90,44 @@ c ^ aDecoration ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> chart [ ^ self subclassResponsibility ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> chartExtents [ ^ extents ifNil: [ extents := RSChartExtents new ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> chartExtents: aRSChartExtents [ extents := aRSChartExtents ] -{ #category : #color } +{ #category : 'color' } RSAbstractChart >> colorFor: aRSPlot [ "Return a color for the given plot. Colors are defined as in #defaultPlotColors" ^ colorPalette scale: aRSPlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> colors [ ^ colorPalette ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> colors: someColors [ colorPalette := someColors ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChart >> createXScale [ | padding | @@ -141,7 +143,7 @@ RSAbstractChart >> createXScale [ (self chart extent x - padding) } ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChart >> createYScale [ | padding | @@ -157,14 +159,14 @@ RSAbstractChart >> createYScale [ (self extent y negated + padding) } ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> decorations [ "Return the list of decorations used to annotate plots" ^ decorations ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractChart >> defaultContainer [ ^ RSCanvas new in: [ :canvas | canvas inspectorContext interactionsToBeRegistered first noPushFront ]; @@ -177,36 +179,36 @@ RSAbstractChart >> defaultContainer [ yourself ] -{ #category : #'accessing - color' } +{ #category : 'accessing - color' } RSAbstractChart >> defaultPlotColors [ ^ NSScale category20 ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractChart >> defaultStyler [ ^ RSChartStyler new ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> extent [ ^ self chartExtents extent ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> extent: aPoint [ self chartExtents extent: aPoint ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> horizontalTick [ ^ decorations detect: #isHorizontalTick ifNone: [ nil ] ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChart >> initialize [ super initialize. @@ -217,7 +219,7 @@ RSAbstractChart >> initialize [ colorPalette := self defaultPlotColors ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChart >> initializeDecorations [ "adds the basis decorations to the chart" @@ -226,7 +228,7 @@ RSAbstractChart >> initializeDecorations [ self addDecoration: RSVerticalTick new ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChart >> initializeRenderOptions [ "extent is 250@200 to have a bit larger chart, and a small padding not to make plots overlap with spine decoration, for better visibility" @@ -235,7 +237,7 @@ RSAbstractChart >> initializeRenderOptions [ self padding: 5 @ 5 ] -{ #category : #inspector } +{ #category : 'inspector' } RSAbstractChart >> inspectorCanvas [ self update. @@ -244,69 +246,69 @@ RSAbstractChart >> inspectorCanvas [ yourself ] -{ #category : #inspector } +{ #category : 'inspector' } RSAbstractChart >> inspectorCanvasContext: aContext [ aContext withoutEvaluator ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> maxChartValueX [ "the maximum value displayed on the x-axis of the chart" ^ self subclassResponsibility ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> maxChartValueX: aNumber [ "sets the maximum value displayed on the x-axis of the chart" self chartExtents maxValueX: aNumber ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> maxChartValueY [ "the maximum value displayed on the y-axis of the chart" ^ self subclassResponsibility ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> maxChartValueY: aNumber [ "sets the maximum value displayed on the y-axis of the chart" self chartExtents maxValueY: aNumber ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> minChartValueX [ "the minimum value displayed on the x-axis of the chart" ^ self subclassResponsibility ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> minChartValueX: aNumber [ "sets the minimum value displayed on the x-axis of the chart" self chartExtents minValueX: aNumber ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> minChartValueY [ "the minimum value displayed on the y-axis of the chart" ^ self subclassResponsibility ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> minChartValueY: aNumber [ "sets the minimum value displayed on the y-axis of the chart" self chartExtents minValueY: aNumber ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractChart >> mustInclude0inX [ "Make sure that the 0 value is in the x-axis of the chart" @@ -317,7 +319,7 @@ RSAbstractChart >> mustInclude0inX [ ifFalse: [ self maxChartValueX: 0 ] ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractChart >> mustInclude0inY [ "Make sure that the 0 value is in the y-axis of the chart" @@ -328,27 +330,27 @@ RSAbstractChart >> mustInclude0inY [ ifFalse: [ self maxChartValueY: 0 ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> padding [ "the space between the spine and the plots" ^ self chartExtents padding ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractChart >> padding: aPoint [ "adds a space corresponding to aPoint between the spine and plots" self chartExtents padding: aPoint asPoint ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> plots [ ^ self ] -{ #category : #removing } +{ #category : 'removing' } RSAbstractChart >> removeAllTicks [ "Remove both horizontal and vertical ticks" @@ -356,38 +358,38 @@ RSAbstractChart >> removeAllTicks [ self removeVerticalTicks ] -{ #category : #removing } +{ #category : 'removing' } RSAbstractChart >> removeHorizontalTicks [ "Remove horizontal ticks from the chart" decorations remove: self horizontalTick ] -{ #category : #removing } +{ #category : 'removing' } RSAbstractChart >> removeVerticalTicks [ "Remove vertical ticks from the chart" decorations remove: self verticalTick ] -{ #category : #building } +{ #category : 'building' } RSAbstractChart >> show [ ^ self open ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> spine [ "returns the shape" ^ self spineDecoration box ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> spineDecoration [ ^ spineDecoration ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> spineDecoration: aRSChartSpineDecoration [ spineDecoration ifNotNil: [ @@ -398,26 +400,26 @@ RSAbstractChart >> spineDecoration: aRSChartSpineDecoration [ aRSChartSpineDecoration chart: self ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> styler [ ^ styler ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> styler: anRSChartStyler [ styler := anRSChartStyler. decorations do: [ :each | each styler: styler ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> title [ ^ title ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> title: aTitle [ "Set the title of a chart. For example: @@ -432,7 +434,7 @@ c ^ self addDecoration: (RSChartTitleDecoration new title: aTitle) ] -{ #category : #updating } +{ #category : 'updating' } RSAbstractChart >> updateChart: anEvent [ | canvas camera | camera := anEvent camera. @@ -442,31 +444,31 @@ RSAbstractChart >> updateChart: anEvent [ canvas zoomToFit. ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChart >> verticalTick [ ^ decorations detect: #isVerticalTick ifNone: [ nil ] ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xLinear [ ^ self xScale: NSScale linear ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xLn [ ^ self xScale: NSScale ln ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xLog [ ^ self xScale: NSScale symlog ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xRawLog [ "ensure all your data and axis do not contains zero" @@ -474,20 +476,20 @@ RSAbstractChart >> xRawLog [ ^ self xScale: NSScale log ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xRawLog: aNumber [ self horizontalTick locator: (RSLogLocator new base: aNumber). ^ self xScale: (NSLogScale new base: aNumber) ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xScale [ ^ xScale ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xScale: aScale [ xScale := aScale. @@ -495,89 +497,89 @@ RSAbstractChart >> xScale: aScale [ ^ aScale ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> xSqrt [ ^ self xScale: NSScale sqrt ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xTickLabels: aCollection [ self horizontalTick fromNames: aCollection. ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xTicks: collectionOfNumbers labels: aCollection [ self horizontalTick ticks: collectionOfNumbers labels: aCollection. ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xlabel [ ^ xlabel ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xlabel: aTitle [ "Set a label on the horizontal axis" xlabel := aTitle. ^ self addDecoration: (RSXLabelDecoration new title: aTitle) ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xlabel: aTitle offset: aPointOrANumber [ "Set a label on the horizontal axis, using an offset (useful to avoid overlap with axis labels)" ^ self addDecoration: (RSXLabelDecoration new title: aTitle; offset: aPointOrANumber) ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xlabelTop [ ^ xlabelTop ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> xlabelTop: aTitle [ "Set a label on the horizontal top axis" xlabelTop := aTitle. ^ self addDecoration: (RSXLabelDecoration new title: aTitle; above) ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yLinear [ ^ self yScale: NSScale linear ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yLn [ ^ self yScale: NSScale ln ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yLog [ ^ self yScale: NSScale symlog ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yRawLog [ "ensure all your data and axis do not contains zero" self verticalTick locator: RSLogLocator new. ^ self yScale: NSScale log ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yRawLog: aNumber [ self verticalTick locator: (RSLogLocator new base: aNumber). ^ self yScale: (NSLogScale new base: aNumber) ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yScale [ ^ yScale ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> yScale: aScale [ yScale := aScale. @@ -585,47 +587,47 @@ RSAbstractChart >> yScale: aScale [ ^ aScale ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSAbstractChart >> ySqrt [ ^ self yScale: NSScale sqrt ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> yTickLabels: aCollection [ self verticalTick fromNames: aCollection. ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> yTicks: collectionOfNumbers labels: aCollection [ self verticalTick ticks: collectionOfNumbers labels: aCollection. ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> ylabel [ ^ ylabel ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> ylabel: aTitle [ "Set a label on the vertical axis" ylabel := aTitle. ^ self addDecoration: (RSYLabelDecoration new title: aTitle) ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> ylabel: aTitle offset: aPointOrANumber [ "Set a label on the vertical axis, using an offset (useful to avoid overlap with axis labels)" ^ self addDecoration: (RSYLabelDecoration new title: aTitle ; offset: aPointOrANumber) ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> ylabelRight [ ^ ylabelRight ] -{ #category : #decoration } +{ #category : 'decoration' } RSAbstractChart >> ylabelRight: aTitle [ "Set a label on the vertical axis" ylabelRight := aTitle. diff --git a/src/Roassal-Chart/RSAbstractChartDecoration.class.st b/src/Roassal-Chart/RSAbstractChartDecoration.class.st index 1fddc829..da9d724d 100644 --- a/src/Roassal-Chart/RSAbstractChartDecoration.class.st +++ b/src/Roassal-Chart/RSAbstractChartDecoration.class.st @@ -14,8 +14,8 @@ - styler: the style of the decoration " Class { - #name : #RSAbstractChartDecoration, - #superclass : #RSObject, + #name : 'RSAbstractChartDecoration', + #superclass : 'RSObject', #instVars : [ 'xScale', 'yScale', @@ -23,50 +23,52 @@ Class { 'styler', 'masterShape' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> addShape: aShape [ "Add a shape to the canvas" chart canvas add: aShape ] -{ #category : #'private - adding' } +{ #category : 'private - adding' } RSAbstractChartDecoration >> addedIn: aPlot [ aPlot addDecoration: self ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> beforeRenderingIn: aChart [ ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> chart [ ^ chart ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> chart: aChart [ chart := aChart ] -{ #category : #'public - shape' } +{ #category : 'public - shape' } RSAbstractChartDecoration >> color [ ^ self shape color ] -{ #category : #'public - shape' } +{ #category : 'public - shape' } RSAbstractChartDecoration >> color: aColor [ self shape color: aColor ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> createXScale [ | padding | @@ -82,7 +84,7 @@ RSAbstractChartDecoration >> createXScale [ (chart extent x - padding) } ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> createYScale [ | padding | @@ -98,25 +100,25 @@ RSAbstractChartDecoration >> createYScale [ (chart extent y negated + padding) } ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> createdShapes [ ^ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChartDecoration >> defaultShape [ ^ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChartDecoration >> defaultStyler [ ^ RSChartStyler new ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractChartDecoration >> initialize [ super initialize. @@ -124,97 +126,97 @@ RSAbstractChartDecoration >> initialize [ styler := self defaultStyler ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChartDecoration >> isHorizontalTick [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChartDecoration >> isPlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChartDecoration >> isSpineDecoration [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChartDecoration >> isTitle [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractChartDecoration >> isVerticalTick [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> masterShape [ ^ masterShape ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> renderIn: aCanvas [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> shape [ ^ masterShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> shape: aRSShape [ masterShape := aRSShape ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractChartDecoration >> spine [ "Return the roassal shape that describes the spine" ^ chart spine ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> styler [ ^ styler ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> styler: aStyler [ styler := aStyler ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> xScale [ ^ xScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> xScale: aScale [ xScale := aScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> yScale [ ^ yScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartDecoration >> yScale: aScale [ yScale := aScale diff --git a/src/Roassal-Chart/RSAbstractChartPopupBuilder.class.st b/src/Roassal-Chart/RSAbstractChartPopupBuilder.class.st index 0f0a6d7a..de96ee67 100644 --- a/src/Roassal-Chart/RSAbstractChartPopupBuilder.class.st +++ b/src/Roassal-Chart/RSAbstractChartPopupBuilder.class.st @@ -2,25 +2,27 @@ Abstract class to descripbe how to create a popup for a given position " Class { - #name : #RSAbstractChartPopupBuilder, - #superclass : #RSObject, + #name : 'RSAbstractChartPopupBuilder', + #superclass : 'RSObject', #instVars : [ 'position' ], - #category : #'Roassal-Chart-Popup' + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartPopupBuilder >> position [ ^ position ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractChartPopupBuilder >> position: aPoint [ position := aPoint ] -{ #category : #hooks } +{ #category : 'hooks' } RSAbstractChartPopupBuilder >> shapeFor: aRSChart [ ^ self subclassResponsibility ] diff --git a/src/Roassal-Chart/RSAbstractLabelDecoration.class.st b/src/Roassal-Chart/RSAbstractLabelDecoration.class.st index 25edd74a..56d9c005 100644 --- a/src/Roassal-Chart/RSAbstractLabelDecoration.class.st +++ b/src/Roassal-Chart/RSAbstractLabelDecoration.class.st @@ -12,17 +12,19 @@ - title: the title of the label. " Class { - #name : #RSAbstractLabelDecoration, - #superclass : #RSAbstractChartDecoration, + #name : 'RSAbstractLabelDecoration', + #superclass : 'RSAbstractChartDecoration', #instVars : [ 'location', 'label', 'title' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractLabelDecoration >> createLabel [ "Utility method to create a label" ^ self shape copy @@ -31,91 +33,91 @@ RSAbstractLabelDecoration >> createLabel [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> createdShapes [ ^ { label } ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractLabelDecoration >> defaultShape [ ^ RSLabel new ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> fontSize [ "Return the font size to use when generating labels" ^ self shape fontSize ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> fontSize: fontSizeToUse [ "Set the font size to use when generating labels" self shape fontSize: fontSizeToUse ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> horizontal [ "Set the label horizontal" self rotationAngle: 0 ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractLabelDecoration >> initialize [ super initialize. location := RSLocation new ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> label [ ^ label ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> location: aRSLocation [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> offset [ ^ location offset ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> offset: aPointOrNumber [ "Set the translation distance to set the label" location offset: aPointOrNumber ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractLabelDecoration >> renderIn: canvas [ label := self createLabel. location move: label on: canvas encompassingRectangle. canvas add: label ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> rotationAngle: anAngleAsFloat [ "Set the rotation the label should have" ^ self shape rotateByDegrees: anAngleAsFloat ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> title [ ^ title ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> title: aLabelAsString [ "This method is useful to set the name of an axis" title := aLabelAsString ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractLabelDecoration >> vertical [ "Set the label vertical" self rotationAngle: -90 diff --git a/src/Roassal-Chart/RSAbstractMarkerDecoration.class.st b/src/Roassal-Chart/RSAbstractMarkerDecoration.class.st index 6bbaeb38..3f4d9a75 100644 --- a/src/Roassal-Chart/RSAbstractMarkerDecoration.class.st +++ b/src/Roassal-Chart/RSAbstractMarkerDecoration.class.st @@ -21,8 +21,8 @@ c =-=-=-==-=-=-==-=-=-= " Class { - #name : #RSAbstractMarkerDecoration, - #superclass : #RSAbstractChartDecoration, + #name : 'RSAbstractMarkerDecoration', + #superclass : 'RSAbstractChartDecoration', #traits : 'RSTLine', #classTraits : 'RSTLine classTrait', #instVars : [ @@ -30,54 +30,56 @@ Class { 'getRelevantValueBlock', 'lines' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractMarkerDecoration >> average [ self subclassResponsibility ] -{ #category : #'public - shape' } +{ #category : 'public - shape' } RSAbstractMarkerDecoration >> color: aColor [ super color: aColor. markerColor := aColor ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractMarkerDecoration >> createMarkerLineFromPlot: aPlot [ "This method should be overriden to produce a line" self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractMarkerDecoration >> createdShapes [ ^ lines ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractMarkerDecoration >> defaultDashStyle [ ^ #(2 2 2) ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractMarkerDecoration >> defaultMarkerColor [ ^ Color red ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractMarkerDecoration >> defaultShape [ ^ RSLine new ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractMarkerDecoration >> getValueToBeMarkedFromPlot: p [ ^ getRelevantValueBlock rsValue: p ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractMarkerDecoration >> initialize [ super initialize. @@ -87,22 +89,22 @@ RSAbstractMarkerDecoration >> initialize [ markerColor := self color ifNil: [ self defaultMarkerColor ] ifNotNil: [ self color ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractMarkerDecoration >> lines [ ^ lines ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractMarkerDecoration >> max [ self subclassResponsibility ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractMarkerDecoration >> min [ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractMarkerDecoration >> renderIn: canvas [ | line | @@ -114,7 +116,7 @@ RSAbstractMarkerDecoration >> renderIn: canvas [ lines := { line } as: RSGroup ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSAbstractMarkerDecoration >> value: aValue [ "Mark the value" getRelevantValueBlock := aValue diff --git a/src/Roassal-Chart/RSAbstractPlot.class.st b/src/Roassal-Chart/RSAbstractPlot.class.st index 9c92c77f..de993538 100644 --- a/src/Roassal-Chart/RSAbstractPlot.class.st +++ b/src/Roassal-Chart/RSAbstractPlot.class.st @@ -13,8 +13,8 @@ - yValues: the y values of the plot " Class { - #name : #RSAbstractPlot, - #superclass : #RSAbstractChart, + #name : 'RSAbstractPlot', + #superclass : 'RSAbstractChart', #instVars : [ 'chart', 'shape', @@ -22,30 +22,32 @@ Class { 'yValues', 'rawData' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot class >> isAbstract [ ^ self == RSAbstractPlot ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSAbstractPlot class >> points: aCollectionOfPoints [ ^ self new x: (aCollectionOfPoints collect: #x) y: (aCollectionOfPoints collect: #y); yourself. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSAbstractPlot class >> x: collectionX y: collectionY [ ^ self new x: collectionX y: collectionY; yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> + aRSPlot [ | newChart | newChart := (aRSPlot canHandleCluster and: [ self canHandleCluster ]) @@ -56,36 +58,36 @@ RSAbstractPlot >> + aRSPlot [ ^ newChart. ] -{ #category : #adding } +{ #category : 'adding' } RSAbstractPlot >> addedIn: aRSChart [ aRSChart addPlot: self ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> beforeRenderingIn: aChart [ self createXScale. self createYScale ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> canHandleCluster [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> chart [ ^ chart ifNil: [ self ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> chart: aChart [ chart := aChart ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> checkAssertion [ self @@ -97,59 +99,59 @@ RSAbstractPlot >> checkAssertion [ 'X and Y values have not the same size, and they should' ] -{ #category : #'public - shape' } +{ #category : 'public - shape' } RSAbstractPlot >> color [ ^ self shape color ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSAbstractPlot >> color: aColor [ self shape color: aColor ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSAbstractPlot >> computeColor [ "Return the color used by the chart element. The color is computed from the chart and from the colorBlock variable" ^ self color ifNil: [ self chart colorFor: self ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> createdShapes [ ^ self subclassResponsibility ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractPlot >> defaultShape [ ^ self subclassResponsibility ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> definedValuesX [ "Return the list of X values that are defined" ^ xValues select: [ :v | v isNaN not and: [ v isInfinite not ] ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> definedValuesY [ "Return the list Y values that are defined" ^ yValues select: [ :v | v isNaN not and: [ v isInfinite not ] ] ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractPlot >> initialize [ super initialize. shape := self defaultShape ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> invertCoordinates [ | auxScale | auxScale := self yScale. @@ -158,36 +160,36 @@ RSAbstractPlot >> invertCoordinates [ self x: self y y: self x. ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isBarPlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isBoxPlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isHorizontalBarPlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isLinePlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isPlot [ ^ true ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isPointWellDefined: aPoint [ "Indicate whether the point deserves to be displayed" @@ -195,29 +197,29 @@ RSAbstractPlot >> isPointWellDefined: aPoint [ aPoint x isNaN not and: [ aPoint y isNaN not ] ] ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isScatterPlot [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractPlot >> isVerticalBarPlot [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> masterShape [ ^ self shape ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> masterShape: aShape [ self shape: aShape ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractPlot >> maxChartValueX [ "if not set before, returns the maximum x value of the plot" @@ -229,7 +231,7 @@ RSAbstractPlot >> maxChartValueX [ ifNotNil: [ :res | res ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractPlot >> maxChartValueY [ "if not set before, returns the maximum y value of the plot" @@ -241,21 +243,21 @@ RSAbstractPlot >> maxChartValueY [ ifNotNil: [ :res | res ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> maxValueX [ "Return the maximum X value of the plot, excluding NaN and infinite" ^ self definedValuesX max ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> maxValueY [ "Return the maximum Y value of the plot, excluding NaN and infinite" ^ self definedValuesY max ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractPlot >> minChartValueX [ "if not set before, returns the minimum x value of the plot" @@ -267,7 +269,7 @@ RSAbstractPlot >> minChartValueX [ ifNotNil: [ :res | res ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSAbstractPlot >> minChartValueY [ "if not set before, returns the minimum y value of the plot" @@ -279,28 +281,28 @@ RSAbstractPlot >> minChartValueY [ ifNotNil: [ :res | res ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> minValueX [ "Return the minimum X value of the plot, excluding NaN and infinite" ^ self definedValuesX min ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> minValueY [ "Return the minimum Y value of the plot, excluding NaN and infinite" ^ self definedValuesY min ] -{ #category : #public } +{ #category : 'public' } RSAbstractPlot >> rawData: aCollection x: bloc1 y: bloc2 [ rawData := aCollection. self x: (rawData collect: bloc1) y: (rawData collect: bloc2) ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractPlot >> renderIn: aCanvas [ self beforeRenderingIn: self chart. @@ -311,31 +313,31 @@ RSAbstractPlot >> renderIn: aCanvas [ as: RSGroup ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSAbstractPlot >> scalePoint: aPoint [ ^ (xScale scale: aPoint x) @ (yScale scale: aPoint y) ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> shape [ ^ shape ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> shape: aRSShape [ shape := aRSShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> x [ ^ xValues ] -{ #category : #public } +{ #category : 'public' } RSAbstractPlot >> x: aCollection y: aCollection2 [ "Define a plot with the X and Y coordinates. Both X and Y are collections of the same size. @@ -373,19 +375,19 @@ c yValues := aCollection2 ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> xValues [ ^ xValues ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> y [ ^ yValues ] -{ #category : #public } +{ #category : 'public' } RSAbstractPlot >> y: aCollection [ "Define a plot with only a Y coordinate. The X coordinate is the index of the data point. @@ -411,7 +413,7 @@ c self x: (1 to: aCollection size) y: aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractPlot >> yValues [ ^ yValues diff --git a/src/Roassal-Chart/RSAbstractTick.class.st b/src/Roassal-Chart/RSAbstractTick.class.st index b0879b33..a28d060f 100644 --- a/src/Roassal-Chart/RSAbstractTick.class.st +++ b/src/Roassal-Chart/RSAbstractTick.class.st @@ -2,8 +2,8 @@ I define basic configuration for ticks, my subclasses creates lines and labels for each defined axis " Class { - #name : #RSAbstractTick, - #superclass : #RSAbstractChartDecoration, + #name : 'RSAbstractTick', + #superclass : 'RSAbstractChartDecoration', #instVars : [ 'ticks', 'labels', @@ -12,21 +12,23 @@ Class { 'tickLocator', 'ticksData' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> asFloat [ self asFloat: 3 ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> asFloat: numberOfDecimals [ "Do not convert the value when determining labels" self labelConversion: [ :value | value asFloat round: numberOfDecimals ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTick >> beforeRenderingIn: aChart [ self createXScale. @@ -43,7 +45,7 @@ RSAbstractTick >> beforeRenderingIn: aChart [ chart createYScale ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> computeTicksData [ | scaleToUse data | @@ -57,17 +59,17 @@ RSAbstractTick >> computeTicksData [ ^ data ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> configuration [ ^ configuration ifNil: [ configuration := self defaultConfiguration ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> configuration: aRSTickConfiguration [ configuration := aRSTickConfiguration ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTick >> createLabelFor: aValue index: index [ "Create a label and returns it." | tick lbl | @@ -78,44 +80,44 @@ RSAbstractTick >> createLabelFor: aValue index: index [ ^ lbl ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTick >> createTickLineFor: aNumber [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> createdShapes [ ^ labels, ticks ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractTick >> defaultConfiguration [ ^ RSTickConfiguration new ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSAbstractTick >> defaultLabelLocation [ ^ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractTick >> defaultLocator [ ^ RSAutoLocator new ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractTick >> defaultShape [ ^ RSLine new ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> doNotUseNiceLabel [ self locator: RSLinearLocator new ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> fontSize: fontSizeToSet [ "Set the font size used by the labels associated to ticks" @@ -138,38 +140,38 @@ c self configuration fontSize: fontSizeToSet ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> fromNames: aCollectionOfStrings [ | size | size := aCollectionOfStrings size. self ticks: (1 to: size) labels: aCollectionOfStrings. ] -{ #category : #initialization } +{ #category : 'initialization' } RSAbstractTick >> initialize [ super initialize. tickLocator := self defaultLocator ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> integer [ "Do not convert the value when determining labels" self labelConversion: [ :value | value asInteger ] ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> integerWithCommas [ "Do not convert the value when determining labels" self labelConversion: [ :value | value asInteger asStringWithCommas ] ] -{ #category : #testing } +{ #category : 'testing' } RSAbstractTick >> isTicksDataNil [ ^ ticksData isNil. ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> labelConversion: oneArgBlock [ "This method is used to convert numerical values into a label. This is useful to particularlize labels on the X or Y axes. The parameter block accepts one argument, which is a numerical value. The block should return a string or any other object. When displayed, the message asString will be sent to it. @@ -193,62 +195,62 @@ c self configuration labelConversion: oneArgBlock ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> labelLocation [ ^ labelLocation ifNil: [ labelLocation := self defaultLabelLocation ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> labelRotation [ ^ self configuration labelRotation ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> labelRotation: aNumber [ self configuration labelRotation: aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> labels [ ^ labels ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> locator [ ^ tickLocator ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> locator: aLocator [ tickLocator := aLocator ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> max [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> min [ ^ self subclassResponsibility ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSAbstractTick >> newLineTick [ ^ self shape copy color: self styler tickColor; yourself ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> noConvertion [ "Do not convert the value when determining labels" self labelConversion: [ :value | value ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> numberOfTicks: aNumber [ "Set the number of ticks to be used. Can be used with doNotUseNiceLabels or not. @@ -268,7 +270,7 @@ c self configuration numberOfTicks: aNumber ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTick >> renderIn: canvas [ ticksData := self ticksData. ticks := ticksData collect: [ :value | self createTickLineFor: value ]. @@ -281,7 +283,7 @@ RSAbstractTick >> renderIn: canvas [ canvas addAll: labels ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> scaleToUse [ ^ self isHorizontalTick @@ -289,12 +291,12 @@ RSAbstractTick >> scaleToUse [ ifFalse: [ yScale ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractTick >> ticks [ ^ ticks ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> ticks: collectionOfNumbers labels: collectionOfStrings [ self assert: collectionOfNumbers size = collectionOfStrings size @@ -312,35 +314,35 @@ RSAbstractTick >> ticks: collectionOfNumbers labels: collectionOfStrings [ ]. ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> ticksData [ ^ ticksData ifNil: [ ticksData := self computeTicksData ] ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> ticksData: collectionOfNumbers [ ticksData := collectionOfNumbers ] -{ #category : #rendering } +{ #category : 'rendering' } RSAbstractTick >> updateChartMaxAndMinValues: aChart [ self subclassResponsibility ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> useNiceLabel [ self locator: RSAutoLocator new ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> withLabels [ "Make the tick have label" self configuration shouldHaveLabels: true ] -{ #category : #public } +{ #category : 'public' } RSAbstractTick >> withNoLabels [ "Ticks have no label" self configuration shouldHaveLabels: false diff --git a/src/Roassal-Chart/RSAutoLocator.class.st b/src/Roassal-Chart/RSAutoLocator.class.st index 40449e81..0f3c038d 100644 --- a/src/Roassal-Chart/RSAutoLocator.class.st +++ b/src/Roassal-Chart/RSAutoLocator.class.st @@ -7,12 +7,14 @@ *Collaborators*: `RSAutoLocator` is used when rendering ticks. " Class { - #name : #RSAutoLocator, - #superclass : #RSTickLocator, - #category : #'Roassal-Chart-Ticks' + #name : 'RSAutoLocator', + #superclass : 'RSTickLocator', + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #generate } +{ #category : 'generate' } RSAutoLocator >> generateTicks: aScale with: numberOfTicks [ ^ aScale niceTicks: numberOfTicks diff --git a/src/Roassal-Chart/RSBarPlot.class.st b/src/Roassal-Chart/RSBarPlot.class.st index e74e4d1f..9bcda821 100644 --- a/src/Roassal-Chart/RSBarPlot.class.st +++ b/src/Roassal-Chart/RSBarPlot.class.st @@ -25,20 +25,22 @@ d ``` " Class { - #name : #RSBarPlot, - #superclass : #RSAbstractBarPlot, + #name : 'RSBarPlot', + #superclass : 'RSAbstractBarPlot', #instVars : [ 'bottom' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlot >> barScale [ ^ xScale ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlot >> beforeRenderingIn: aChart [ | barScale | @@ -50,12 +52,12 @@ RSBarPlot >> beforeRenderingIn: aChart [ aChart xScale: barScale. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlot >> bottom [ ^ bottom ] -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlot >> bottom: aCollection [ self assert: xValues size = aCollection size @@ -63,12 +65,12 @@ RSBarPlot >> bottom: aCollection [ bottom := aCollection ] -{ #category : #testing } +{ #category : 'testing' } RSBarPlot >> canHandleCluster [ ^ true ] -{ #category : #hooks } +{ #category : 'hooks' } RSBarPlot >> computeRectagleFor: aPoint index: index [ | origin corner sizeOffset offset zero | zero := 0. @@ -82,7 +84,7 @@ RSBarPlot >> computeRectagleFor: aPoint index: index [ corner: corner + offset + sizeOffset ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlot >> definedValuesY [ "Return the list Y values that are defined" | res | @@ -91,12 +93,12 @@ RSBarPlot >> definedValuesY [ ^ res, {0} ] -{ #category : #testing } +{ #category : 'testing' } RSBarPlot >> isVerticalBarPlot [ ^ true ] -{ #category : #hooks } +{ #category : 'hooks' } RSBarPlot >> modelFor: aPoint [ ^ aPoint y ] diff --git a/src/Roassal-Chart/RSBarPlotNew.class.st b/src/Roassal-Chart/RSBarPlotNew.class.st index 0183361b..134f94c2 100644 --- a/src/Roassal-Chart/RSBarPlotNew.class.st +++ b/src/Roassal-Chart/RSBarPlotNew.class.st @@ -1,10 +1,12 @@ Class { - #name : #RSBarPlotNew, - #superclass : #RSAbstractBandPlot, - #category : #'Roassal-Chart-Core' + #name : 'RSBarPlotNew', + #superclass : 'RSAbstractBandPlot', + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> example01BarPlot [ | p1 data1 | data1 := { 9. 9. 7. 20. 5. 10. }. @@ -12,7 +14,7 @@ RSBarPlotNew class >> example01BarPlot [ ^ p1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> example02BarPlotHorizontal [ | p1 data1 | data1 := { 9. 9. 7. 19. 5. 10. }. @@ -21,7 +23,7 @@ RSBarPlotNew class >> example02BarPlotHorizontal [ ^ p1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> example03BarPlotPositions [ | p1 data1 | data1 := { 9. 9. 7. 20. 5. 10. }. @@ -30,7 +32,7 @@ RSBarPlotNew class >> example03BarPlotPositions [ ^ p1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> example04BarPlotPositions [ | x y plot1 | @@ -40,7 +42,7 @@ RSBarPlotNew class >> example04BarPlotPositions [ ^ plot1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> exampleClusterBarPlots [ | p1 p2 chart data1 data2 x | data1 := { 10. 9. 7 }. "blue" @@ -52,7 +54,7 @@ RSBarPlotNew class >> exampleClusterBarPlots [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSBarPlotNew class >> exampleClusterBarPlots4Bars [ | p1 p2 chart data1 data2 x p3 p4| data1 := { 10. 9. 7 }. "blue" @@ -66,28 +68,28 @@ RSBarPlotNew class >> exampleClusterBarPlots4Bars [ ^ chart open. ] -{ #category : #testing } +{ #category : 'testing' } RSBarPlotNew >> canHandleCluster [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlotNew >> createdShapes [ ^ { bandPlotShapes } ] -{ #category : #public } +{ #category : 'public' } RSBarPlotNew >> data: aCollection [ bandPlotShapes := aCollection collect: [ :value | RSBarPlotShape data: value ]. ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSBarPlotNew >> defaultShape [ ^ RSBox new noPaint ] -{ #category : #initialization } +{ #category : 'initialization' } RSBarPlotNew >> initialize [ super initialize. horizontal := false. @@ -95,7 +97,7 @@ RSBarPlotNew >> initialize [ offset := 0. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlotNew >> renderIn: canvas [ super renderIn: canvas. self computeBandsOffset. diff --git a/src/Roassal-Chart/RSBarPlotShape.class.st b/src/Roassal-Chart/RSBarPlotShape.class.st index 0dfabdf9..f92d3b6c 100644 --- a/src/Roassal-Chart/RSBarPlotShape.class.st +++ b/src/Roassal-Chart/RSBarPlotShape.class.st @@ -1,19 +1,21 @@ Class { - #name : #RSBarPlotShape, - #superclass : #RSAbstractBandPlotShape, + #name : 'RSBarPlotShape', + #superclass : 'RSAbstractBandPlotShape', #instVars : [ 'data', 'bar' ], - #category : #'Roassal-Chart-Plots' + #category : 'Roassal-Chart-Plots', + #package : 'Roassal-Chart', + #tag : 'Plots' } -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlotShape class >> data: aValue [ ^ (self new) data: aValue. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBarPlotShape >> createBar [ | barPoints | @@ -27,7 +29,7 @@ RSBarPlotShape >> createBar [ bar points: barPoints. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBarPlotShape >> createShapesAndLines [ | shapes | self createBar. @@ -36,19 +38,19 @@ RSBarPlotShape >> createShapesAndLines [ ^ shapes ] -{ #category : #accessing } +{ #category : 'accessing' } RSBarPlotShape >> data: aValue [ data := aValue ] -{ #category : #shapes } +{ #category : 'shapes' } RSBarPlotShape >> defaultBar [ ^ RSPolygon new color: color; border: (RSBorder new color: Color black; joinRound). ] -{ #category : #initialization } +{ #category : 'initialization' } RSBarPlotShape >> initialize [ super initialize. bar := self defaultBar. @@ -56,12 +58,12 @@ RSBarPlotShape >> initialize [ shouldShowBand := self defaultShouldShowBand. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlotShape >> maxDataValue [ ^ data ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlotShape >> minDataValue [ | minValue | minValue := 0. @@ -69,7 +71,7 @@ RSBarPlotShape >> minDataValue [ ^ minValue ] -{ #category : #rendering } +{ #category : 'rendering' } RSBarPlotShape >> renderIn: canvas [ self addChildrenToComposite. canvas add: self. diff --git a/src/Roassal-Chart/RSBinSizeBinning.class.st b/src/Roassal-Chart/RSBinSizeBinning.class.st index 8b118a53..cc63de12 100644 --- a/src/Roassal-Chart/RSBinSizeBinning.class.st +++ b/src/Roassal-Chart/RSBinSizeBinning.class.st @@ -2,20 +2,22 @@ I am an strategy used by RSHistogramPlot by the method binSize: " Class { - #name : #RSBinSizeBinning, - #superclass : #RSAbstractBinning, + #name : 'RSBinSizeBinning', + #superclass : 'RSAbstractBinning', #instVars : [ 'size' ], - #category : #'Roassal-Chart-Strategy' + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #hooks } +{ #category : 'hooks' } RSBinSizeBinning >> computeNumberOfBinsFor: aCollection [ ^ (self createBinsFor: aCollection) size - 1 ] -{ #category : #hooks } +{ #category : 'hooks' } RSBinSizeBinning >> createBinsFor: aCollection [ | interval | interval := aCollection first to: aCollection last by: size. @@ -24,13 +26,13 @@ RSBinSizeBinning >> createBinsFor: aCollection [ ifFalse: [ interval ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBinSizeBinning >> size [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } RSBinSizeBinning >> size: anObject [ size := anObject diff --git a/src/Roassal-Chart/RSBlockChartPopupBuilder.class.st b/src/Roassal-Chart/RSBlockChartPopupBuilder.class.st index a965ffb1..502e2ac5 100644 --- a/src/Roassal-Chart/RSBlockChartPopupBuilder.class.st +++ b/src/Roassal-Chart/RSBlockChartPopupBuilder.class.st @@ -2,20 +2,22 @@ This uses a block, avoid to use this class and create a subclass of RSLineChartPopupBuilder " Class { - #name : #RSBlockChartPopupBuilder, - #superclass : #RSLineChartPopupBuilder, + #name : 'RSBlockChartPopupBuilder', + #superclass : 'RSLineChartPopupBuilder', #instVars : [ 'rowShapeBlock' ], - #category : #'Roassal-Chart-Popup' + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #accessing } +{ #category : 'accessing' } RSBlockChartPopupBuilder >> rowShapeBlock [ ^ rowShapeBlock ] -{ #category : #accessing } +{ #category : 'accessing' } RSBlockChartPopupBuilder >> rowShapeBlock: aBlock [ "two arguments block first argument is the line plot. @@ -24,7 +26,7 @@ RSBlockChartPopupBuilder >> rowShapeBlock: aBlock [ rowShapeBlock := aBlock ] -{ #category : #hooks } +{ #category : 'hooks' } RSBlockChartPopupBuilder >> rowShapeFor: aRSLinePlot point: aPoint [ ^ rowShapeBlock value: aRSLinePlot value: aPoint ] diff --git a/src/Roassal-Chart/RSBoxPlot.class.st b/src/Roassal-Chart/RSBoxPlot.class.st index 7a48b475..9d76519f 100644 --- a/src/Roassal-Chart/RSBoxPlot.class.st +++ b/src/Roassal-Chart/RSBoxPlot.class.st @@ -100,12 +100,14 @@ c open ``` " Class { - #name : #RSBoxPlot, - #superclass : #RSAbstractBandPlot, - #category : #'Roassal-Chart-Core' + #name : 'RSBoxPlot', + #superclass : 'RSAbstractBandPlot', + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSBoxPlot class >> data: aCollection [ | boxPlot | boxPlot := self new. @@ -113,7 +115,7 @@ RSBoxPlot class >> data: aCollection [ ^ boxPlot ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example01BoxPlot [ | boxPlot data | data := { 1. 2. 3. 4. 5. } . @@ -121,7 +123,7 @@ RSBoxPlot class >> example01BoxPlot [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> example01Days [ | chart p1 p2 p3 y1 y2 y3 | @@ -145,7 +147,7 @@ RSBoxPlot class >> example01Days [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example02BoxPlotOfMultipleDatasets [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -156,7 +158,7 @@ RSBoxPlot class >> example02BoxPlotOfMultipleDatasets [ ^ boxPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example03BoxWithNotch [ | p1 y1 | @@ -169,7 +171,7 @@ RSBoxPlot class >> example03BoxWithNotch [ ^ p1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example04BoxPlotHorizontal [ | boxPlot data | data := { 1. 2. 3. 4. 5. } . @@ -178,7 +180,7 @@ RSBoxPlot class >> example04BoxPlotHorizontal [ ^ boxPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example05BoxPlotsHorizontal [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -189,7 +191,7 @@ RSBoxPlot class >> example05BoxPlotsHorizontal [ ^ boxPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example05BoxPlotsHorizontalShowBands [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -201,7 +203,7 @@ RSBoxPlot class >> example05BoxPlotsHorizontalShowBands [ ^ boxPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example06Days [ | chart p1 p2 p3 y1 y2 y3 | @@ -225,7 +227,7 @@ RSBoxPlot class >> example06Days [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example06DaysHorizontal [ | chart p1 p2 p3 y1 y2 y3 | @@ -250,7 +252,7 @@ RSBoxPlot class >> example06DaysHorizontal [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example06DaysShowBands [ | chart p1 p2 p3 y1 y2 y3 | @@ -277,7 +279,7 @@ RSBoxPlot class >> example06DaysShowBands [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example07BoxPlotGroupsHorizontal [ | boxPlot boxPlot1 boxPlot2 boxPlot3 data1 data2 data3 | "TO DO" @@ -300,7 +302,7 @@ RSBoxPlot class >> example07BoxPlotGroupsHorizontal [ ^ boxPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSBoxPlot class >> example08Positions [ | boxPlot1 data1 | data1 := { { 1. 2. 3. 4. 5. } . @@ -313,7 +315,7 @@ RSBoxPlot class >> example08Positions [ ^ boxPlot1 open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotChangeBoxWidth [ | boxPlot1 data1 | data1 := { 12. 12. 13. 14. 15. 24. }. @@ -324,7 +326,7 @@ RSBoxPlot class >> exampleBoxPlotChangeBoxWidth [ ^ boxPlot1 open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotChangeSpaceBetweenBoxes [ | clusterChart boxPlot1 boxPlot2 data1 data2 | data1 := { { 1. 2. 3. 4. 5. } . @@ -343,7 +345,7 @@ RSBoxPlot class >> exampleBoxPlotChangeSpaceBetweenBoxes [ ^ clusterChart open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotChangeSpaceBetweenClusters [ | clusterChart boxPlot1 boxPlot2 data1 data2 | data1 := { { 1. 2. 3. 4. 5. } . @@ -362,7 +364,7 @@ RSBoxPlot class >> exampleBoxPlotChangeSpaceBetweenClusters [ ^ clusterChart open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroups [ | boxPlot boxPlot1 boxPlot2 boxPlot3 data1 data2 data3 | data1 := { { 1. 2. 3. 4. 5. } . @@ -381,7 +383,7 @@ RSBoxPlot class >> exampleBoxPlotGroups [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroupsCustomColorPalette [ | boxPlot boxPlot1 boxPlot2 boxPlot3 data1 data2 data3 | data1 := { { 1. 2. 3. 4. 5. } . @@ -401,7 +403,7 @@ RSBoxPlot class >> exampleBoxPlotGroupsCustomColorPalette [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroupsEven [ | boxPlot boxPlot1 boxPlot2 data1 data2 | data1 := { { 1. 2. 3. 4. 5. } . @@ -416,7 +418,7 @@ RSBoxPlot class >> exampleBoxPlotGroupsEven [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroupsEven4 [ | boxPlot boxPlot1 boxPlot2 boxPlot3 data1 data2 boxPlot4 | data1 := { { 1. 2. 3. 4. 5. } . @@ -433,7 +435,7 @@ RSBoxPlot class >> exampleBoxPlotGroupsEven4 [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroupsOdd [ | boxPlot boxPlot1 boxPlot2 boxPlot3 data1 data2 data3 | data1 := { { 1. 2. 3. 4. 5. } . @@ -452,7 +454,7 @@ RSBoxPlot class >> exampleBoxPlotGroupsOdd [ ^ boxPlot open. ] -{ #category : #'examples - cluster' } +{ #category : 'examples - cluster' } RSBoxPlot class >> exampleBoxPlotGroupsOdd5 [ | boxPlot boxPlot1 boxPlot2 boxPlot3 boxPlot4 boxPlot5 data1 data2 data3 | data1 := { { 1. 2. 3. 4. 5. } . @@ -473,7 +475,7 @@ RSBoxPlot class >> exampleBoxPlotGroupsOdd5 [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyle [ | boxPlot data paint | data := { { 1. 2. 3. 4. 5. } . @@ -488,7 +490,7 @@ RSBoxPlot class >> exampleBoxPlotStyle [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleBoxFillColor [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -499,7 +501,7 @@ RSBoxPlot class >> exampleBoxPlotStyleBoxFillColor [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleBoxFillColorsCollection [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -510,7 +512,7 @@ RSBoxPlot class >> exampleBoxPlotStyleBoxFillColorsCollection [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleMedianLine [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -524,7 +526,7 @@ RSBoxPlot class >> exampleBoxPlotStyleMedianLine [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleMedianLineColor [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -535,7 +537,7 @@ RSBoxPlot class >> exampleBoxPlotStyleMedianLineColor [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleOneMedianLineColor [ | boxPlot data | data := { { 1. 2. 3. 4. 5. } . @@ -547,7 +549,7 @@ RSBoxPlot class >> exampleBoxPlotStyleOneMedianLineColor [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleOutlierShape [ | boxPlot1 data1 | data1 := { { 12. 12. 13. 14. 15. 24. } . @@ -560,7 +562,7 @@ RSBoxPlot class >> exampleBoxPlotStyleOutlierShape [ ^ boxPlot1 open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleOutliersColor [ | boxPlot boxPlot1 boxPlot2 data1 data2 | data1 := { { 1. 2. 3. 4. 5. } . @@ -577,7 +579,7 @@ RSBoxPlot class >> exampleBoxPlotStyleOutliersColor [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleBoxPlotStyleWhiskerFormat [ | boxPlot boxPlot1 data1 data2 boxPlot2 | data1 := { { 1. 2. 3. 4. 5. } . @@ -594,7 +596,7 @@ RSBoxPlot class >> exampleBoxPlotStyleWhiskerFormat [ ^ boxPlot open. ] -{ #category : #'examples - style' } +{ #category : 'examples - style' } RSBoxPlot class >> exampleSetYTicksLabels [ | p1 y1 | @@ -607,22 +609,22 @@ RSBoxPlot class >> exampleSetYTicksLabels [ ^ p1 open. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> boxShapes [ ^ bandPlotShapes. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> boxShapes: collectionOfRSBoxPlotShape [ bandPlotShapes := collectionOfRSBoxPlotShape. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> boxes [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :boxShape | boxShape box ]); yourself. ] -{ #category : #public } +{ #category : 'public' } RSBoxPlot >> buildChart [ chart add: self. chart @@ -631,22 +633,22 @@ RSBoxPlot >> buildChart [ ^ chart ] -{ #category : #testing } +{ #category : 'testing' } RSBoxPlot >> canHandleCluster [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> color: aColor [ bandPlotShapes do: [ :boxShape | boxShape color: aColor ]. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> colors: collectionOfColors [ bandPlotShapes with: collectionOfColors do: [ :bandShape :color | bandShape color: color ]. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> computeBoxGraphicsCenters [ | lastBoxCenter | lastBoxCenter := 1. @@ -657,37 +659,32 @@ RSBoxPlot >> computeBoxGraphicsCenters [ ]). ] -{ #category : #rendering } -RSBoxPlot >> computeDefualtXTicks [ - self horizontalTick ticks ifNil: [ self xTickLabels: (1 to: self numberOfBoxes) ]. -] - -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> confidenceInterval [ ^ self confidenceIntervals first ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> confidenceIntervals [ ^ bandPlotShapes collect: [ :boxShape | boxShape confidenceInterval ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> confidencePercentage [ ^ bandPlotShapes collect: [ :boxShape | boxShape confidencePercentage ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> confidencePercentage: aPercentage [ bandPlotShapes do: [ :boxShape | boxShape confidencePercentage: aPercentage ]. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> createdShapes [ ^ { self boxShapes. } ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> data: aCollection [ | collectionOfDatasets | @@ -699,91 +696,91 @@ RSBoxPlot >> data: aCollection [ self computeBoxGraphicsCenters. ] -{ #category : #initialization } +{ #category : 'initialization' } RSBoxPlot >> defaultShape [ ^ RSPolygon new noPaint. ] -{ #category : #initialization } +{ #category : 'initialization' } RSBoxPlot >> initialize [ super initialize. offset := 0. horizontal := false. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> iqr [ ^ self iqrs first. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> iqrs [ ^ bandPlotShapes collect: [ :box | box iqr ]. ] -{ #category : #testing } +{ #category : 'testing' } RSBoxPlot >> isBoxPlot [ ^ true ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> median [ ^ self medians first. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> medianConfidenceInterval [ ^ self medianConfidenceIntervals first ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> medianConfidenceIntervals [ ^ bandPlotShapes collect: [ :boxShape | boxShape medianConfidenceInterval ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> medianLines [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :box | box medianLine ]); yourself. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> medians [ ^ bandPlotShapes collect: [ :box | box median ]. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> notch: aBool [ bandPlotShapes do: [ :boxShape | boxShape notch: aBool ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> numberOfBoxes [ ^ self boxShapes size. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> outlier: markerShape [ bandPlotShapes do: [ :box | box outlier: markerShape ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> outlierMarker: markerShapeString [ bandPlotShapes do: [ :box | box outlierMarker: markerShapeString ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> outliers [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :box | box outliers ]); yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> quartiles [ | quartilesArray | quartilesArray := bandPlotShapes collect: [ :boxShape | boxShape quartiles ]. bandPlotShapes size = 1 ifTrue: [ ^quartilesArray first ] ifFalse: [ quartilesArray ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> renderIn: canvas [ super renderIn: canvas. self computeBandsOffset. @@ -795,17 +792,17 @@ RSBoxPlot >> renderIn: canvas [ aRSBoxPlotShape renderIn: canvas ]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlot >> whiskerFormat: aString [ bandPlotShapes do: [ :box | box whiskerFormat: aString ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> whiskers [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :box | box whiskers ]); yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlot >> y: aCollection [ self data: aCollection. ] diff --git a/src/Roassal-Chart/RSBoxPlotShape.class.st b/src/Roassal-Chart/RSBoxPlotShape.class.st index 9bb5f75f..2a5156bc 100644 --- a/src/Roassal-Chart/RSBoxPlotShape.class.st +++ b/src/Roassal-Chart/RSBoxPlotShape.class.st @@ -29,8 +29,8 @@ boxPlotShape := RSBoxPlotShape data: data. ``` " Class { - #name : #RSBoxPlotShape, - #superclass : #RSAbstractBandPlotShape, + #name : 'RSBoxPlotShape', + #superclass : 'RSAbstractBandPlotShape', #instVars : [ 'statisticalMeasures', 'box', @@ -45,10 +45,12 @@ Class { 'notched', 'notchWidthPercentage' ], - #category : #'Roassal-Chart-Plots' + #category : 'Roassal-Chart-Plots', + #package : 'Roassal-Chart', + #tag : 'Plots' } -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape class >> data: collectionOfData1D [ | boxGraph | boxGraph := self new. @@ -56,7 +58,7 @@ RSBoxPlotShape class >> data: collectionOfData1D [ ^ boxGraph ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape class >> data: collectionOfData1D scales: collectionOfNSScales [ | boxGraph | boxGraph := self data: collectionOfData1D. @@ -64,38 +66,38 @@ RSBoxPlotShape class >> data: collectionOfData1D scales: collectionOfNSScales [ ^ boxGraph. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> box [ ^ box ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> boxWidth [ ^ bandWidth. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> center [ ^ graphCenter ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> confidenceInterval [ ^ statisticalMeasures confidenceInterval. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> confidencePercentage [ ^ medianConfidencePercentage ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> confidencePercentage: aNumber [ medianConfidencePercentage := aNumber. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBoxPlotShape >> createBoxShape [ | boxPoints q025 q075 quartiles median medianConfidenceInterval medianCIMax medianCIMin notchWidth | quartiles := statisticalMeasures quartiles. @@ -134,7 +136,7 @@ RSBoxPlotShape >> createBoxShape [ box points: boxPoints. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBoxPlotShape >> createMedianLine [ | q050 medianLinePoints lineWidth | q050 := statisticalMeasures quartiles second. @@ -147,7 +149,7 @@ RSBoxPlotShape >> createMedianLine [ medianLine := medianLine controlPoints: medianLinePoints. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBoxPlotShape >> createOutliersShapes [ | outliersPoints outlierDefaultSize| "graphCenter was already computed in shapesWithCenterAt" @@ -161,7 +163,7 @@ RSBoxPlotShape >> createOutliersShapes [ ] as: RSGroup. ] -{ #category : #shapes } +{ #category : 'shapes' } RSBoxPlotShape >> createShapesAndLines [ | shapes | self graphCenter: bandOffset. @@ -180,7 +182,7 @@ RSBoxPlotShape >> createShapesAndLines [ ^ shapes ] -{ #category : #shapes } +{ #category : 'shapes' } RSBoxPlotShape >> createWhiskerLines [ | upperLimit lowerLimit q1 q3 upperWhiskerPoints lowerWhiskerPoints | upperLimit := statisticalMeasures upperLimit. @@ -196,56 +198,56 @@ RSBoxPlotShape >> createWhiskerLines [ lowerWhisker controlPoints: lowerWhiskerPoints. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> data [ ^ self statisticalMeasures data. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> data: collectionOfData1D [ self statisticalMeasures: (RSStatisticalMeasures data: collectionOfData1D). ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultBandPadding [ ^ 0.2 ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultBox [ ^ RSPolygon new color: color; border: (RSBorder new color: Color black; joinRound). ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultBoxWidth [ ^ 0.7 ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultGraphCenter [ ^ 1 ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultMedianConfidencePercentage [ ^ 95 ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultMedianLine [ ^ RSLine new width: 2; color: Color black. ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultNotched [ ^ false. ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultOutlier [ ^ RSEllipse new radius: 4; @@ -253,29 +255,29 @@ RSBoxPlotShape >> defaultOutlier [ size: 0. ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> defaultWhisker [ ^ RSLine new width: 1; color: Color black. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> graphCenter [ ^ graphCenter. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> graphCenter: aNumber [ graphCenter := aNumber. ] -{ #category : #defaults } +{ #category : 'defaults' } RSBoxPlotShape >> hasOutliers [ ^ self outlierValues isNotEmpty ] -{ #category : #initialization } +{ #category : 'initialization' } RSBoxPlotShape >> initialize [ super initialize. graphCenter := self defaultGraphCenter. @@ -292,22 +294,22 @@ RSBoxPlotShape >> initialize [ horizontal := false. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> iqr [ ^ statisticalMeasures iqr. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> lowerLimit [ ^ statisticalMeasures lowerLimit. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> lowerWhisker [ ^ lowerWhisker ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlotShape >> maxDataValue [ | maxValue | maxValue := self upperLimit. @@ -317,33 +319,33 @@ RSBoxPlotShape >> maxDataValue [ ^ maxValue. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> median [ ^ statisticalMeasures median. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> medianConfidenceInterval [ ^ statisticalMeasures medianConfidenceInterval. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> medianConfidencePercentage: aNumber [ medianConfidencePercentage := aNumber. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> medianLine [ ^ medianLine. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> medianLine: aRSLineModel [ medianLine := aRSLineModel copy ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlotShape >> minDataValue [ | minValue | minValue := self lowerLimit. @@ -353,89 +355,89 @@ RSBoxPlotShape >> minDataValue [ ^ minValue. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> notch: aBoolean [ notched := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outlier: markerShape [ outlier := markerShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outlierMarker: markerShapeString [ outlier := (RSShapeFactory shapeFromString: markerShapeString) color: Color black. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outlierSize: aDimensionInPixels [ outlier size: aDimensionInPixels. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outlierValues [ ^ statisticalMeasures outliers. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outliers [ ^ outlier. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> outliers: aRSGroupOfRSElipses [ outliers := aRSGroupOfRSElipses ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> quartiles [ ^ statisticalMeasures quartiles. ] -{ #category : #rendering } +{ #category : 'rendering' } RSBoxPlotShape >> renderIn: canvas [ self addChildrenToComposite. canvas add: self. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> scalePoint: aPoint [ ^ (bandScale scale: aPoint x) @ (dataScale scale: aPoint y) ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> scales: collectionOfNSScales [ self bandScale: collectionOfNSScales first. self dataScale: collectionOfNSScales second. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> statisticalMeasures [ ^ statisticalMeasures. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> statisticalMeasures: aRSStatisticalMeasures [ statisticalMeasures := aRSStatisticalMeasures. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> upperLimit [ ^ statisticalMeasures upperLimit. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> upperWhisker [ ^ upperWhisker ] -{ #category : #public } +{ #category : 'public' } RSBoxPlotShape >> whiskerFormat: aString [ whisker format: aString. ] -{ #category : #accessing } +{ #category : 'accessing' } RSBoxPlotShape >> whiskers [ ^ whisker. ] diff --git a/src/Roassal-Chart/RSChart.class.st b/src/Roassal-Chart/RSChart.class.st index 83df2b62..0f71c4fe 100644 --- a/src/Roassal-Chart/RSChart.class.st +++ b/src/Roassal-Chart/RSChart.class.st @@ -2,12 +2,14 @@ RSChart is a class that is going to be removed, please use RSCompositeChart " Class { - #name : #RSChart, - #superclass : #RSCompositeChart, - #category : #'Roassal-Chart-Core' + #name : 'RSChart', + #superclass : 'RSCompositeChart', + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } RSChart class >> isDeprecated [ ^ true ] diff --git a/src/Roassal-Chart/RSChartExtents.class.st b/src/Roassal-Chart/RSChartExtents.class.st index 28dd2319..af47be71 100644 --- a/src/Roassal-Chart/RSChartExtents.class.st +++ b/src/Roassal-Chart/RSChartExtents.class.st @@ -6,8 +6,8 @@ This class provides some extents for RSChart - padding: an internal gap between plots and base rectangle " Class { - #name : #RSChartExtents, - #superclass : #RSObject, + #name : 'RSChartExtents', + #superclass : 'RSObject', #instVars : [ 'extent', 'maxValueX', @@ -16,65 +16,67 @@ Class { 'minValueY', 'padding' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> extent [ ^ extent ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> extent: aPoint [ extent := aPoint ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> maxValueX [ ^ maxValueX ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> maxValueX: aNumber [ maxValueX := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> maxValueY [ ^ maxValueY ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> maxValueY: aNumber [ maxValueY := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> minValueX [ ^ minValueX ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> minValueX: aNumber [ minValueX := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> minValueY [ ^ minValueY ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> minValueY: aNumber [ minValueY := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> padding [ ^ padding ifNil: [ padding := 0@0 ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartExtents >> padding: aPoint [ padding := aPoint ] diff --git a/src/Roassal-Chart/RSChartPopupDecoration.class.st b/src/Roassal-Chart/RSChartPopupDecoration.class.st index ae929e92..903fe4f3 100644 --- a/src/Roassal-Chart/RSChartPopupDecoration.class.st +++ b/src/Roassal-Chart/RSChartPopupDecoration.class.st @@ -2,60 +2,62 @@ Specific popup, used by RSPopupDecoration " Class { - #name : #RSChartPopupDecoration, - #superclass : #RSPopup, + #name : 'RSChartPopupDecoration', + #superclass : 'RSPopup', #instVars : [ 'chart', 'chartPopupBuilder', 'markersPopupBuilder' ], - #category : #'Roassal-Chart-Popup' + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> chart [ ^ chart ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> chart: aRSChart [ chart := aRSChart ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> chartPopupBuilder [ ^ chartPopupBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> chartPopupBuilder: aShapeBuilder [ chartPopupBuilder := aShapeBuilder ] -{ #category : #initialization } +{ #category : 'initialization' } RSChartPopupDecoration >> initialize [ super initialize. "this composite is created once when the mouse enter into the box shape" self shapeBuilder: [ :obj | RSComposite new ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> markersPopupBuilder [ ^ markersPopupBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartPopupDecoration >> markersPopupBuilder: aRSAbstractChartPopupBuilder [ markersPopupBuilder := aRSAbstractChartPopupBuilder ] -{ #category : #hooks } +{ #category : 'hooks' } RSChartPopupDecoration >> releasePopup: popup [ popup remove. chart container propertyAt: #popupMarkers ifPresent: [ :old | old remove ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSChartPopupDecoration >> translatePopup: popup event: evt [ self updatePopup: popup event: evt; @@ -63,7 +65,7 @@ RSChartPopupDecoration >> translatePopup: popup event: evt [ super translatePopup: popup event: evt ] -{ #category : #hooks } +{ #category : 'hooks' } RSChartPopupDecoration >> updateMarkers: evt [ | markers key container builder | builder := self markersPopupBuilder. @@ -77,7 +79,7 @@ RSChartPopupDecoration >> updateMarkers: evt [ ^ builder ] -{ #category : #hooks } +{ #category : 'hooks' } RSChartPopupDecoration >> updatePopup: popup event: evt [ "we recreate the popup content each time, since the popup should show the nodes change" | builder rect | diff --git a/src/Roassal-Chart/RSChartSpineDecoration.class.st b/src/Roassal-Chart/RSChartSpineDecoration.class.st index 0089816c..072604c5 100644 --- a/src/Roassal-Chart/RSChartSpineDecoration.class.st +++ b/src/Roassal-Chart/RSChartSpineDecoration.class.st @@ -12,25 +12,27 @@ The method is not meant to be used by a normal user as it represents a functiona " Class { - #name : #RSChartSpineDecoration, - #superclass : #RSAbstractChartDecoration, + #name : 'RSChartSpineDecoration', + #superclass : 'RSAbstractChartDecoration', #instVars : [ 'box' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #accessing } +{ #category : 'accessing' } RSChartSpineDecoration >> box [ ^ box ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartSpineDecoration >> createdShapes [ ^ { box } ] -{ #category : #initialization } +{ #category : 'initialization' } RSChartSpineDecoration >> defaultShape [ ^ RSBox new noPaint; @@ -38,12 +40,12 @@ RSChartSpineDecoration >> defaultShape [ yourself ] -{ #category : #testing } +{ #category : 'testing' } RSChartSpineDecoration >> isSpineDecoration [ ^ true ] -{ #category : #rendering } +{ #category : 'rendering' } RSChartSpineDecoration >> renderIn: canvas [ box := self shape copy @@ -53,7 +55,7 @@ RSChartSpineDecoration >> renderIn: canvas [ canvas add: box ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartSpineDecoration >> zeroPoint [ ^ 0 @ self chart extent y ] diff --git a/src/Roassal-Chart/RSChartStyler.class.st b/src/Roassal-Chart/RSChartStyler.class.st index 804b2072..a8928fc5 100644 --- a/src/Roassal-Chart/RSChartStyler.class.st +++ b/src/Roassal-Chart/RSChartStyler.class.st @@ -2,8 +2,8 @@ A chart styler is responsible to styler a chart and its element, in the future it would be connected to css description " Class { - #name : #RSChartStyler, - #superclass : #RSObject, + #name : 'RSChartStyler', + #superclass : 'RSObject', #instVars : [ 'textColor', 'textFont', @@ -11,10 +11,12 @@ Class { 'tickColor', 'spineColor' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #initialization } +{ #category : 'initialization' } RSChartStyler >> initialize [ super initialize. self @@ -23,61 +25,61 @@ RSChartStyler >> initialize [ spineColor: Color black ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> spineColor [ ^ spineColor ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> spineColor: anObject [ spineColor := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textColor [ ^ textColor ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textColor: anObject [ textColor := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textFont [ ^ textFont ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textFont: anObject [ textFont := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textSize [ ^ textSize ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> textSize: anObject [ textSize := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> tickColor [ ^ tickColor ] -{ #category : #accessing } +{ #category : 'accessing' } RSChartStyler >> tickColor: anObject [ tickColor := anObject diff --git a/src/Roassal-Chart/RSChartTitleDecoration.class.st b/src/Roassal-Chart/RSChartTitleDecoration.class.st index cf881ab5..6d433df8 100644 --- a/src/Roassal-Chart/RSChartTitleDecoration.class.st +++ b/src/Roassal-Chart/RSChartTitleDecoration.class.st @@ -18,17 +18,19 @@ p open ``` " Class { - #name : #RSChartTitleDecoration, - #superclass : #RSAbstractLabelDecoration, - #category : #'Roassal-Chart-Decoration' + #name : 'RSChartTitleDecoration', + #superclass : 'RSAbstractLabelDecoration', + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #rendering } +{ #category : 'rendering' } RSChartTitleDecoration >> defaultFontSize [ ^ 15 ] -{ #category : #initialization } +{ #category : 'initialization' } RSChartTitleDecoration >> initialize [ super initialize. self fontSize: 15. @@ -37,7 +39,7 @@ RSChartTitleDecoration >> initialize [ above; center ] -{ #category : #initialization } +{ #category : 'initialization' } RSChartTitleDecoration >> isTitle [ ^ true diff --git a/src/Roassal-Chart/RSClusterChart.class.st b/src/Roassal-Chart/RSClusterChart.class.st index 4e8d84db..a04b2430 100644 --- a/src/Roassal-Chart/RSClusterChart.class.st +++ b/src/Roassal-Chart/RSClusterChart.class.st @@ -1,6 +1,6 @@ Class { - #name : #RSClusterChart, - #superclass : #RSCompositeChart, + #name : 'RSClusterChart', + #superclass : 'RSCompositeChart', #instVars : [ 'innerClusterScale', 'clustersScale', @@ -9,40 +9,42 @@ Class { 'horizontal', 'positions' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #adding } +{ #category : 'adding' } RSClusterChart >> + aRSPlot [ self add: aRSPlot. ^ self. ] -{ #category : #adding } +{ #category : 'adding' } RSClusterChart >> add: aPlot [ horizontal := aPlot isHorizontal. super add: aPlot. ^ aPlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> bandsMargin [ ^ bandsMargin ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> bandsMargin: floatBetween0And1 [ bandsMargin := floatBetween0And1. self computePlotsBands ] -{ #category : #adding } +{ #category : 'adding' } RSClusterChart >> beforeRenderingIn: aChart [ yScale := clustersScale. aChart yScale: aChart. ] -{ #category : #private } +{ #category : 'private' } RSClusterChart >> clusterBandValues [ positions := OrderedCollection new. self plots do: [ :plot | @@ -53,23 +55,23 @@ RSClusterChart >> clusterBandValues [ ^ positions ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> clustersMargin [ ^ clustersMargin ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> clustersMargin: floatBetween0And1 [ clustersMargin := floatBetween0And1. self computePlotsBands. ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> clustersScale [ ^ clustersScale ] -{ #category : #private } +{ #category : 'private' } RSClusterChart >> computeClustersScale [ | range | range := { self padding x. self extent x - self padding x}. @@ -81,7 +83,7 @@ RSClusterChart >> computeClustersScale [ ^ clustersScale ] -{ #category : #private } +{ #category : 'private' } RSClusterChart >> computeInnerClusterScale [ innerClusterScale := NSScale ordinal domain: (1 to: self numberOfPlots); @@ -89,7 +91,7 @@ RSClusterChart >> computeInnerClusterScale [ ^ innerClusterScale ] -{ #category : #private } +{ #category : 'private' } RSClusterChart >> computePlotsBands [ self computeClustersScale. self computeInnerClusterScale. @@ -102,7 +104,7 @@ RSClusterChart >> computePlotsBands [ positionInInnerClusterScale - (clustersScale rangeBand / 2) ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSClusterChart >> computeTicks [ | horizontalTick verticalTick | horizontal @@ -118,23 +120,23 @@ RSClusterChart >> computeTicks [ ]. ] -{ #category : #defaults } +{ #category : 'defaults' } RSClusterChart >> defaultBandsMargin [ ^ 0.2 ] -{ #category : #defaults } +{ #category : 'defaults' } RSClusterChart >> defaultClustersMargin [ ^ 0.2 ] -{ #category : #adding } +{ #category : 'adding' } RSClusterChart >> horizontal [ self plots do: [ :plot | plot horizontal ]. horizontal := true. ] -{ #category : #initialization } +{ #category : 'initialization' } RSClusterChart >> initialize [ super initialize. clustersMargin := self defaultClustersMargin. @@ -142,17 +144,17 @@ RSClusterChart >> initialize [ horizontal := false. ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> innerClusterScale [ ^ innerClusterScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSClusterChart >> maxNumberOfBandsPerPlot [ ^ (self plots collect: [ :plot | plot numberOfBands ]) max. ] -{ #category : #rendering } +{ #category : 'rendering' } RSClusterChart >> renderIn: aCanvas [ horizontal ifTrue: [ self extent: (self extent x)@(self extent y * (1+(self plots size * 0.1))). ] diff --git a/src/Roassal-Chart/RSCompositeChart.class.st b/src/Roassal-Chart/RSCompositeChart.class.st index 5b0bbf3a..0cbfd661 100644 --- a/src/Roassal-Chart/RSCompositeChart.class.st +++ b/src/Roassal-Chart/RSCompositeChart.class.st @@ -2,15 +2,17 @@ Please use RSCompositeChart " Class { - #name : #RSCompositeChart, - #superclass : #RSAbstractChart, + #name : 'RSCompositeChart', + #superclass : 'RSAbstractChart', #instVars : [ 'plots' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #adding } +{ #category : 'adding' } RSCompositeChart >> add: aPlot [ "Add a plot to the chart. @@ -32,26 +34,26 @@ c ^ aPlot ] -{ #category : #adding } +{ #category : 'adding' } RSCompositeChart >> addAll: aCollection [ aCollection do: [ :each | self add: each ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSCompositeChart >> chart [ ^ self ] -{ #category : #initialization } +{ #category : 'initialization' } RSCompositeChart >> initialize [ super initialize. plots := OrderedCollection new ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSCompositeChart >> maxChartValueX [ "if not set before, returns the maximum x value of all the plots" @@ -64,7 +66,7 @@ RSCompositeChart >> maxChartValueX [ ifNotNil: [ :res | res ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSCompositeChart >> maxChartValueY [ "if not set before, returns the maximum y value of all the plots" @@ -77,7 +79,7 @@ RSCompositeChart >> maxChartValueY [ ifNotNil: [ :res | res ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSCompositeChart >> minChartValueX [ "if not set before, returns the minimum x value of all the plots" @@ -90,7 +92,7 @@ RSCompositeChart >> minChartValueX [ ifNotNil: [ :res | res ] ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSCompositeChart >> minChartValueY [ "if not set before, returns the minimum y value of all the plots" @@ -103,21 +105,21 @@ RSCompositeChart >> minChartValueY [ ifNotNil: [ :res | res ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSCompositeChart >> numberOfPlots [ "Return the number of plots contained in the chart" ^ self plots size ] -{ #category : #public } +{ #category : 'public' } RSCompositeChart >> openOnce [ self build. ^ self canvas openOnce ] -{ #category : #'accessing - extension' } +{ #category : 'accessing - extension' } RSCompositeChart >> padding: aPoint [ super padding: aPoint. @@ -125,13 +127,13 @@ RSCompositeChart >> padding: aPoint [ plots do: [ :plot | plot padding: aPoint ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSCompositeChart >> plots [ ^ plots ] -{ #category : #rendering } +{ #category : 'rendering' } RSCompositeChart >> renderIn: aCanvas [ decorations , plots do: [ :element | element beforeRenderingIn: self ]. @@ -141,14 +143,14 @@ RSCompositeChart >> renderIn: aCanvas [ as: RSGroup ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSCompositeChart >> xScale: aScale [ super xScale: aScale. plots do: [ :plot | plot xScale: aScale ] ] -{ #category : #'public - scales' } +{ #category : 'public - scales' } RSCompositeChart >> yScale: aScale [ super yScale: aScale. diff --git a/src/Roassal-Chart/RSDefaultBinning.class.st b/src/Roassal-Chart/RSDefaultBinning.class.st index 928c0c3e..6b710551 100644 --- a/src/Roassal-Chart/RSDefaultBinning.class.st +++ b/src/Roassal-Chart/RSDefaultBinning.class.st @@ -2,36 +2,38 @@ TODO " Class { - #name : #RSDefaultBinning, - #superclass : #RSAbstractBinning, + #name : 'RSDefaultBinning', + #superclass : 'RSAbstractBinning', #instVars : [ 'numberOfBins' ], - #category : #'Roassal-Chart-Strategy' + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #hooks } +{ #category : 'hooks' } RSDefaultBinning >> computeNumberOfBinsFor: aCollection [ ^ self numberOfBins ] -{ #category : #defaults } +{ #category : 'defaults' } RSDefaultBinning >> defaultNumberOfBins [ ^ 10 ] -{ #category : #initialization } +{ #category : 'initialization' } RSDefaultBinning >> initialize [ super initialize. self numberOfBins: self defaultNumberOfBins ] -{ #category : #accessing } +{ #category : 'accessing' } RSDefaultBinning >> numberOfBins [ ^ numberOfBins ] -{ #category : #accessing } +{ #category : 'accessing' } RSDefaultBinning >> numberOfBins: aNumber [ numberOfBins := aNumber ] diff --git a/src/Roassal-Chart/RSDensityPlot.class.st b/src/Roassal-Chart/RSDensityPlot.class.st index c74a0664..0b6d33f7 100644 --- a/src/Roassal-Chart/RSDensityPlot.class.st +++ b/src/Roassal-Chart/RSDensityPlot.class.st @@ -30,17 +30,19 @@ densityPlot open. ``` " Class { - #name : #RSDensityPlot, - #superclass : #RSAbstractPlot, + #name : 'RSDensityPlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'kernelDensity', 'curvePoints', 'area' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot class >> data: aCollection [ | densityPlot | densityPlot := self new. @@ -48,7 +50,7 @@ RSDensityPlot class >> data: aCollection [ ^ densityPlot ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleBasicDensityPlot [ | densityPlot data | data := #(14 15 28 27 32 35). @@ -57,7 +59,7 @@ RSDensityPlot class >> exampleBasicDensityPlot [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleBasicDensityPlot2 [ | densityPlot data | data := #(5 5 5 45 45 45). @@ -66,7 +68,7 @@ RSDensityPlot class >> exampleBasicDensityPlot2 [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleBasicDensityPlot3 [ | densityPlot data | data := #(10 10 10 10). @@ -75,7 +77,7 @@ RSDensityPlot class >> exampleBasicDensityPlot3 [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleBasicDensityPlot4 [ | densityPlot data | data := #(-25 -25 -25 -25 10 20 30 40 50 50 50 50 ). @@ -84,7 +86,7 @@ RSDensityPlot class >> exampleBasicDensityPlot4 [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleBasicDensityPlot5 [ | densityPlot data | data := #(0.1 0.05 0.05 0.08). @@ -94,7 +96,7 @@ RSDensityPlot class >> exampleBasicDensityPlot5 [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleDensityPlotCreateWithKernelDesity [ | densityPlot data kernelDensity | data := #(-25 -25 -25 -25 10 20 30 40 50 50 50 50 ). @@ -110,7 +112,7 @@ RSDensityPlot class >> exampleDensityPlotCreateWithKernelDesity [ ^ densityPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSDensityPlot class >> exampleDensityPlotWithLabels [ | densityPlot data | data := #(-25 -25 -25 -25 10 20 30 40 50 50 50 50 ). @@ -120,7 +122,7 @@ RSDensityPlot class >> exampleDensityPlotWithLabels [ ^ densityPlot open. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot class >> kernelDensity: anRSKernelDensity [ | densityPlot | densityPlot := self new. @@ -128,30 +130,30 @@ RSDensityPlot class >> kernelDensity: anRSKernelDensity [ ^ densityPlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> area [ ^ area ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> areaColor [ ^ self computeColor. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> bandwidth [ ^ kernelDensity bandwidth. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> bandwidth: aNumber [ kernelDensity bandwidth: aNumber. self computeCurvePoints. ] -{ #category : #private } +{ #category : 'private' } RSDensityPlot >> computeCurvePoints [ | ys yMax | curvePoints := kernelDensity densityCurve. @@ -161,83 +163,83 @@ RSDensityPlot >> computeCurvePoints [ yValues := {0. yMax. }. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> createdShapes [ ^ { area } ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> curvePoints [ ^ curvePoints ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> data [ ^ kernelDensity data. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> data: aCollection [ kernelDensity data: aCollection. self computeCurvePoints. ] -{ #category : #defaults } +{ #category : 'defaults' } RSDensityPlot >> defaultAreaColor [ ^ area color. ] -{ #category : #defaults } +{ #category : 'defaults' } RSDensityPlot >> defaultKernelDensity [ ^ RSKernelDensity new. ] -{ #category : #defaults } +{ #category : 'defaults' } RSDensityPlot >> defaultLineColor [ ^ Color r:117 g:107 b:177 range: 255. ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSDensityPlot >> defaultShape [ ^ RSPolygon new noPaint. ] -{ #category : #initialization } +{ #category : 'initialization' } RSDensityPlot >> initialize [ super initialize. kernelDensity := self defaultKernelDensity. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> kde: aNumber [ ^ kernelDensity kde: aNumber. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> kernel [ ^ kernelDensity kernel. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> kernel: anRSKernelFunction [ kernelDensity kernel: anRSKernelFunction. self computeCurvePoints. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> kernelDensity [ ^ kernelDensity. ] -{ #category : #accessing } +{ #category : 'accessing' } RSDensityPlot >> kernelDensity: anRSKernelDensity [ kernelDensity := anRSKernelDensity. self computeCurvePoints. ] -{ #category : #rendering } +{ #category : 'rendering' } RSDensityPlot >> renderIn: canvas [ | curve firstPoint lastPoint closingPointStart closingPointEnd | super renderIn: canvas. diff --git a/src/Roassal-Chart/RSDoubleBarPlot.class.st b/src/Roassal-Chart/RSDoubleBarPlot.class.st index 21e6f4bd..204092fd 100644 --- a/src/Roassal-Chart/RSDoubleBarPlot.class.st +++ b/src/Roassal-Chart/RSDoubleBarPlot.class.st @@ -2,8 +2,8 @@ RSDoubleBarPlot renders 2 different bars " Class { - #name : #RSDoubleBarPlot, - #superclass : #RSHorizontalBarPlot, + #name : 'RSDoubleBarPlot', + #superclass : 'RSHorizontalBarPlot', #instVars : [ 'x2Values', 'secondColor', @@ -11,20 +11,22 @@ Class { 'bars2', 'horizontalTopTick' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> bars2 [ ^ bars2 ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSDoubleBarPlot >> computeSecondColor [ ^ secondColor ifNil: [ self chart colorFor: x2Values ] ] -{ #category : #hooks } +{ #category : 'hooks' } RSDoubleBarPlot >> computeSecondRectagleFor: aPoint index: index [ | origin corner sizeOffset offset zero | zero := 0. @@ -38,7 +40,7 @@ RSDoubleBarPlot >> computeSecondRectagleFor: aPoint index: index [ corner: corner + offset + sizeOffset ] -{ #category : #rendering } +{ #category : 'rendering' } RSDoubleBarPlot >> createBar2For: aPoint index: index [ ^ self shape copy model: (self modelFor: aPoint); @@ -47,7 +49,7 @@ RSDoubleBarPlot >> createBar2For: aPoint index: index [ yourself ] -{ #category : #rendering } +{ #category : 'rendering' } RSDoubleBarPlot >> createXScale [ | padding | super createXScale. @@ -63,18 +65,18 @@ RSDoubleBarPlot >> createXScale [ self extent x - padding} ] -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> createdShapes [ ^ bars, bars2 ] -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> horizontalTopTick [ ^ horizontalTopTick ] -{ #category : #initialization } +{ #category : 'initialization' } RSDoubleBarPlot >> initializeDecorations [ super initializeDecorations. @@ -82,7 +84,7 @@ RSDoubleBarPlot >> initializeDecorations [ self addDecoration: horizontalTopTick ] -{ #category : #public } +{ #category : 'public' } RSDoubleBarPlot >> rawData: aCollection x1: bloc1 x2: bloc2 y: bloc3 [ rawData := aCollection. @@ -92,7 +94,7 @@ RSDoubleBarPlot >> rawData: aCollection x1: bloc1 x2: bloc2 y: bloc3 [ y: (rawData collect: bloc3) ] -{ #category : #rendering } +{ #category : 'rendering' } RSDoubleBarPlot >> renderIn: canvas [ | index | @@ -109,12 +111,12 @@ RSDoubleBarPlot >> renderIn: canvas [ canvas addAll: bars2 ] -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> secondColor [ ^ secondColor ] -{ #category : #public } +{ #category : 'public' } RSDoubleBarPlot >> x1: x1 x2: x2 y: y [ self assert: x1 size = x2 size description: 'The two collections must have the same size'. self x: x1 y: y. @@ -122,13 +124,13 @@ RSDoubleBarPlot >> x1: x1 x2: x2 y: y [ horizontalTopTick values: x2Values ] -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> x2Scale [ ^ x2Scale ] -{ #category : #accessing } +{ #category : 'accessing' } RSDoubleBarPlot >> x2Values [ ^ x2Values ] diff --git a/src/Roassal-Chart/RSFixedBinning.class.st b/src/Roassal-Chart/RSFixedBinning.class.st index 7c64dd4b..69880e5c 100644 --- a/src/Roassal-Chart/RSFixedBinning.class.st +++ b/src/Roassal-Chart/RSFixedBinning.class.st @@ -2,32 +2,34 @@ I am class used to bins: in RSHistogramPlot " Class { - #name : #RSFixedBinning, - #superclass : #RSAbstractBinning, + #name : 'RSFixedBinning', + #superclass : 'RSAbstractBinning', #instVars : [ 'bins' ], - #category : #'Roassal-Chart-Strategy' + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #accessing } +{ #category : 'accessing' } RSFixedBinning >> bins [ ^ bins ] -{ #category : #accessing } +{ #category : 'accessing' } RSFixedBinning >> bins: aCollection [ bins := aCollection ] -{ #category : #hooks } +{ #category : 'hooks' } RSFixedBinning >> computeNumberOfBinsFor: aCollection [ ^ bins size ] -{ #category : #hooks } +{ #category : 'hooks' } RSFixedBinning >> createBinsFor: aCollection [ ^ bins ] diff --git a/src/Roassal-Chart/RSFixedLocator.class.st b/src/Roassal-Chart/RSFixedLocator.class.st index c08f4600..84dcf0a7 100644 --- a/src/Roassal-Chart/RSFixedLocator.class.st +++ b/src/Roassal-Chart/RSFixedLocator.class.st @@ -7,28 +7,30 @@ *Collaborators*: `RSFixedLocator` is used when rendering ticks. " Class { - #name : #RSFixedLocator, - #superclass : #RSTickLocator, + #name : 'RSFixedLocator', + #superclass : 'RSTickLocator', #instVars : [ 'ticks' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #generate } +{ #category : 'generate' } RSFixedLocator >> generateTicks: aScale with: numberOfTicks [ ticks sort. ^ ticks select: [ :e | e >= aScale domain first and: e <= aScale domain last ] ] -{ #category : #generate } +{ #category : 'generate' } RSFixedLocator >> ticks [ ^ ticks ] -{ #category : #generate } +{ #category : 'generate' } RSFixedLocator >> ticks: aCollection [ ticks := aCollection diff --git a/src/Roassal-Chart/RSHistogramPlot.class.st b/src/Roassal-Chart/RSHistogramPlot.class.st index 7c092137..6ea73d34 100644 --- a/src/Roassal-Chart/RSHistogramPlot.class.st +++ b/src/Roassal-Chart/RSHistogramPlot.class.st @@ -32,8 +32,8 @@ p show ``` " Class { - #name : #RSHistogramPlot, - #superclass : #RSAbstractPlot, + #name : 'RSHistogramPlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'map', 'x', @@ -41,45 +41,47 @@ Class { 'bars', 'binningStrategy' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSHistogramPlot class >> of: aCollection on: aBloc [ ^ self new collectDataOf: aCollection on: aBloc ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> bars [ ^ bars ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> binSize: aNumber [ self binningStrategy: (RSBinSizeBinning new size: aNumber; yourself) ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> binningStrategy [ ^ binningStrategy ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> binningStrategy: aBinningStrategy [ binningStrategy := aBinningStrategy. self computeXYValues ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> bins [ ^ bins ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> bins: aCollection [ self assert: aCollection isCollection description: 'you must provide a collection'. self binningStrategy: (RSFixedBinning new @@ -87,7 +89,7 @@ RSHistogramPlot >> bins: aCollection [ yourself) ] -{ #category : #enumerating } +{ #category : 'enumerating' } RSHistogramPlot >> collectDataOf: aCollection on: aBloc [ x := aCollection collect: aBloc. @@ -96,12 +98,12 @@ RSHistogramPlot >> collectDataOf: aCollection on: aBloc [ self computeXYValues ] -{ #category : #private } +{ #category : 'private' } RSHistogramPlot >> computeBins [ ^ binningStrategy createBinsFor: x ] -{ #category : #private } +{ #category : 'private' } RSHistogramPlot >> computeXYValues [ | prev | x ifNil: [ ^ self ]. @@ -119,41 +121,41 @@ RSHistogramPlot >> computeXYValues [ ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> createdShapes [ ^ bars ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSHistogramPlot >> defaultShape [ ^ RSBox new noPaint ] -{ #category : #rendering } +{ #category : 'rendering' } RSHistogramPlot >> definedValuesY [ "Return the list Y values that are defined" ^ yValues, {0} ] -{ #category : #initialization } +{ #category : 'initialization' } RSHistogramPlot >> initialize [ super initialize. self binningStrategy: RSDefaultBinning new ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> map [ ^ map ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> map: aMap [ map := aMap ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> model: anArray [ | toShow xVal xVal2 yVal | @@ -166,18 +168,18 @@ RSHistogramPlot >> model: anArray [ (map at: e) between: xVal and: xVal2 ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> numberOfBins [ ^ self binningStrategy numberOfBins ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> numberOfBins: aNumber [ self binningStrategy numberOfBins: aNumber. self computeXYValues ] -{ #category : #rendering } +{ #category : 'rendering' } RSHistogramPlot >> renderIn: canvas [ super renderIn: canvas. @@ -197,12 +199,12 @@ RSHistogramPlot >> renderIn: canvas [ canvas addAll: bars ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> x [ ^ x ] -{ #category : #accessing } +{ #category : 'accessing' } RSHistogramPlot >> x: aCollection [ x := aCollection sorted. self computeXYValues diff --git a/src/Roassal-Chart/RSHorizontalBarPlot.class.st b/src/Roassal-Chart/RSHorizontalBarPlot.class.st index ffa7d3be..a3c6e9d8 100644 --- a/src/Roassal-Chart/RSHorizontalBarPlot.class.st +++ b/src/Roassal-Chart/RSHorizontalBarPlot.class.st @@ -2,20 +2,22 @@ The class for horizontal bar plots " Class { - #name : #RSHorizontalBarPlot, - #superclass : #RSAbstractBarPlot, + #name : 'RSHorizontalBarPlot', + #superclass : 'RSAbstractBarPlot', #instVars : [ 'left' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalBarPlot >> barScale [ ^ yScale ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalBarPlot >> beforeRenderingIn: aChart [ | barScale | @@ -27,7 +29,7 @@ RSHorizontalBarPlot >> beforeRenderingIn: aChart [ aChart yScale: barScale ] -{ #category : #hooks } +{ #category : 'hooks' } RSHorizontalBarPlot >> computeRectagleFor: aPoint index: index [ | origin corner sizeOffset offset zero | @@ -42,7 +44,7 @@ RSHorizontalBarPlot >> computeRectagleFor: aPoint index: index [ corner: corner + offset + sizeOffset ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalBarPlot >> definedValuesX [ "Return the list Y values that are defined" | res | @@ -51,17 +53,17 @@ RSHorizontalBarPlot >> definedValuesX [ ^ res, {0} ] -{ #category : #testing } +{ #category : 'testing' } RSHorizontalBarPlot >> isHorizontalBarPlot [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalBarPlot >> left [ ^ left ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalBarPlot >> left: aCollection [ self assert: yValues size = aCollection size @@ -69,7 +71,7 @@ RSHorizontalBarPlot >> left: aCollection [ left := aCollection ] -{ #category : #hooks } +{ #category : 'hooks' } RSHorizontalBarPlot >> modelFor: aPoint [ ^ aPoint x ] diff --git a/src/Roassal-Chart/RSHorizontalTick.class.st b/src/Roassal-Chart/RSHorizontalTick.class.st index 30f8c001..a076f0ee 100644 --- a/src/Roassal-Chart/RSHorizontalTick.class.st +++ b/src/Roassal-Chart/RSHorizontalTick.class.st @@ -16,12 +16,14 @@ ``` " Class { - #name : #RSHorizontalTick, - #superclass : #RSAbstractTick, - #category : #'Roassal-Chart-Ticks' + #name : 'RSHorizontalTick', + #superclass : 'RSAbstractTick', + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTick >> createTickLineFor: aNumber [ | value zeroY | value := xScale scale: aNumber. @@ -33,27 +35,27 @@ RSHorizontalTick >> createTickLineFor: aNumber [ yourself ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSHorizontalTick >> defaultLabelLocation [ ^ RSLocation new below offset: 0@3 ] -{ #category : #testing } +{ #category : 'testing' } RSHorizontalTick >> isHorizontalTick [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTick >> max [ ^ chart maxValueX ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTick >> min [ ^ chart minChartValueX ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTick >> updateChartMaxAndMinValues: aChart [ aChart @@ -61,13 +63,13 @@ RSHorizontalTick >> updateChartMaxAndMinValues: aChart [ maxChartValueX: self ticksData last ] -{ #category : #public } +{ #category : 'public' } RSHorizontalTick >> useDiagonalLabel [ self labelRotation: -45. self labelLocation outer; bottom; left; offset: (self configuration fontSize * 0.5 @ 0) ] -{ #category : #public } +{ #category : 'public' } RSHorizontalTick >> useVerticalLabel [ self labelRotation: -90 ] diff --git a/src/Roassal-Chart/RSHorizontalTopTick.class.st b/src/Roassal-Chart/RSHorizontalTopTick.class.st index 2f8f105a..542ae508 100644 --- a/src/Roassal-Chart/RSHorizontalTopTick.class.st +++ b/src/Roassal-Chart/RSHorizontalTopTick.class.st @@ -3,22 +3,24 @@ A horizontal tick but in top of the chart, takes values from RSChart, this tick " Class { - #name : #RSHorizontalTopTick, - #superclass : #RSAbstractTick, + #name : 'RSHorizontalTopTick', + #superclass : 'RSAbstractTick', #instVars : [ 'values' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTopTick >> beforeRenderingIn: aChart [ self createXScale. self createYScale ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTopTick >> createTickLineFor: aNumber [ | value y | value := xScale scale: aNumber. @@ -29,7 +31,7 @@ RSHorizontalTopTick >> createTickLineFor: aNumber [ yourself ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTopTick >> createXScale [ | padding | @@ -45,39 +47,39 @@ RSHorizontalTopTick >> createXScale [ (chart extent x - padding) } ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSHorizontalTopTick >> defaultLabelLocation [ ^ RSLocation new above offset: 0@ -3 ] -{ #category : #testing } +{ #category : 'testing' } RSHorizontalTopTick >> isHorizontalTick [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTopTick >> max [ ^ values max max: 0 ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTopTick >> min [ ^ values min min: 0 ] -{ #category : #rendering } +{ #category : 'rendering' } RSHorizontalTopTick >> updateChartMaxAndMinValues: aChart [ ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTopTick >> values [ ^ values ] -{ #category : #accessing } +{ #category : 'accessing' } RSHorizontalTopTick >> values: aCollection [ values := aCollection ] diff --git a/src/Roassal-Chart/RSInvertedCDF.class.st b/src/Roassal-Chart/RSInvertedCDF.class.st index ac9c7c5b..2a88c2a0 100644 --- a/src/Roassal-Chart/RSInvertedCDF.class.st +++ b/src/Roassal-Chart/RSInvertedCDF.class.st @@ -1,10 +1,12 @@ Class { - #name : #RSInvertedCDF, - #superclass : #RSQuantile, - #category : #'Roassal-Chart-Statistics' + #name : 'RSInvertedCDF', + #superclass : 'RSQuantile', + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #initialize } +{ #category : 'initialize' } RSInvertedCDF >> compute: populationPercentage [ | m j g n| n := data size. @@ -17,7 +19,7 @@ RSInvertedCDF >> compute: populationPercentage [ ^ ((1 - (self gama: g)) * (data at: j)) + ((self gama: g)*(data at:(j+1))). ] -{ #category : #initialize } +{ #category : 'initialize' } RSInvertedCDF >> gama: g [ | ans | (g > 0) ifTrue: [ ans := 1 ]. diff --git a/src/Roassal-Chart/RSKernelDensity.class.st b/src/Roassal-Chart/RSKernelDensity.class.st index ecf1a038..5ca16505 100644 --- a/src/Roassal-Chart/RSKernelDensity.class.st +++ b/src/Roassal-Chart/RSKernelDensity.class.st @@ -31,8 +31,8 @@ self assert: (kernelDensity kde: anXValue) closeTo: 0.0495. ``` " Class { - #name : #RSKernelDensity, - #superclass : #RSObject, + #name : 'RSKernelDensity', + #superclass : 'RSObject', #instVars : [ 'data', 'bandwidth', @@ -40,15 +40,17 @@ Class { 'curveStep', 'errorMargin' ], - #category : #'Roassal-Chart-Statistics' + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelDensity class >> bandwidth: aNumber [ ^ self gaussian bandwidth: aNumber. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelDensity class >> data: aCollection [ | kernelDensity | kernelDensity := self gaussian. @@ -56,7 +58,7 @@ RSKernelDensity class >> data: aCollection [ ^ kernelDensity ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelDensity class >> gaussian [ | kernelDensity | kernelDensity := self new. @@ -64,7 +66,7 @@ RSKernelDensity class >> gaussian [ ^ kernelDensity ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelDensity class >> kernel: anRSKernelFunction [ | kernelDensity | kernelDensity := self new. @@ -72,7 +74,7 @@ RSKernelDensity class >> kernel: anRSKernelFunction [ ^ kernelDensity ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelDensity class >> kernel: anRSKernelFunction data: aCollection [ | kernelDensity | kernelDensity := self new. @@ -81,17 +83,17 @@ RSKernelDensity class >> kernel: anRSKernelFunction data: aCollection [ ^ kernelDensity ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> bandwidth [ ^ bandwidth ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> bandwidth: aNumber [ bandwidth := aNumber abs. ] -{ #category : #private } +{ #category : 'private' } RSKernelDensity >> computeBandwidth [ "Based on https://en.wikipedia.org/wiki/Kernel_density_estimation" | n standardDeviation iqr | @@ -101,7 +103,7 @@ RSKernelDensity >> computeBandwidth [ self bandwidth: (0.9 * (standardDeviation min: (iqr/1.34)) * (n raisedTo: (-1/5))). ] -{ #category : #private } +{ #category : 'private' } RSKernelDensity >> computeCurveStep [ | min max diff | min := data min. @@ -111,22 +113,22 @@ RSKernelDensity >> computeCurveStep [ self curveStep: diff * 0.01. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> curveStep [ ^ curveStep ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> curveStep: aNumber [ curveStep := aNumber abs. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> data [ ^ data. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> data: aCollection [ self assert: (aCollection allSatisfy: [ :each | each isNumber ]) description: 'data: should receive only a collection of numbers'. @@ -135,17 +137,17 @@ RSKernelDensity >> data: aCollection [ self computeCurveStep. ] -{ #category : #defaults } +{ #category : 'defaults' } RSKernelDensity >> defaultErrorMargin [ ^ 0.0001. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> defaultKernel [ ^ RSKernelGaussianFunction new. ] -{ #category : #rendering } +{ #category : 'rendering' } RSKernelDensity >> densityCurve [ | curvePoints xi yi maxData minData epsilon step minXDomain maxXDomain maxY | maxData := data max. @@ -193,36 +195,36 @@ RSKernelDensity >> densityCurve [ ^ curvePoints. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> densityCurveSample: aCollection [ ^ aCollection collect: [ :value | (self kde: value) ] ] -{ #category : #private } +{ #category : 'private' } RSKernelDensity >> errorMargin [ ^ errorMargin. ] -{ #category : #private } +{ #category : 'private' } RSKernelDensity >> errorMargin: floatCloseToZero [ "The error margin will be use to calculate when the curve will be truncated, how close to zero is needed to stop the iteration" errorMargin := floatCloseToZero. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> evaluateKernel: aNumber [ ^ kernel evaluate: aNumber. ] -{ #category : #initialization } +{ #category : 'initialization' } RSKernelDensity >> initialize [ super initialize. self errorMargin: self defaultErrorMargin. self kernel: self defaultKernel. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> kde: aNumber [ | sum h | sum := 0. @@ -235,12 +237,12 @@ RSKernelDensity >> kde: aNumber [ ^ sum / ((data size) * h) ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> kernel [ ^ kernel ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelDensity >> kernel: anRSKernelFunction [ self assert: (anRSKernelFunction isKindOf: RSKernelFunction) description: 'Error: The argument passed to kernel is not an RSKernelFunction.'. diff --git a/src/Roassal-Chart/RSKernelFunction.class.st b/src/Roassal-Chart/RSKernelFunction.class.st index c52490e9..62a6fe54 100644 --- a/src/Roassal-Chart/RSKernelFunction.class.st +++ b/src/Roassal-Chart/RSKernelFunction.class.st @@ -1,15 +1,17 @@ Class { - #name : #RSKernelFunction, - #superclass : #RSObject, - #category : #'Roassal-Chart-Statistics' + #name : 'RSKernelFunction', + #superclass : 'RSObject', + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSKernelFunction class >> gaussian [ ^ RSKernelGaussianFunction new. ] -{ #category : #accessing } +{ #category : 'accessing' } RSKernelFunction >> evaluate: aNumber [ ^ self subclassResponsibility. ] diff --git a/src/Roassal-Chart/RSKernelGaussianFunction.class.st b/src/Roassal-Chart/RSKernelGaussianFunction.class.st index ec89ce68..0fdaebc4 100644 --- a/src/Roassal-Chart/RSKernelGaussianFunction.class.st +++ b/src/Roassal-Chart/RSKernelGaussianFunction.class.st @@ -1,10 +1,12 @@ Class { - #name : #RSKernelGaussianFunction, - #superclass : #RSKernelFunction, - #category : #'Roassal-Chart-Statistics' + #name : 'RSKernelGaussianFunction', + #superclass : 'RSKernelFunction', + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #accessing } +{ #category : 'accessing' } RSKernelGaussianFunction >> evaluate: aNumber [ ^ ((0-((aNumber squared)/2))) exp / ((2 * (Float pi)) sqrt). ] diff --git a/src/Roassal-Chart/RSKiviat.class.st b/src/Roassal-Chart/RSKiviat.class.st index 4ecd4252..8ff53964 100644 --- a/src/Roassal-Chart/RSKiviat.class.st +++ b/src/Roassal-Chart/RSKiviat.class.st @@ -2,8 +2,8 @@ this class is related to radar visualization " Class { - #name : #RSKiviat, - #superclass : #RSBuilder, + #name : 'RSKiviat', + #superclass : 'RSBuilder', #instVars : [ 'values', 'axisNames', @@ -23,52 +23,54 @@ Class { 'maxValue', 'minValue' ], - #category : #'Roassal-Chart-Radar' + #category : 'Roassal-Chart-Radar', + #package : 'Roassal-Chart', + #tag : 'Radar' } -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> addRow: aList [ values add: aList ] -{ #category : #adding } +{ #category : 'adding' } RSKiviat >> addRows: aCollection [ values addAll: aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> axis [ ^ axis ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> axisNames [ ^ axisNames ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> axisNames: aCollection [ axisNames := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> backgroundColor [ ^ '#e5ebf6' ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> backgroundShapes [ ^ backgroundShapes ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> border [ ^ RSBorder new color: Color white; yourself ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSKiviat >> computePointsFor: aCollection [ | delta current divisor | divisor := axisNames ifEmpty: [ 1 ] ifNotEmpty: [ axisNames size ]. @@ -82,7 +84,7 @@ RSKiviat >> computePointsFor: aCollection [ point ] ] -{ #category : #private } +{ #category : 'private' } RSKiviat >> computeScaleFor: array [ | min max | min := minValue @@ -95,7 +97,7 @@ RSKiviat >> computeScaleFor: array [ ^ NSScale linear domain: { min. max }; range: { 0. radius } ] -{ #category : #private } +{ #category : 'private' } RSKiviat >> computeScales [ scales := NSScale ordinal. values size = 1 ifTrue: [ @@ -109,7 +111,7 @@ RSKiviat >> computeScales [ ] ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createAxisLine: name angle: angle [ ^ RSLine new endPoint: angle cos @ angle sin * radius; @@ -117,21 +119,21 @@ RSKiviat >> createAxisLine: name angle: angle [ yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createAxisName: aString [ ^ RSLabel new text: aString; yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createBorderFor: aRSPolygon [ ^ RSBorder new color: aRSPolygon color muchDarker; yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createEllipseFor: each [ ^ RSEllipse new noPaint; @@ -140,7 +142,7 @@ RSKiviat >> createEllipseFor: each [ yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createPolygonFor: each [ ^ RSPolygon new noPaint; @@ -151,7 +153,7 @@ RSKiviat >> createPolygonFor: each [ yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createShapePointFor: aPoint in: aRSPolygon [ ^ RSEllipse new color: aRSPolygon color muchDarker; @@ -160,7 +162,7 @@ RSKiviat >> createShapePointFor: aPoint in: aRSPolygon [ yourself ] -{ #category : #creation } +{ #category : 'creation' } RSKiviat >> createValuePolygon: array [ | polygon points shapePoints | points := self computePointsFor: array. @@ -180,17 +182,17 @@ RSKiviat >> createValuePolygon: array [ ^ polygon ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSKiviat >> defaultContainer [ ^ RSCanvas new @ RSCanvasController ] -{ #category : #defaults } +{ #category : 'defaults' } RSKiviat >> defaultPalette [ ^ NSScale ordinal range: (NSScale category20 range collect: [:color| color translucent ]) ] -{ #category : #utilities } +{ #category : 'utilities' } RSKiviat >> fixLabelPosition: label angle: angle [ | positions gap | label position: angle cos @ angle sin * radius. @@ -213,7 +215,7 @@ RSKiviat >> fixLabelPosition: label angle: angle [ label translateBy: label baseRectangle bottomRight negated + gap ] ] -{ #category : #initialization } +{ #category : 'initialization' } RSKiviat >> initialize [ super initialize. values := OrderedCollection new. @@ -228,87 +230,87 @@ RSKiviat >> initialize [ noDots ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> labelGapSize [ ^ labelGapSize ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> labelGapSize: aNumber [ labelGapSize := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> labels [ ^ labels ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> maxValue [ ^ maxValue ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> maxValue: aNumber [ maxValue := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> minValue [ ^ minValue ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> minValue: aNumber [ minValue := aNumber ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> noDots [ shouldUseDots := false ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> noPolygonBorder [ shouldUsePolygonBorder := false ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> noPolygonFillColor [ shouldUsePolygonFillColor := false ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> palette [ ^ palette ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> palette: aNSOrdinalScale [ palette := aNSOrdinalScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> polygonShape [ ^ polygonShape ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> polygonShapes [ ^ polygonShapes ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> radius [ ^ radius ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> radius: aNumber [ radius := aNumber ] -{ #category : #hooks } +{ #category : 'hooks' } RSKiviat >> renderAxisIn: aCanvas [ | delta current deltaRadius divisor | divisor := axisNames ifEmpty: [ 1 ] ifNotEmpty: [ axisNames size ]. @@ -335,7 +337,7 @@ RSKiviat >> renderAxisIn: aCanvas [ aCanvas addAll: labels ] -{ #category : #rendering } +{ #category : 'rendering' } RSKiviat >> renderIn: aCanvas [ self assert: values isNotEmpty description: 'Use addRow: first'. axisNames ifNil: [ axisNames := values first collectWithIndex: [ :val :i | i asString ] ]. @@ -345,64 +347,64 @@ RSKiviat >> renderIn: aCanvas [ shapes := backgroundShapes, axis, labels, polygonShapes ] -{ #category : #hooks } +{ #category : 'hooks' } RSKiviat >> renderValuesIn: aCanvas [ self computeScales. polygonShapes := values collect: [ :array | self createValuePolygon: array ]. aCanvas addAll: polygonShapes ] -{ #category : #testing } +{ #category : 'testing' } RSKiviat >> shouldUseDots [ ^ shouldUseDots ] -{ #category : #testing } +{ #category : 'testing' } RSKiviat >> shouldUseEllipse [ ^ shouldUseEllipse ] -{ #category : #testing } +{ #category : 'testing' } RSKiviat >> shouldUsePolygonBorder [ ^ shouldUsePolygonBorder ] -{ #category : #testing } +{ #category : 'testing' } RSKiviat >> shouldUsePolygonFillColor [ ^ shouldUsePolygonFillColor ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSKiviat >> tickStep [ ^ radius / 5 ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> useDots [ shouldUseDots := true ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> useEllipse [ shouldUseEllipse := true ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> usePolygon [ shouldUseEllipse := false ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> usePolygonBorder [ shouldUsePolygonBorder := true ] -{ #category : #public } +{ #category : 'public' } RSKiviat >> usePolygonFillColor [ shouldUsePolygonFillColor := true ] -{ #category : #accessing } +{ #category : 'accessing' } RSKiviat >> values [ ^ values ] diff --git a/src/Roassal-Chart/RSLineChartPopupBuilder.class.st b/src/Roassal-Chart/RSLineChartPopupBuilder.class.st index 27e8f9fc..5c5a9b35 100644 --- a/src/Roassal-Chart/RSLineChartPopupBuilder.class.st +++ b/src/Roassal-Chart/RSLineChartPopupBuilder.class.st @@ -2,12 +2,14 @@ TODO " Class { - #name : #RSLineChartPopupBuilder, - #superclass : #RSAbstractChartPopupBuilder, - #category : #'Roassal-Chart-Popup' + #name : 'RSLineChartPopupBuilder', + #superclass : 'RSAbstractChartPopupBuilder', + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #hooks } +{ #category : 'hooks' } RSLineChartPopupBuilder >> rowShapeFor: aRSLinePlot [ | valuePoint | valuePoint := self valuePointFor: aRSLinePlot. @@ -15,12 +17,12 @@ RSLineChartPopupBuilder >> rowShapeFor: aRSLinePlot [ ^ self rowShapeFor: aRSLinePlot point: valuePoint ] -{ #category : #hooks } +{ #category : 'hooks' } RSLineChartPopupBuilder >> rowShapeFor: aRSLinePlot point: aPoint [ ^ self subclassResponsibility ] -{ #category : #hooks } +{ #category : 'hooks' } RSLineChartPopupBuilder >> shapeFor: aRSChart [ | plots | plots := aRSChart plots select: #isLinePlot. @@ -37,7 +39,7 @@ RSLineChartPopupBuilder >> shapeFor: aRSChart [ yourself ] -{ #category : #hooks } +{ #category : 'hooks' } RSLineChartPopupBuilder >> valuePointFor: aRSLinePlot [ | xValue yValue index | xValue := (aRSLinePlot xScale invert: position x) roundTo: 1. diff --git a/src/Roassal-Chart/RSLinePlot.class.st b/src/Roassal-Chart/RSLinePlot.class.st index eb70754f..c1ebd63e 100644 --- a/src/Roassal-Chart/RSLinePlot.class.st +++ b/src/Roassal-Chart/RSLinePlot.class.st @@ -2,24 +2,26 @@ RSLinePlot is a class to create an y vs x plot. " Class { - #name : #RSLinePlot, - #superclass : #RSAbstractPlot, + #name : 'RSLinePlot', + #superclass : 'RSAbstractPlot', #traits : 'RSTLine', #classTraits : 'RSTLine classTrait', #instVars : [ 'line' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSLinePlot class >> example1 [ | p | p := (self y: #(1 2 3 4)) format: 'or--'. ^ p open. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } RSLinePlot class >> y: aCollection [ | linePlot | linePlot := self new. @@ -27,32 +29,32 @@ RSLinePlot class >> y: aCollection [ ^ linePlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSLinePlot >> createdShapes [ ^ { line } ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSLinePlot >> defaultShape [ ^ RSPolyline new color: nil ] -{ #category : #testing } +{ #category : 'testing' } RSLinePlot >> isLinePlot [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSLinePlot >> line [ ^ line ] -{ #category : #constants } +{ #category : 'constants' } RSLinePlot >> marker [ ^ self shape markers at: 1 ] -{ #category : #rendering } +{ #category : 'rendering' } RSLinePlot >> renderIn: canvas [ | controlPoints | super renderIn: canvas. diff --git a/src/Roassal-Chart/RSLineSpineDecoration.class.st b/src/Roassal-Chart/RSLineSpineDecoration.class.st index 972714ef..5e840bdf 100644 --- a/src/Roassal-Chart/RSLineSpineDecoration.class.st +++ b/src/Roassal-Chart/RSLineSpineDecoration.class.st @@ -2,23 +2,25 @@ Used to draw line axis " Class { - #name : #RSLineSpineDecoration, - #superclass : #RSChartSpineDecoration, + #name : 'RSLineSpineDecoration', + #superclass : 'RSChartSpineDecoration', #traits : 'RSTLine', #classTraits : 'RSTLine classTrait', #instVars : [ 'axisX', 'axisY' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #initialization } +{ #category : 'initialization' } RSLineSpineDecoration >> defaultShape [ ^ RSLine new ] -{ #category : #rendering } +{ #category : 'rendering' } RSLineSpineDecoration >> renderIn: canvas [ | x y zeroPoint | axisX := self shape copy. @@ -35,7 +37,7 @@ RSLineSpineDecoration >> renderIn: canvas [ canvas add: box ] -{ #category : #accessing } +{ #category : 'accessing' } RSLineSpineDecoration >> zeroPoint [ | x y | y := (0 between: chart minChartValueY and: chart maxChartValueY) diff --git a/src/Roassal-Chart/RSLinearLocator.class.st b/src/Roassal-Chart/RSLinearLocator.class.st index bdd9f732..959773d2 100644 --- a/src/Roassal-Chart/RSLinearLocator.class.st +++ b/src/Roassal-Chart/RSLinearLocator.class.st @@ -7,12 +7,14 @@ *Collaborators*: `RSLinearLocator` is used when rendering ticks. " Class { - #name : #RSLinearLocator, - #superclass : #RSTickLocator, - #category : #'Roassal-Chart-Ticks' + #name : 'RSLinearLocator', + #superclass : 'RSTickLocator', + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #generate } +{ #category : 'generate' } RSLinearLocator >> generateTicks: aScale with: numberOfTicks [ ^ aScale ticks: numberOfTicks diff --git a/src/Roassal-Chart/RSLogLocator.class.st b/src/Roassal-Chart/RSLogLocator.class.st index 80c90ed3..d9eed73f 100644 --- a/src/Roassal-Chart/RSLogLocator.class.st +++ b/src/Roassal-Chart/RSLogLocator.class.st @@ -8,30 +8,32 @@ However it doesn't rescale the axis. *Collaborators*: `RSLogLocator` is used when rendering ticks. " Class { - #name : #RSLogLocator, - #superclass : #RSTickLocator, + #name : 'RSLogLocator', + #superclass : 'RSTickLocator', #instVars : [ 'base', 'smallestIndex', 'smallestPower' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #generate } +{ #category : 'generate' } RSLogLocator >> base [ ^ base ] -{ #category : #generate } +{ #category : 'generate' } RSLogLocator >> base: aBase [ base := aBase. smallestIndex := aBase**(smallestPower) ] -{ #category : #generate } +{ #category : 'generate' } RSLogLocator >> generateTicks: aScale with: numberOfTicks [ | first last power collection tick | @@ -60,7 +62,7 @@ RSLogLocator >> generateTicks: aScale with: numberOfTicks [ ^ collection ] -{ #category : #initialization } +{ #category : 'initialization' } RSLogLocator >> initialize [ super initialize. @@ -69,19 +71,19 @@ RSLogLocator >> initialize [ smallestIndex := base**smallestPower ] -{ #category : #stepping } +{ #category : 'stepping' } RSLogLocator >> smallestIndex [ ^ smallestIndex ] -{ #category : #stepping } +{ #category : 'stepping' } RSLogLocator >> smallestPower [ ^ smallestPower ] -{ #category : #stepping } +{ #category : 'stepping' } RSLogLocator >> smallestPower: aPower [ smallestPower := aPower. diff --git a/src/Roassal-Chart/RSPopupDecoration.class.st b/src/Roassal-Chart/RSPopupDecoration.class.st index 8250c275..3b80c0c7 100644 --- a/src/Roassal-Chart/RSPopupDecoration.class.st +++ b/src/Roassal-Chart/RSPopupDecoration.class.st @@ -2,35 +2,37 @@ I am a popup decoration for instances of line Plots in RSChart by default but you can customize this popup decoration with differents shapebuilders, or popups " Class { - #name : #RSPopupDecoration, - #superclass : #RSAbstractChartDecoration, + #name : 'RSPopupDecoration', + #superclass : 'RSAbstractChartDecoration', #instVars : [ 'popup' ], - #category : #'Roassal-Chart-Popup' + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #accessing } +{ #category : 'accessing' } RSPopupDecoration >> chartPopupBuilder [ ^ self popup chartPopupBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } RSPopupDecoration >> chartPopupBuilder: aRSAbstractChartPopupBuilder [ self popup chartPopupBuilder: aRSAbstractChartPopupBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } RSPopupDecoration >> createdShapes [ ^ #() ] -{ #category : #initialization } +{ #category : 'initialization' } RSPopupDecoration >> defaultShape [ ^ nil ] -{ #category : #initialization } +{ #category : 'initialization' } RSPopupDecoration >> initialize [ super initialize. popup := RSChartPopupDecoration new @@ -39,17 +41,17 @@ RSPopupDecoration >> initialize [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSPopupDecoration >> popup [ ^ popup ] -{ #category : #accessing } +{ #category : 'accessing' } RSPopupDecoration >> popup: aRSPopup [ popup := aRSPopup ] -{ #category : #rendering } +{ #category : 'rendering' } RSPopupDecoration >> renderIn: canvas [ | box | box := chart spine. diff --git a/src/Roassal-Chart/RSQuantile.class.st b/src/Roassal-Chart/RSQuantile.class.st index 325b427c..f59478fe 100644 --- a/src/Roassal-Chart/RSQuantile.class.st +++ b/src/Roassal-Chart/RSQuantile.class.st @@ -1,13 +1,15 @@ Class { - #name : #RSQuantile, - #superclass : #RSObject, + #name : 'RSQuantile', + #superclass : 'RSObject', #instVars : [ 'data' ], - #category : #'Roassal-Chart-Statistics' + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #accessing } +{ #category : 'accessing' } RSQuantile class >> data: aCollection [ | aRSQuantile | aRSQuantile := self new. @@ -15,12 +17,12 @@ RSQuantile class >> data: aCollection [ ^ aRSQuantile. ] -{ #category : #initialize } +{ #category : 'initialize' } RSQuantile >> compute: populationPercentage [ ^ self subclassResponsibility. ] -{ #category : #initialize } +{ #category : 'initialize' } RSQuantile >> data: aCollection [ data := aCollection. ] diff --git a/src/Roassal-Chart/RSRiceBinning.class.st b/src/Roassal-Chart/RSRiceBinning.class.st index 62ec4a6e..b307c156 100644 --- a/src/Roassal-Chart/RSRiceBinning.class.st +++ b/src/Roassal-Chart/RSRiceBinning.class.st @@ -2,12 +2,14 @@ TODO " Class { - #name : #RSRiceBinning, - #superclass : #RSAbstractBinning, - #category : #'Roassal-Chart-Strategy' + #name : 'RSRiceBinning', + #superclass : 'RSAbstractBinning', + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #hooks } +{ #category : 'hooks' } RSRiceBinning >> computeNumberOfBinsFor: aCollection [ ^ 2 * (aCollection size raisedTo: 1/3) ] diff --git a/src/Roassal-Chart/RSScatterPlot.class.st b/src/Roassal-Chart/RSScatterPlot.class.st index 1ea9e19b..185f26f4 100644 --- a/src/Roassal-Chart/RSScatterPlot.class.st +++ b/src/Roassal-Chart/RSScatterPlot.class.st @@ -44,35 +44,37 @@ p canvas " Class { - #name : #RSScatterPlot, - #superclass : #RSAbstractPlot, + #name : 'RSScatterPlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'ellipses' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSScatterPlot >> createdShapes [ ^ ellipses ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSScatterPlot >> defaultShape [ ^ RSEllipse new noPaint ] -{ #category : #accessing } +{ #category : 'accessing' } RSScatterPlot >> ellipses [ ^ ellipses ] -{ #category : #testing } +{ #category : 'testing' } RSScatterPlot >> isScatterPlot [ ^ true ] -{ #category : #rendering } +{ #category : 'rendering' } RSScatterPlot >> renderIn: canvas [ | newPoint color | super renderIn: canvas. diff --git a/src/Roassal-Chart/RSSimpleChartPopupBuilder.class.st b/src/Roassal-Chart/RSSimpleChartPopupBuilder.class.st index 683af688..a854a581 100644 --- a/src/Roassal-Chart/RSSimpleChartPopupBuilder.class.st +++ b/src/Roassal-Chart/RSSimpleChartPopupBuilder.class.st @@ -47,16 +47,18 @@ c build. ``` " Class { - #name : #RSSimpleChartPopupBuilder, - #superclass : #RSLineChartPopupBuilder, + #name : 'RSSimpleChartPopupBuilder', + #superclass : 'RSLineChartPopupBuilder', #instVars : [ 'labels', 'icons' ], - #category : #'Roassal-Chart-Popup' + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #public } +{ #category : 'public' } RSSimpleChartPopupBuilder >> for: aRSLinePlot color: aColor [ self for: aRSLinePlot icon: (RSEllipse new size: 10; @@ -64,31 +66,31 @@ RSSimpleChartPopupBuilder >> for: aRSLinePlot color: aColor [ yourself) ] -{ #category : #public } +{ #category : 'public' } RSSimpleChartPopupBuilder >> for: aRSLinePlot icon: aRSShape [ icons at: aRSLinePlot put: aRSShape ] -{ #category : #public } +{ #category : 'public' } RSSimpleChartPopupBuilder >> for: aRSLinePlot text: aString [ labels at: aRSLinePlot put: aString ] -{ #category : #public } +{ #category : 'public' } RSSimpleChartPopupBuilder >> for: aRSLinePlot text: aString color: aColor [ self for: aRSLinePlot text: aString; for: aRSLinePlot color: aColor ] -{ #category : #initialization } +{ #category : 'initialization' } RSSimpleChartPopupBuilder >> initialize [ super initialize. labels := Dictionary new. icons := Dictionary new ] -{ #category : #hooks } +{ #category : 'hooks' } RSSimpleChartPopupBuilder >> rowShapeFor: aRSLinePlot point: aPoint [ | group | group := RSGroup new. diff --git a/src/Roassal-Chart/RSSimpleMarkerPopupBuilder.class.st b/src/Roassal-Chart/RSSimpleMarkerPopupBuilder.class.st index 611c2149..9f8014f7 100644 --- a/src/Roassal-Chart/RSSimpleMarkerPopupBuilder.class.st +++ b/src/Roassal-Chart/RSSimpleMarkerPopupBuilder.class.st @@ -2,12 +2,14 @@ I create markers in the visualization " Class { - #name : #RSSimpleMarkerPopupBuilder, - #superclass : #RSAbstractChartPopupBuilder, - #category : #'Roassal-Chart-Popup' + #name : 'RSSimpleMarkerPopupBuilder', + #superclass : 'RSAbstractChartPopupBuilder', + #category : 'Roassal-Chart-Popup', + #package : 'Roassal-Chart', + #tag : 'Popup' } -{ #category : #hooks } +{ #category : 'hooks' } RSSimpleMarkerPopupBuilder >> shapeFor: aRSChart [ | line box x | line := RSLine new dashArray: #(3). diff --git a/src/Roassal-Chart/RSStatisticalMeasures.class.st b/src/Roassal-Chart/RSStatisticalMeasures.class.st index f0e34a92..dc8ae852 100644 --- a/src/Roassal-Chart/RSStatisticalMeasures.class.st +++ b/src/Roassal-Chart/RSStatisticalMeasures.class.st @@ -1,15 +1,17 @@ Class { - #name : #RSStatisticalMeasures, - #superclass : #RSObject, + #name : 'RSStatisticalMeasures', + #superclass : 'RSObject', #instVars : [ 'data', 'quantile', 'confidencePercentage' ], - #category : #'Roassal-Chart-Statistics' + #category : 'Roassal-Chart-Statistics', + #package : 'Roassal-Chart', + #tag : 'Statistics' } -{ #category : #accessing } +{ #category : 'accessing' } RSStatisticalMeasures class >> data: aDataset [ | statisticalMeasures | statisticalMeasures := self new. @@ -19,40 +21,40 @@ RSStatisticalMeasures class >> data: aDataset [ ^ statisticalMeasures ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> confidenceInterval [ | confidenceProbability | confidenceProbability := confidencePercentage / 100. ^ { quantile compute: (1-confidenceProbability). quantile compute: confidenceProbability. } ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> confidencePercentage [ ^ confidencePercentage ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> confidencePercentage: aPercentage [ confidencePercentage := aPercentage ] -{ #category : #accessing } +{ #category : 'accessing' } RSStatisticalMeasures >> data [ ^ data ] -{ #category : #accessing } +{ #category : 'accessing' } RSStatisticalMeasures >> data: aDataset [ data := aDataset copy sort. ] -{ #category : #accessing } +{ #category : 'accessing' } RSStatisticalMeasures >> defaultQuantile [ ^ (RSInvertedCDF data: data). ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> interQuartileRange [ | quartiles q1 q3 | quartiles := self quartiles. @@ -61,7 +63,7 @@ RSStatisticalMeasures >> interQuartileRange [ ^ q3 - q1. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> iqr [ | q1 q3 | q1 := quantile compute: 0.25. @@ -69,7 +71,7 @@ RSStatisticalMeasures >> iqr [ ^ (q3 - q1) ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> lowerLimit [ | quartiles q1 q3 iqr iqr15 | quartiles := self quartiles. @@ -80,7 +82,7 @@ RSStatisticalMeasures >> lowerLimit [ ^ (data select: [ :d | d >= iqr15 ]) min. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> mean [ | sum | sum := 0. @@ -88,17 +90,17 @@ RSStatisticalMeasures >> mean [ ^ (sum / (data size)). ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> median [ ^ self median: data. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> median: aDataset [ ^ quantile compute: 0.5. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> medianConfidenceInterval [ | notchFactors delta median iqr | notchFactors := Dictionary newFrom: { @@ -111,7 +113,7 @@ RSStatisticalMeasures >> medianConfidenceInterval [ ^ { median - delta. median + delta}. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> outliers [ | outlierValues lowerLimit upperLimit iterator | outlierValues := OrderedCollection new. @@ -128,12 +130,12 @@ RSStatisticalMeasures >> outliers [ ^ outlierValues. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> quantile: aRSQuantileSubclass [ quantile := aRSQuantileSubclass. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> quartiles [ | q1 q2 q3 | q1 := quantile compute: 0.25. @@ -142,7 +144,7 @@ RSStatisticalMeasures >> quartiles [ ^ { q1. q2. q3 }. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> standardDeviation [ | standardDeviation sum mean | sum := 0. @@ -152,7 +154,7 @@ RSStatisticalMeasures >> standardDeviation [ ^ standardDeviation. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSStatisticalMeasures >> upperLimit [ | quartiles q1 q3 iqr iqr15 | quartiles := self quartiles. diff --git a/src/Roassal-Chart/RSSturgesBinning.class.st b/src/Roassal-Chart/RSSturgesBinning.class.st index 72f37de3..aa1c5ab9 100644 --- a/src/Roassal-Chart/RSSturgesBinning.class.st +++ b/src/Roassal-Chart/RSSturgesBinning.class.st @@ -2,12 +2,14 @@ TODO " Class { - #name : #RSSturgesBinning, - #superclass : #RSAbstractBinning, - #category : #'Roassal-Chart-Strategy' + #name : 'RSSturgesBinning', + #superclass : 'RSAbstractBinning', + #category : 'Roassal-Chart-Strategy', + #package : 'Roassal-Chart', + #tag : 'Strategy' } -{ #category : #hooks } +{ #category : 'hooks' } RSSturgesBinning >> computeNumberOfBinsFor: aCollection [ ^ (aCollection size log / 2 log) ceiling + 1 ] diff --git a/src/Roassal-Chart/RSTickConfiguration.class.st b/src/Roassal-Chart/RSTickConfiguration.class.st index fb70eea6..e38704a9 100644 --- a/src/Roassal-Chart/RSTickConfiguration.class.st +++ b/src/Roassal-Chart/RSTickConfiguration.class.st @@ -60,8 +60,8 @@ d ``` " Class { - #name : #RSTickConfiguration, - #superclass : #Object, + #name : 'RSTickConfiguration', + #superclass : 'Object', #instVars : [ 'numberOfTicks', 'shouldHaveLabels', @@ -70,10 +70,12 @@ Class { 'fontSize', 'tickSize' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #public } +{ #category : 'public' } RSTickConfiguration >> createLabelFor: aValue [ ^ RSLabel new fontSize: self fontSize; @@ -82,17 +84,17 @@ RSTickConfiguration >> createLabelFor: aValue [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> fontSize [ ^ fontSize ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> fontSize: aNumber [ fontSize := aNumber ] -{ #category : #initialization } +{ #category : 'initialization' } RSTickConfiguration >> initialize [ super initialize. self numberOfTicks: 5; @@ -103,57 +105,57 @@ RSTickConfiguration >> initialize [ tickSize: 3 ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> labelConversion [ ^ labelConversion ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> labelConversion: aOneArgBlock [ labelConversion := aOneArgBlock ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> labelRotation [ ^ labelRotation ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> labelRotation: degreesAsNumber [ labelRotation := degreesAsNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> numberOfTicks [ ^ numberOfTicks ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> numberOfTicks: aNumber [ numberOfTicks := aNumber. ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> shouldHaveLabels [ ^ shouldHaveLabels ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> shouldHaveLabels: aBoolean [ shouldHaveLabels := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> tickSize [ ^ tickSize ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> tickSize: aNumber [ tickSize := aNumber ] -{ #category : #accessing } +{ #category : 'accessing' } RSTickConfiguration >> updateTickConfiguration: anEvent [ | canvas | canvas := anEvent canvas. diff --git a/src/Roassal-Chart/RSTickLocator.class.st b/src/Roassal-Chart/RSTickLocator.class.st index 704d5c0d..8381f2b1 100644 --- a/src/Roassal-Chart/RSTickLocator.class.st +++ b/src/Roassal-Chart/RSTickLocator.class.st @@ -2,12 +2,14 @@ Abstract class for all tick locators. A tick locator defines where the ticks of a chart should be. " Class { - #name : #RSTickLocator, - #superclass : #Object, - #category : #'Roassal-Chart-Ticks' + #name : 'RSTickLocator', + #superclass : 'Object', + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #generate } +{ #category : 'generate' } RSTickLocator >> generateTicks: aScale with: numberOfTicks [ ^ self subclassResponsibility diff --git a/src/Roassal-Chart/RSTimeLinePlot.class.st b/src/Roassal-Chart/RSTimeLinePlot.class.st index 1343a67e..7994b8d6 100644 --- a/src/Roassal-Chart/RSTimeLinePlot.class.st +++ b/src/Roassal-Chart/RSTimeLinePlot.class.st @@ -2,39 +2,41 @@ Define a time line, a bit like a Gantt diagram. " Class { - #name : #RSTimeLinePlot, - #superclass : #RSAbstractPlot, + #name : 'RSTimeLinePlot', + #superclass : 'RSAbstractPlot', #instVars : [ 'gapRatio', 'bars', 'barSize' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> barScale [ ^ yScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> barSize [ "Return the width of each bar" ^ barSize ifNil: [ self barScale rangeBand ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> barSize: aBarWidth [ "Set the width of the bar" barSize := aBarWidth ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> bars [ ^ bars ] -{ #category : #rendering } +{ #category : 'rendering' } RSTimeLinePlot >> beforeRenderingIn: aChart [ | barScale | @@ -47,17 +49,17 @@ RSTimeLinePlot >> beforeRenderingIn: aChart [ aChart yScale: barScale ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> createdShapes [ ^ bars ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSTimeLinePlot >> defaultShape [ ^ RSBox new noPaint ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> entries: aCollection at: aNumber [ "example: self entries: { 0 2 4 8}. @@ -70,23 +72,23 @@ RSTimeLinePlot >> entries: aCollection at: aNumber [ y: (Array new: aCollection size withAll: aNumber) ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> gapRatio [ ^ gapRatio ] -{ #category : #accessing } +{ #category : 'accessing' } RSTimeLinePlot >> gapRatio: anObject [ gapRatio := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } RSTimeLinePlot >> initialize [ super initialize. self gapRatio: 0.1 ] -{ #category : #rendering } +{ #category : 'rendering' } RSTimeLinePlot >> renderIn: canvas [ super renderIn: canvas. diff --git a/src/Roassal-Chart/RSVerticalRightTick.class.st b/src/Roassal-Chart/RSVerticalRightTick.class.st index c893b458..cb7f9019 100644 --- a/src/Roassal-Chart/RSVerticalRightTick.class.st +++ b/src/Roassal-Chart/RSVerticalRightTick.class.st @@ -2,22 +2,24 @@ Similar to vertical tick and hortizonal top tick " Class { - #name : #RSVerticalRightTick, - #superclass : #RSAbstractTick, + #name : 'RSVerticalRightTick', + #superclass : 'RSAbstractTick', #instVars : [ 'values' ], - #category : #'Roassal-Chart-Ticks' + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalRightTick >> beforeRenderingIn: aChart [ self createXScale. self createYScale ] -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalRightTick >> createTickLineFor: aNumber [ | scaledNumber x | scaledNumber := yScale scale: aNumber. @@ -28,7 +30,7 @@ RSVerticalRightTick >> createTickLineFor: aNumber [ yourself ] -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalRightTick >> createYScale [ | padding | @@ -44,40 +46,40 @@ RSVerticalRightTick >> createYScale [ (chart extent y negated + padding) } ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSVerticalRightTick >> defaultLabelLocation [ ^ RSLocation new outer; right; offset: 2@0 ] -{ #category : #testing } +{ #category : 'testing' } RSVerticalRightTick >> isVerticalTick [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalRightTick >> max [ ^ values max ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalRightTick >> min [ ^ values min ] -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalRightTick >> updateChartMaxAndMinValues: aChart [ ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalRightTick >> values [ ^ values ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalRightTick >> values: anObject [ values := anObject diff --git a/src/Roassal-Chart/RSVerticalTick.class.st b/src/Roassal-Chart/RSVerticalTick.class.st index 3c6c27a6..9cea4ee2 100644 --- a/src/Roassal-Chart/RSVerticalTick.class.st +++ b/src/Roassal-Chart/RSVerticalTick.class.st @@ -16,12 +16,14 @@ ``` " Class { - #name : #RSVerticalTick, - #superclass : #RSAbstractTick, - #category : #'Roassal-Chart-Ticks' + #name : 'RSVerticalTick', + #superclass : 'RSAbstractTick', + #category : 'Roassal-Chart-Ticks', + #package : 'Roassal-Chart', + #tag : 'Ticks' } -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalTick >> createTickLineFor: aNumber [ | scaledNumber zeroX | scaledNumber := yScale scale: aNumber. @@ -33,27 +35,27 @@ RSVerticalTick >> createTickLineFor: aNumber [ yourself ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSVerticalTick >> defaultLabelLocation [ ^ RSLocation new outer; left; offset: -2@0 ] -{ #category : #testing } +{ #category : 'testing' } RSVerticalTick >> isVerticalTick [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalTick >> max [ ^ chart maxValueY ] -{ #category : #accessing } +{ #category : 'accessing' } RSVerticalTick >> min [ ^ chart minValueY ] -{ #category : #rendering } +{ #category : 'rendering' } RSVerticalTick >> updateChartMaxAndMinValues: aChart [ aChart diff --git a/src/Roassal-Chart/RSViolinPlot.class.st b/src/Roassal-Chart/RSViolinPlot.class.st index 51b6d526..862e611e 100644 --- a/src/Roassal-Chart/RSViolinPlot.class.st +++ b/src/Roassal-Chart/RSViolinPlot.class.st @@ -42,25 +42,27 @@ violinPlot open. ``` " Class { - #name : #RSViolinPlot, - #superclass : #RSAbstractBandPlot, + #name : 'RSViolinPlot', + #superclass : 'RSAbstractBandPlot', #instVars : [ 'models', 'model', 'dataBlock' ], - #category : #'Roassal-Chart-Core' + #category : 'Roassal-Chart-Core', + #package : 'Roassal-Chart', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot class >> data: aCollection [ - | boxPlot | - boxPlot := self new. - boxPlot data: aCollection. - ^ boxPlot + | plot | + plot := self new. + plot data: aCollection. + ^ plot ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example01BasicViolinPlot [ | boxPlot1 data1 | data1 := { 12. 12. 13. 14. 15. 24. }. @@ -70,7 +72,7 @@ RSViolinPlot class >> example01BasicViolinPlot [ ^ boxPlot1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example02MultipleVionlinsArrayOfArrays [ | boxPlot1 | @@ -80,7 +82,7 @@ RSViolinPlot class >> example02MultipleVionlinsArrayOfArrays [ ^ boxPlot1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example03HorizontalViolinPlot [ | violinPlot data1 | data1 := { 12. 12. 13. 14. 15. 24. }. @@ -91,7 +93,7 @@ RSViolinPlot class >> example03HorizontalViolinPlot [ ^ violinPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example03HorizontalVionlins [ | violinPlot | @@ -102,7 +104,7 @@ RSViolinPlot class >> example03HorizontalVionlins [ ^ violinPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example03HorizontalVionlinsShowBands [ | violinPlot | @@ -114,7 +116,7 @@ RSViolinPlot class >> example03HorizontalVionlinsShowBands [ ^ violinPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> example08Positions [ | boxPlot1 data1 | data1 := { { 1. 2. 3. 4. 5. } . @@ -127,7 +129,7 @@ RSViolinPlot class >> example08Positions [ ^ boxPlot1 open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleDays [ | chart p1 p2 p3 y1 y2 y3 | @@ -151,7 +153,7 @@ RSViolinPlot class >> exampleDays [ ^ chart open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleDaysHorizontal [ | chart p1 p2 p3 y1 y2 y3 | @@ -175,7 +177,20 @@ RSViolinPlot class >> exampleDaysHorizontal [ ^ chart open. ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } +RSViolinPlot class >> exampleErrorMargin [ + | violinPlot data | + data := {{5. 12. 12. 13. 14. 14. 15. 24. }. {1. 12. 12. 13. 14. 14. 15. 24. }.}. + violinPlot := self data: data. + violinPlot bandwidth: 3. + violinPlot verticalTick + integer; + numberOfTicks: 10. + violinPlot errorMargin: 0.09. + ^ violinPlot open. +] + +{ #category : 'examples - styling' } RSViolinPlot class >> exampleMedianLineStyle [ | violinPlot2 data2 | @@ -188,7 +203,7 @@ RSViolinPlot class >> exampleMedianLineStyle [ ^ violinPlot2 open ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleModel [ | violinPlot | violinPlot := self new. @@ -197,7 +212,7 @@ RSViolinPlot class >> exampleModel [ ^ violinPlot open ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleModels [ | violinPlot accessor | accessor := [ :cls| cls methods collect: [ :met | met linesOfCode ] ]. @@ -208,7 +223,7 @@ RSViolinPlot class >> exampleModels [ ^ violinPlot open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyle [ | violinPlot2 data2 paint | @@ -224,7 +239,7 @@ RSViolinPlot class >> exampleStyle [ ^ violinPlot2 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleBorder [ | violinPlot2 data2 | @@ -237,7 +252,7 @@ RSViolinPlot class >> exampleStyleBorder [ ^ violinPlot2 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleBorderColorOfEachViolin [ | violinPlot1 data1 | @@ -251,7 +266,7 @@ RSViolinPlot class >> exampleStyleBorderColorOfEachViolin [ ^ violinPlot1 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleBorderOfEachViolin [ | violinPlot2 data2 | @@ -266,7 +281,7 @@ RSViolinPlot class >> exampleStyleBorderOfEachViolin [ ^ violinPlot2 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleBordersColor [ | violinPlot1 data1 | @@ -279,7 +294,7 @@ RSViolinPlot class >> exampleStyleBordersColor [ ^ violinPlot1 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleBordersColors [ | violinPlot1 data1 | @@ -292,7 +307,7 @@ RSViolinPlot class >> exampleStyleBordersColors [ ^ violinPlot1 open ] -{ #category : #'examples - styling' } +{ #category : 'examples - styling' } RSViolinPlot class >> exampleStyleColor [ | violinPlot data | data := {{-5. 12. 12. 13. 14. 14. 15. 24. }.}. @@ -302,7 +317,7 @@ RSViolinPlot class >> exampleStyleColor [ ^ violinPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleViolinPlotClusters [ | violinPlotA violinPlotB data aRSClusterChart | data := {{-5. 12. 12. 13. 14. 14. 15. 24. }. {-5. 12. 12. 13. 14. 14. 15. 24. }.}. @@ -320,7 +335,7 @@ RSViolinPlot class >> exampleViolinPlotClusters [ ^ aRSClusterChart open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleViolinPlotColors [ | violinPlot data | data := {{-5. 12. 12. 13. 14. 14. 15. 24. }. {-5. 12. 12. 13. 14. 14. 15. 24. }.}. @@ -333,7 +348,7 @@ RSViolinPlot class >> exampleViolinPlotColors [ ^ violinPlot open. ] -{ #category : #examples } +{ #category : 'examples' } RSViolinPlot class >> exampleViolinPlotWithOutliers [ | violinPlot data | data := {-5. 12. 12. 13. 14. 14. 15. 24. }. @@ -342,7 +357,7 @@ RSViolinPlot class >> exampleViolinPlotWithOutliers [ ^ violinPlot open. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot class >> model: aModel [ | boxPlot | boxPlot := self new. @@ -350,7 +365,7 @@ RSViolinPlot class >> model: aModel [ ^ boxPlot ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot class >> models: aCollectionOfModels [ | boxPlot | boxPlot := self new. @@ -358,54 +373,54 @@ RSViolinPlot class >> models: aCollectionOfModels [ ^ boxPlot ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> bandwidth: aNumber [ self kernelBandwidth: aNumber. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> borderColor [ ^ self bordersColor first. ] -{ #category : #styling } +{ #category : 'styling' } RSViolinPlot >> borderColor: aColor [ self bordersColor: aColor. ] -{ #category : #styling } +{ #category : 'styling' } RSViolinPlot >> borderColors: aCollectionOfColors [ self bordersColors: aCollectionOfColors. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> borders [ ^ bandPlotShapes collect: [ :violin | violin border ]. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> bordersColor [ ^ self borders collect: [ :border | border color ] ] -{ #category : #styling } +{ #category : 'styling' } RSViolinPlot >> bordersColor: aColor [ self borders do: [ :border | border color: aColor]. ] -{ #category : #styling } +{ #category : 'styling' } RSViolinPlot >> bordersColors: aCollectionOfColors [ | borders | borders := self borders. aCollectionOfColors doWithIndex: [ :aColor :idx | (borders at: idx) color: aColor]. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> boxes [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :violin | violin box ]); yourself. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> buildChart [ chart add: self. chart @@ -414,33 +429,28 @@ RSViolinPlot >> buildChart [ ^ chart ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlot >> canHandleCluster [ ^ true ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> colors: collectionOfColors [ bandPlotShapes doWithIndex: [ :violinShape :idx | violinShape color: (collectionOfColors at: idx) ]. ] -{ #category : #initialization } -RSViolinPlot >> computeDefualtXTicks [ - self horizontalTick ticks ifNil: [ self xTickLabels: (1 to: self numberOfViolins) ]. -] - -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlot >> computeState [ self computeXValues. self computeYValues. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> computeXValues [ xValues := (1 to: self numberOfViolins). ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlot >> computeYValues [ | yMax yMin | yMax := (bandPlotShapes collect: [ :violinShape | violinShape maxDataValue ]) max. @@ -448,15 +458,16 @@ RSViolinPlot >> computeYValues [ yValues := {yMin. yMax.}. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> createViolinShapeFor: anObject dataset: dataset [ self assert: dataset notEmpty description: 'dataset can not be empty'. - ^ (RSViolinPlotShape data: dataset) + ^ RSViolinPlotShape new + data: dataset; model: anObject; yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> createViolinShapesWithDataSet: collectionOfDatasets [ | groupOfModels newViolinShapes | groupOfModels := models. @@ -468,12 +479,12 @@ RSViolinPlot >> createViolinShapesWithDataSet: collectionOfDatasets [ self violinShapes: newViolinShapes ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> createdShapes [ ^ { bandPlotShapes } ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> data [ | collectionOfDatasets | collectionOfDatasets := bandPlotShapes collect: [ :violin | violin data ]. @@ -481,7 +492,7 @@ RSViolinPlot >> data [ ^ collectionOfDatasets. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> data: dataset [ "dataset could be: @@ -496,19 +507,24 @@ RSViolinPlot >> data: dataset [ self computeState ] -{ #category : #'accessing - computed' } +{ #category : 'accessing - computed' } RSViolinPlot >> datasetsFromModels: data [ models ifNil: [ ^ data ]. ^ models collect: [:anOjbect | data rsValue: anOjbect ]. ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } RSViolinPlot >> defaultShape [ ^ RSPolygon new noPaint. ] -{ #category : #'accessing - computed' } +{ #category : 'accessing' } +RSViolinPlot >> errorMargin: aNumber [ + bandPlotShapes do: [ :vs | vs errorMargin: aNumber ] +] + +{ #category : 'accessing - computed' } RSViolinPlot >> extractDatasetsFrom: data [ | result datasets | datasets := self datasetsFromModels: data. @@ -520,55 +536,55 @@ RSViolinPlot >> extractDatasetsFrom: data [ ^ result ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlot >> initialize [ super initialize. bandPlotShapes := OrderedCollection new. horizontal := false. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> kernelBandwidth: aNumber [ bandPlotShapes do: [ :violin | violin kernelBandwidth: aNumber ]. self computeState. ] -{ #category : #styling } +{ #category : 'styling' } RSViolinPlot >> medianLine: aRSLineModel [ bandPlotShapes do: [ :bs | bs medianLine: aRSLineModel ] ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlot >> medianLines [ ^ RSGroup new addAll: (bandPlotShapes collect: [ :violin | violin medianLine ]); yourself. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> model [ ^ model ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> model: aModel [ model := aModel. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> models [ ^ models ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> models: aCollectionOfModels [ models := aCollectionOfModels ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> numberOfViolins [ ^ bandPlotShapes size ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> renderIn: canvas [ super renderIn: canvas. offset ifNil: [ offset := 1 ]. @@ -584,12 +600,12 @@ RSViolinPlot >> renderIn: canvas [ violinPlotShape renderIn: canvas ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> violinShapes [ ^ bandPlotShapes ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlot >> violinShapes: collectionOfRSViolinPlotShapes [ bandPlotShapes := collectionOfRSViolinPlotShapes diff --git a/src/Roassal-Chart/RSViolinPlotShape.class.st b/src/Roassal-Chart/RSViolinPlotShape.class.st index 77616ae7..b268bbc3 100644 --- a/src/Roassal-Chart/RSViolinPlotShape.class.st +++ b/src/Roassal-Chart/RSViolinPlotShape.class.st @@ -1,15 +1,17 @@ Class { - #name : #RSViolinPlotShape, - #superclass : #RSAbstractBandPlotShape, + #name : 'RSViolinPlotShape', + #superclass : 'RSAbstractBandPlotShape', #instVars : [ 'boxPlotShape', 'kernelDensity', 'densityArea' ], - #category : #'Roassal-Chart-Plots' + #category : 'Roassal-Chart-Plots', + #package : 'Roassal-Chart', + #tag : 'Plots' } -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlotShape class >> data: collectionOfData1D [ | violinShape | violinShape := self new. @@ -17,46 +19,46 @@ RSViolinPlotShape class >> data: collectionOfData1D [ ^ violinShape ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlotShape >> area [ ^ densityArea ] -{ #category : #band } +{ #category : 'band' } RSViolinPlotShape >> bandOffset: aNumber [ super bandOffset: aNumber. boxPlotShape bandOffset: bandOffset. ] -{ #category : #scales } +{ #category : 'scales' } RSViolinPlotShape >> bandScale: aNSScale [ super bandScale: aNSScale. boxPlotShape bandScale: aNSScale. ] -{ #category : #band } +{ #category : 'band' } RSViolinPlotShape >> bandWidth: aNumber [ super bandWidth: aNumber. boxPlotShape bandWidth: bandWidth*0.1. boxPlotShape outlierSize: (bandWidth*0.05) abs. ] -{ #category : #border } +{ #category : 'border' } RSViolinPlotShape >> border [ ^ densityArea border. ] -{ #category : #border } +{ #category : 'border' } RSViolinPlotShape >> borderColor: aColor [ ^ self border color: aColor. ] -{ #category : #band } +{ #category : 'band' } RSViolinPlotShape >> color [ ^ color ifNil: [ densityArea color ]. ] -{ #category : #shapes } +{ #category : 'shapes' } RSViolinPlotShape >> createShapesAndLines [ | shapes | densityArea := self densityArea. @@ -66,12 +68,12 @@ RSViolinPlotShape >> createShapesAndLines [ ^ shapes. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlotShape >> data [ ^ kernelDensity data. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlotShape >> data: dataset [ | aCollection | aCollection := dataset rsValue: model. @@ -79,36 +81,36 @@ RSViolinPlotShape >> data: dataset [ boxPlotShape data: aCollection. ] -{ #category : #scales } +{ #category : 'scales' } RSViolinPlotShape >> dataScale: aNSScale [ super dataScale: aNSScale. boxPlotShape dataScale: aNSScale. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlotShape >> dataSorted [ ^ boxPlotShape data. ] -{ #category : #defaults } +{ #category : 'defaults' } RSViolinPlotShape >> defaultBoxPlotShape [ ^ RSBoxPlotShape new. ] -{ #category : #defaults } +{ #category : 'defaults' } RSViolinPlotShape >> defaultDensityArea [ ^ RSPolygon new noPaint borderColor: Color black. ] -{ #category : #defaults } +{ #category : 'defaults' } RSViolinPlotShape >> defaultKernelDensity [ "Check the default Kernel function in RSKernelDensity >> defaultKernel (by default a gaussian function)" ^ RSKernelDensity new. ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlotShape >> densityArea [ | densityCurve densityAreaPoints maxX minX | @@ -143,7 +145,12 @@ RSViolinPlotShape >> densityArea [ ^ densityArea ] -{ #category : #initialization } +{ #category : 'private' } +RSViolinPlotShape >> errorMargin: aNumber [ + kernelDensity errorMargin: aNumber +] + +{ #category : 'initialization' } RSViolinPlotShape >> initialize [ super initialize. kernelDensity := self defaultKernelDensity. @@ -153,59 +160,59 @@ RSViolinPlotShape >> initialize [ shouldShowBand := false. ] -{ #category : #defaults } +{ #category : 'accessing - attributes' } RSViolinPlotShape >> kernelBandwidth: aNumber [ - kernelDensity bandwidth: aNumber. + kernelDensity bandwidth: aNumber ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlotShape >> maxDataValue [ | maxYValueOfCurve | maxYValueOfCurve := (kernelDensity densityCurve collect: [ :point | point x ]) max. ^ boxPlotShape maxDataValue max: maxYValueOfCurve. ] -{ #category : #accessing } +{ #category : 'accessing' } RSViolinPlotShape >> medianLine [ ^ boxPlotShape medianLine ] -{ #category : #shapes } +{ #category : 'shapes' } RSViolinPlotShape >> medianLine: aRSLineModel [ boxPlotShape medianLine: aRSLineModel copy ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlotShape >> minDataValue [ | minYValueOfCurve | minYValueOfCurve := (kernelDensity densityCurve collect: [ :point | point x ]) min. ^ boxPlotShape minDataValue min: minYValueOfCurve. ] -{ #category : #'accessing - attributes' } +{ #category : 'accessing - attributes' } RSViolinPlotShape >> model: aModel [ super model: aModel. boxPlotShape model: aModel. ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlotShape >> outlierSize: aDimensionInPixels [ boxPlotShape outlierSize: aDimensionInPixels. ] -{ #category : #rendering } +{ #category : 'rendering' } RSViolinPlotShape >> renderIn: canvas [ self addChildrenToComposite. canvas add: self. ^ canvas. ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlotShape >> scalePoint: aPoint [ ^ (bandScale scale: aPoint x) @ (dataScale scale: aPoint y) ] -{ #category : #initialization } +{ #category : 'initialization' } RSViolinPlotShape >> scales: collectionOfNSScales [ self bandScale: collectionOfNSScales first. self dataScale: collectionOfNSScales second. diff --git a/src/Roassal-Chart/RSXLabelDecoration.class.st b/src/Roassal-Chart/RSXLabelDecoration.class.st index 8dc0d3a3..6ef77c81 100644 --- a/src/Roassal-Chart/RSXLabelDecoration.class.st +++ b/src/Roassal-Chart/RSXLabelDecoration.class.st @@ -19,12 +19,14 @@ p open ``` " Class { - #name : #RSXLabelDecoration, - #superclass : #RSAbstractLabelDecoration, - #category : #'Roassal-Chart-Decoration' + #name : 'RSXLabelDecoration', + #superclass : 'RSAbstractLabelDecoration', + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #'public - positioning shorcuts' } +{ #category : 'public - positioning shorcuts' } RSXLabelDecoration >> above [ self location offset: 0@ -5; @@ -32,7 +34,7 @@ RSXLabelDecoration >> above [ center ] -{ #category : #'public - positioning shorcuts' } +{ #category : 'public - positioning shorcuts' } RSXLabelDecoration >> below [ self location offset: 0@5; @@ -40,7 +42,7 @@ RSXLabelDecoration >> below [ center ] -{ #category : #initialization } +{ #category : 'initialization' } RSXLabelDecoration >> initialize [ super initialize. self below diff --git a/src/Roassal-Chart/RSXMarkerDecoration.class.st b/src/Roassal-Chart/RSXMarkerDecoration.class.st index c8dce256..40d0e894 100644 --- a/src/Roassal-Chart/RSXMarkerDecoration.class.st +++ b/src/Roassal-Chart/RSXMarkerDecoration.class.st @@ -20,17 +20,19 @@ p -=-=-=-=-=-=-=-=-= " Class { - #name : #RSXMarkerDecoration, - #superclass : #RSAbstractMarkerDecoration, - #category : #'Roassal-Chart-Decoration' + #name : 'RSXMarkerDecoration', + #superclass : 'RSAbstractMarkerDecoration', + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSXMarkerDecoration >> average [ getRelevantValueBlock := [ :aPlot | aPlot definedValuesX average ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSXMarkerDecoration >> createMarkerLineFromPlot: aPlot [ | value | @@ -41,17 +43,17 @@ RSXMarkerDecoration >> createMarkerLineFromPlot: aPlot [ to: (aPlot xScale scale: value) @ chart extent y negated ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSXMarkerDecoration >> max [ getRelevantValueBlock := [ :p | p maxChartValueX ] ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSXMarkerDecoration >> min [ getRelevantValueBlock := [ :p | p minChartValueX ] ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSXMarkerDecoration >> sumUpTo: ratio [ self assert: (ratio between: 0 and: 1). getRelevantValueBlock := [ :aPlot | | total | diff --git a/src/Roassal-Chart/RSYLabelDecoration.class.st b/src/Roassal-Chart/RSYLabelDecoration.class.st index b7b4c41d..f916be3d 100644 --- a/src/Roassal-Chart/RSYLabelDecoration.class.st +++ b/src/Roassal-Chart/RSYLabelDecoration.class.st @@ -19,19 +19,21 @@ p open ``` " Class { - #name : #RSYLabelDecoration, - #superclass : #RSAbstractLabelDecoration, - #category : #'Roassal-Chart-Decoration' + #name : 'RSYLabelDecoration', + #superclass : 'RSAbstractLabelDecoration', + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #initialization } +{ #category : 'initialization' } RSYLabelDecoration >> initialize [ super initialize. self vertical. self left ] -{ #category : #accessing } +{ #category : 'accessing' } RSYLabelDecoration >> left [ self location offset: -5 @ 0; @@ -40,7 +42,7 @@ RSYLabelDecoration >> left [ middle ] -{ #category : #accessing } +{ #category : 'accessing' } RSYLabelDecoration >> right [ self location offset: 5 @ 0; diff --git a/src/Roassal-Chart/RSYMarkerDecoration.class.st b/src/Roassal-Chart/RSYMarkerDecoration.class.st index 729177b3..dbf2388a 100644 --- a/src/Roassal-Chart/RSYMarkerDecoration.class.st +++ b/src/Roassal-Chart/RSYMarkerDecoration.class.st @@ -21,17 +21,19 @@ p -=-=-=-=-=-=-=-=-= " Class { - #name : #RSYMarkerDecoration, - #superclass : #RSAbstractMarkerDecoration, - #category : #'Roassal-Chart-Decoration' + #name : 'RSYMarkerDecoration', + #superclass : 'RSAbstractMarkerDecoration', + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSYMarkerDecoration >> average [ getRelevantValueBlock := [ :aPlot | aPlot definedValuesY average ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSYMarkerDecoration >> createMarkerLineFromPlot: aPlot [ | value | @@ -41,12 +43,12 @@ RSYMarkerDecoration >> createMarkerLineFromPlot: aPlot [ to: chart extent x @ (aPlot yScale scale: value) ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSYMarkerDecoration >> max [ getRelevantValueBlock := [ :p | p maxChartValueY ] ] -{ #category : #'public - configuration' } +{ #category : 'public - configuration' } RSYMarkerDecoration >> min [ getRelevantValueBlock := [ :p | p minChartValueY ] ] diff --git a/src/Roassal-Chart/RSZoomTickDecoration.class.st b/src/Roassal-Chart/RSZoomTickDecoration.class.st index 9bb119dd..e81bbe07 100644 --- a/src/Roassal-Chart/RSZoomTickDecoration.class.st +++ b/src/Roassal-Chart/RSZoomTickDecoration.class.st @@ -2,18 +2,20 @@ this decoration is an example of how to put some interactions in the canvas and interact with some objects like the ticks in the chart " Class { - #name : #RSZoomTickDecoration, - #superclass : #RSAbstractChartDecoration, + #name : 'RSZoomTickDecoration', + #superclass : 'RSAbstractChartDecoration', #instVars : [ 'resetLabel', 'visibleRectangle', 'currentShapes', 'elasticBox' ], - #category : #'Roassal-Chart-Decoration' + #category : 'Roassal-Chart-Decoration', + #package : 'Roassal-Chart', + #tag : 'Decoration' } -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> boxScale [ | spine | spine := chart spine encompassingRectangle. @@ -22,7 +24,7 @@ RSZoomTickDecoration >> boxScale [ range: { visibleRectangle origin. visibleRectangle corner} ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> chartElements [ | elements | elements := OrderedCollection new. @@ -32,7 +34,7 @@ RSZoomTickDecoration >> chartElements [ ^ elements ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> computeVisibleRectangle: eventRectangle [ | rect spine scale | "spine the the chart box" @@ -43,7 +45,7 @@ RSZoomTickDecoration >> computeVisibleRectangle: eventRectangle [ ^ (scale scale: rect origin) corner: (scale scale: rect corner) ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> createElasticBox [ ^ RSElasticBoxInteraction new targetShapes: #(); @@ -52,7 +54,7 @@ RSZoomTickDecoration >> createElasticBox [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> createResetLabel [ | label | label := self shape copy @@ -66,12 +68,12 @@ RSZoomTickDecoration >> createResetLabel [ ^ label ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> createdShapes [ ^ { resetLabel } ] -{ #category : #initialization } +{ #category : 'initialization' } RSZoomTickDecoration >> defaultShape [ ^ RSLabel new fontSize: 5; @@ -79,12 +81,12 @@ RSZoomTickDecoration >> defaultShape [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RSZoomTickDecoration >> elasticBox [ ^ elasticBox ifNil: [ elasticBox := self createElasticBox ] ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderIn: canvas [ canvas addInteraction: self elasticBox. resetLabel := self createResetLabel. @@ -94,7 +96,7 @@ RSZoomTickDecoration >> renderIn: canvas [ self resetZoom: canvas ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderPlots [ | visibleShapes scale | visibleShapes := chart createdShapes select: [ :s | s encompassingRectangle intersects: visibleRectangle ]. @@ -116,7 +118,7 @@ RSZoomTickDecoration >> renderPlots [ currentShapes add: visibleShapes ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderPlotsAndTicksIn: canvas [ currentShapes := OrderedCollection new. self renderPlots. @@ -124,13 +126,13 @@ RSZoomTickDecoration >> renderPlotsAndTicksIn: canvas [ canvas addAll: currentShapes ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderTicks [ self renderYAxis. self renderXAxis ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderXAxis [ | horizontalTick tickShapes newPlot scale | horizontalTick := chart horizontalTick. @@ -156,7 +158,7 @@ RSZoomTickDecoration >> renderXAxis [ currentShapes addAll: tickShapes ] -{ #category : #rendering } +{ #category : 'rendering' } RSZoomTickDecoration >> renderYAxis [ | verticalTick tickShapes ymin ymax scale | verticalTick := chart verticalTick. @@ -175,7 +177,7 @@ RSZoomTickDecoration >> renderYAxis [ currentShapes addAll: tickShapes ] -{ #category : #events } +{ #category : 'events' } RSZoomTickDecoration >> resetZoom: evt [ | canvas | canvas := evt canvas. @@ -187,7 +189,7 @@ RSZoomTickDecoration >> resetZoom: evt [ evt signalUpdate ] -{ #category : #events } +{ #category : 'events' } RSZoomTickDecoration >> updateSelection: evt [ visibleRectangle := self computeVisibleRectangle: evt shape encompassingRectangle. currentShapes do: #remove. diff --git a/src/Roassal-Chart/SequenceableCollection.extension.st b/src/Roassal-Chart/SequenceableCollection.extension.st index c88d456a..9766fbb2 100644 --- a/src/Roassal-Chart/SequenceableCollection.extension.st +++ b/src/Roassal-Chart/SequenceableCollection.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SequenceableCollection } +Extension { #name : 'SequenceableCollection' } -{ #category : #'*Roassal-Chart' } +{ #category : '*Roassal-Chart' } SequenceableCollection >> rsHistogram [ | plot | plot := RSHistogramPlot new x: self. diff --git a/src/Roassal-Chart/package.st b/src/Roassal-Chart/package.st index 5bee6cc4..2f196e11 100644 --- a/src/Roassal-Chart/package.st +++ b/src/Roassal-Chart/package.st @@ -1 +1 @@ -Package { #name : #'Roassal-Chart' } +Package { #name : 'Roassal-Chart' } diff --git a/src/Roassal-Examples/Class.extension.st b/src/Roassal-Examples/Class.extension.st index ef1c6b81..a5bb12f0 100644 --- a/src/Roassal-Examples/Class.extension.st +++ b/src/Roassal-Examples/Class.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Class } +Extension { #name : 'Class' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } Class >> numberOfLinesOfCode [ "A convenient and homogeneous method to return the number of lines of code" ^ self linesOfCode diff --git a/src/Roassal-Examples/CompiledMethod.extension.st b/src/Roassal-Examples/CompiledMethod.extension.st index 95fcc5a1..2145ba2f 100644 --- a/src/Roassal-Examples/CompiledMethod.extension.st +++ b/src/Roassal-Examples/CompiledMethod.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CompiledMethod } +Extension { #name : 'CompiledMethod' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } CompiledMethod >> dependentMethods [ "Return the list of methods defined in my class for which I may invoke" "(self >> #dependentMethods) dependentMethods" @@ -9,7 +9,7 @@ CompiledMethod >> dependentMethods [ thenCollect: [ :k | self methodClass >> k ] ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } CompiledMethod >> numberOfLinesOfCode [ ^ self linesOfCode ] diff --git a/src/Roassal-Examples/RPackage.extension.st b/src/Roassal-Examples/RPackage.extension.st index 3646d102..85e90eb7 100644 --- a/src/Roassal-Examples/RPackage.extension.st +++ b/src/Roassal-Examples/RPackage.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RPackage } +Extension { #name : 'RPackage' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RPackage >> dependentPackagesWithOccurences [ " Return the list of packages that I depend on. The result may includes several times the same packages. This reflects the number of dependencies. @@ -10,7 +10,7 @@ RPackage >> dependentPackagesWithOccurences [ ^ (self definedClasses flatCollect: #dependentClassesWithOccurences as: Bag) collect: #package ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RPackage >> numberOfDependenciesToward: anotherPackage [ " Return the number of dependencies between mysefl and the package provided as argument diff --git a/src/Roassal-Examples/RSAbstractExamples.class.st b/src/Roassal-Examples/RSAbstractExamples.class.st index ab529686..49536fe1 100644 --- a/src/Roassal-Examples/RSAbstractExamples.class.st +++ b/src/Roassal-Examples/RSAbstractExamples.class.st @@ -5,17 +5,19 @@ The goal is to make the examples part of the tests. If you wish to add examples to Roassal, then you need to subclass me. " Class { - #name : #RSAbstractExamples, - #superclass : #RSObject, - #category : #'Roassal-Examples-Core' + #name : 'RSAbstractExamples', + #superclass : 'RSObject', + #category : 'Roassal-Examples-Core', + #package : 'Roassal-Examples', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractExamples >> label [ ^ self className ] -{ #category : #accessing } +{ #category : 'accessing' } RSAbstractExamples >> order [ ^ 100 ] diff --git a/src/Roassal-Examples/RSAnimationExamples.class.st b/src/Roassal-Examples/RSAnimationExamples.class.st index 02a20400..af046221 100644 --- a/src/Roassal-Examples/RSAnimationExamples.class.st +++ b/src/Roassal-Examples/RSAnimationExamples.class.st @@ -2,12 +2,14 @@ I have examples for animation " Class { - #name : #RSAnimationExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSAnimationExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example01BoxWindmill [ | canvas shapes extent points frameCount border | @@ -42,7 +44,7 @@ RSAnimationExamples >> example01BoxWindmill [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example02BoxesLineCircles [ @@ -141,7 +143,7 @@ RSAnimationExamples >> example02BoxesLineCircles [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example03Atom [ @@ -193,7 +195,7 @@ RSAnimationExamples >> example03Atom [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example05ElasticEllipses [ @@ -251,7 +253,7 @@ RSAnimationExamples >> example05ElasticEllipses [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example06LinePatterns [ @@ -314,7 +316,7 @@ RSAnimationExamples >> example06LinePatterns [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example07CircleParty [ | canvas x x2 speed speed2 random shape color | @@ -365,7 +367,7 @@ RSAnimationExamples >> example07CircleParty [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example08ArcTree [ @@ -418,7 +420,7 @@ RSAnimationExamples >> example08ArcTree [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example09PerlinParticles [ > example09PerlinParticles [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example09b [ @@ -636,7 +638,7 @@ RSAnimationExamples >> example09b [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example10Arcs [ @@ -683,7 +685,7 @@ RSAnimationExamples >> example10Arcs [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example11C [ @@ -712,7 +714,7 @@ RSAnimationExamples >> example11C [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example12Sky [ @@ -778,7 +780,7 @@ RSAnimationExamples >> example12Sky [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example13ArcNoise [ > example13ArcNoise [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example14Retina [ @@ -924,7 +926,7 @@ RSAnimationExamples >> example14Retina [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example15SpaceDandy [ @@ -1008,7 +1010,7 @@ RSAnimationExamples >> example15SpaceDandy [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example16Gris [ @@ -1099,7 +1101,7 @@ RSAnimationExamples >> example16Gris [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example17Flor [ @@ -1151,7 +1153,7 @@ RSAnimationExamples >> example17Flor [ ^ c ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example18Rainbow [ @@ -1245,7 +1247,7 @@ RSAnimationExamples >> example18Rainbow [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example19Stars [ @@ -1287,7 +1289,7 @@ RSAnimationExamples >> example19Stars [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example20CircleWaves [ @@ -1328,7 +1330,7 @@ RSAnimationExamples >> example20CircleWaves [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example21Lines [ @@ -1408,7 +1410,7 @@ RSAnimationExamples >> example21Lines [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example22Lines [ @@ -1469,7 +1471,7 @@ RSAnimationExamples >> example22Lines [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example23PerlinNoise [ "inpired by wangyasai Twitter: @yasai_wang" @@ -1521,7 +1523,7 @@ RSAnimationExamples >> example23PerlinNoise [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example24RoassalPerlinNoise [ > example24RoassalPerlinNoise [ " ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example25AnimationCircle [ > example25AnimationCircle [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example26Bezier [ @@ -1768,7 +1770,7 @@ RSAnimationExamples >> example26Bezier [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example27RSLocate [ > example27RSLocate [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example28AlteredWorld [ "base on Gerard Ferrandez source code" @@ -1945,7 +1947,7 @@ RSAnimationExamples >> example28AlteredWorld [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example29Tick [ @@ -2007,7 +2009,7 @@ RSAnimationExamples >> example29Tick [ ^ c ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example30Perlin [ @@ -2086,7 +2088,7 @@ RSAnimationExamples >> example30Perlin [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example31RoundRectagles [ "example inspired in paper.js" @@ -2128,7 +2130,7 @@ RSAnimationExamples >> example31RoundRectagles [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example32SimpleClock [ > example32SimpleClock [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example33AnimatedLayout [ > example33AnimatedLayout [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example34ForceLayout [ | c classes layout | @@ -2295,7 +2297,7 @@ RSAnimationExamples >> example34ForceLayout [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example35Roassal [ @@ -2374,7 +2376,7 @@ RSAnimationExamples >> example35Roassal [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example36Title [ @@ -2499,7 +2501,7 @@ for Pharo 8 and Pharo 9.'. "TODO add animation to line3 and line4, hide and remove with animation these elements" ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example37RectangleForceLayout [ @@ -2545,7 +2547,7 @@ RSAnimationExamples >> example37RectangleForceLayout [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example38PerlinRose [ > example38PerlinRose [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example39Duna [ | canvas extent num color noiseScale perlin c particles | @@ -2634,7 +2636,7 @@ RSAnimationExamples >> example39Duna [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSAnimationExamples >> example40Circles [ @@ -2714,7 +2716,7 @@ RSAnimationExamples >> example40Circles [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example41River [ > example41River [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example42OneLine [ | canvas line ang1 ang2 radio x1 y1 x2 y2 | @@ -2815,7 +2817,7 @@ RSAnimationExamples >> example42OneLine [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSAnimationExamples >> example43Waves [ > example43Waves [ ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example44A [ " @@ -2901,7 +2903,7 @@ c svgExporter export" ^ canvas ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example45Beziers [ @@ -3123,7 +3125,7 @@ RSAnimationExamples >> example45Beziers [ ^ c ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example46Lines [ @@ -3216,7 +3218,7 @@ RSAnimationExamples >> example46Lines [ ^ c ] -{ #category : #perlin } +{ #category : 'perlin' } RSAnimationExamples >> example47FractalTree [ @@ -3268,7 +3270,7 @@ RSAnimationExamples >> example47FractalTree [ ^ canvas ] -{ #category : #accessing } +{ #category : 'accessing' } RSAnimationExamples >> order [ ^ 1000 ] diff --git a/src/Roassal-Examples/RSArrowedLine.extension.st b/src/Roassal-Examples/RSArrowedLine.extension.st index d46d5487..dfc62e23 100644 --- a/src/Roassal-Examples/RSArrowedLine.extension.st +++ b/src/Roassal-Examples/RSArrowedLine.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSArrowedLine } +Extension { #name : 'RSArrowedLine' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSArrowedLine class >> exampleArrow [ | arrow | arrow := self new. diff --git a/src/Roassal-Examples/RSBasicAnimationExamples.class.st b/src/Roassal-Examples/RSBasicAnimationExamples.class.st index bd85ec1a..302ab292 100644 --- a/src/Roassal-Examples/RSBasicAnimationExamples.class.st +++ b/src/Roassal-Examples/RSBasicAnimationExamples.class.st @@ -2,12 +2,14 @@ I have basic animation examples " Class { - #name : #RSBasicAnimationExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSBasicAnimationExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #examples } +{ #category : 'examples' } RSBasicAnimationExamples >> example01Basic [ @@ -40,7 +42,7 @@ RSBasicAnimationExamples >> example01Basic [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSBasicAnimationExamples >> example02Sequential [ @@ -74,7 +76,7 @@ RSBasicAnimationExamples >> example02Sequential [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSBasicAnimationExamples >> example03Ramp [ @@ -101,7 +103,7 @@ RSBasicAnimationExamples >> example03Ramp [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example04DashAnimation [ @@ -137,7 +139,7 @@ RSBasicAnimationExamples >> example04DashAnimation [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example05LoopEvent [ @@ -160,7 +162,7 @@ RSBasicAnimationExamples >> example05LoopEvent [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example06Parallel [ @@ -206,7 +208,7 @@ RSBasicAnimationExamples >> example06Parallel [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example07CornerRadius [ | c paint b from to | @@ -236,7 +238,7 @@ RSBasicAnimationExamples >> example07CornerRadius [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example08Markers [ | canvas line radius marker red | @@ -285,7 +287,7 @@ RSBasicAnimationExamples >> example08Markers [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example09Easing [ | canvas radius numberOfCircles circles innerRadius | @@ -326,7 +328,7 @@ RSBasicAnimationExamples >> example09Easing [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicAnimationExamples >> example10Scales [ @@ -457,7 +459,7 @@ RSBasicAnimationExamples >> example10Scales [ ^ c ] -{ #category : #accessing } +{ #category : 'accessing' } RSBasicAnimationExamples >> order [ ^ 10 ] diff --git a/src/Roassal-Examples/RSBasicShapeExamples.class.st b/src/Roassal-Examples/RSBasicShapeExamples.class.st index b3777ba3..97aafeb1 100644 --- a/src/Roassal-Examples/RSBasicShapeExamples.class.st +++ b/src/Roassal-Examples/RSBasicShapeExamples.class.st @@ -2,12 +2,14 @@ I have the basic examples for shapes " Class { - #name : #RSBasicShapeExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSBasicShapeExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example01BasicBoxes [ | c | @@ -23,7 +25,7 @@ RSBasicShapeExamples >> example01BasicBoxes [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example02BasicEllipses [ @@ -40,7 +42,7 @@ RSBasicShapeExamples >> example02BasicEllipses [ ^ c ] -{ #category : #composite } +{ #category : 'composite' } RSBasicShapeExamples >> example03BasicComposite [ | c com | @@ -69,7 +71,7 @@ RSBasicShapeExamples >> example03BasicComposite [ ^ c ] -{ #category : #composite } +{ #category : 'composite' } RSBasicShapeExamples >> example04BasicComposite [ | c com | @@ -100,7 +102,7 @@ RSBasicShapeExamples >> example04BasicComposite [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example05BasicGroup [ | g | @@ -127,7 +129,7 @@ RSBasicShapeExamples >> example05BasicGroup [ ^ g ] -{ #category : #labels } +{ #category : 'labels' } RSBasicShapeExamples >> example06BasicLabels [ | c label | @@ -162,7 +164,7 @@ RSBasicShapeExamples >> example06BasicLabels [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example07EventsMouseMoveDrag [ @@ -189,7 +191,7 @@ RSBasicShapeExamples >> example07EventsMouseMoveDrag [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example08EllipseBorder [ | c y r | @@ -217,7 +219,7 @@ RSBasicShapeExamples >> example08EllipseBorder [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example09MouseStep [ @@ -248,7 +250,7 @@ RSBasicShapeExamples >> example09MouseStep [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example10EllipseMouseMove [ @@ -280,7 +282,7 @@ RSBasicShapeExamples >> example10EllipseMouseMove [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example11ScaleMouseDistance [ @@ -329,7 +331,7 @@ RSBasicShapeExamples >> example11ScaleMouseDistance [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example12BasicLine [ @@ -366,7 +368,7 @@ RSBasicShapeExamples >> example12BasicLine [ ^ c ] -{ #category : #bitmap } +{ #category : 'bitmap' } RSBasicShapeExamples >> example14BasicBitmap [ @@ -379,7 +381,7 @@ RSBasicShapeExamples >> example14BasicBitmap [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example15BasicRoundBoxes [ @@ -398,7 +400,7 @@ RSBasicShapeExamples >> example15BasicRoundBoxes [ ^ c ] -{ #category : #border } +{ #category : 'border' } RSBasicShapeExamples >> example17Borders [ | c | @@ -424,7 +426,7 @@ RSBasicShapeExamples >> example17Borders [ ^ c ] -{ #category : #arcs } +{ #category : 'arcs' } RSBasicShapeExamples >> example18BasicPieSlice [ | c | @@ -440,7 +442,7 @@ RSBasicShapeExamples >> example18BasicPieSlice [ ^ c ] -{ #category : #arcs } +{ #category : 'arcs' } RSBasicShapeExamples >> example19PieSlice [ | c | @@ -455,7 +457,7 @@ RSBasicShapeExamples >> example19PieSlice [ ^ c ] -{ #category : #arcs } +{ #category : 'arcs' } RSBasicShapeExamples >> example20Donut [ | c | @@ -470,7 +472,7 @@ RSBasicShapeExamples >> example20Donut [ ^ c ] -{ #category : #arcs } +{ #category : 'arcs' } RSBasicShapeExamples >> example21CornerRadii [ | c | @@ -485,7 +487,7 @@ RSBasicShapeExamples >> example21CornerRadii [ ^ c ] -{ #category : #arcs } +{ #category : 'arcs' } RSBasicShapeExamples >> example22BasicPieSlice [ | c | @@ -498,7 +500,7 @@ RSBasicShapeExamples >> example22BasicPieSlice [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example23FixedShape [ | c box | @@ -519,7 +521,7 @@ RSBasicShapeExamples >> example23FixedShape [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example24Polyline [ | c | @@ -534,7 +536,7 @@ RSBasicShapeExamples >> example24Polyline [ ^ c ] -{ #category : #labels } +{ #category : 'labels' } RSBasicShapeExamples >> example25LabelWithBorder [ | c | @@ -550,7 +552,7 @@ RSBasicShapeExamples >> example25LabelWithBorder [ ^ c ] -{ #category : #polygons } +{ #category : 'polygons' } RSBasicShapeExamples >> example26Polygon [ @@ -576,7 +578,7 @@ RSBasicShapeExamples >> example26Polygon [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example27Markers [ | c arrow axes circle dataLine | @@ -604,7 +606,7 @@ RSBasicShapeExamples >> example27Markers [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example29PolylineRadius [ | c | @@ -617,7 +619,7 @@ RSBasicShapeExamples >> example29PolylineRadius [ ^ c ] -{ #category : #polygons } +{ #category : 'polygons' } RSBasicShapeExamples >> example30PolygonWithRadius [ @@ -644,7 +646,7 @@ RSBasicShapeExamples >> example30PolygonWithRadius [ ^ c ] -{ #category : #'boxes and ellipses' } +{ #category : 'boxes and ellipses' } RSBasicShapeExamples >> example31BorderAttachPointWithOffset [ | c s1 s2| @@ -670,7 +672,7 @@ RSBasicShapeExamples >> example31BorderAttachPointWithOffset [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example32RotateShapeByMouse [ | c s | @@ -684,7 +686,7 @@ RSBasicShapeExamples >> example32RotateShapeByMouse [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example33EdgesBetweenChildren [ | c b1 b2 e1 com1 com2 | @@ -713,7 +715,7 @@ RSBasicShapeExamples >> example33EdgesBetweenChildren [ ^ c ] -{ #category : #composite } +{ #category : 'composite' } RSBasicShapeExamples >> example34PaletteVisualization [ | c colors shapes compo label composites paletteObject | @@ -748,7 +750,7 @@ RSBasicShapeExamples >> example34PaletteVisualization [ ^ c ] -{ #category : #events } +{ #category : 'events' } RSBasicShapeExamples >> example35KeyEvents [ > example35KeyEvents [ ^ c ] -{ #category : #polygons } +{ #category : 'polygons' } RSBasicShapeExamples >> example36PolygonAndCanvas [ | coords canvas int | @@ -829,7 +831,7 @@ RSBasicShapeExamples >> example36PolygonAndCanvas [ ^ canvas ] -{ #category : #polygons } +{ #category : 'polygons' } RSBasicShapeExamples >> example37AngleDirection [ | canvas slice magic | @@ -883,7 +885,7 @@ RSBasicShapeExamples >> example37AngleDirection [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSBasicShapeExamples >> example38Interaction [ @@ -929,7 +931,7 @@ RSBasicShapeExamples >> example38Interaction [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSBasicShapeExamples >> example39YikigeiAnimated [ @@ -955,7 +957,7 @@ RSBasicShapeExamples >> example39YikigeiAnimated [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSBasicShapeExamples >> example40ColorScale [ | color canvas popup shapes | @@ -987,7 +989,7 @@ RSBasicShapeExamples >> example40ColorScale [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example41PopupAndMarkers [ | line marker canvas | @@ -1002,7 +1004,7 @@ RSBasicShapeExamples >> example41PopupAndMarkers [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example42GhostDraggable [ | canvas b1 b2 | @@ -1024,7 +1026,7 @@ RSBasicShapeExamples >> example42GhostDraggable [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example43ShortestAttachPoint [ | canvas numbers marker | @@ -1067,7 +1069,7 @@ RSBasicShapeExamples >> example43ShortestAttachPoint [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example44AA [ @@ -1110,7 +1112,7 @@ RSBasicShapeExamples >> example44AA [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example45ExampleRTree [ @@ -1134,7 +1136,7 @@ RSBasicShapeExamples >> example45ExampleRTree [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example46ExampleRTreeInComposites [ @@ -1171,7 +1173,7 @@ RSBasicShapeExamples >> example46ExampleRTreeInComposites [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSBasicShapeExamples >> example47ExampleRTreeWithOverlapping [ @@ -1196,7 +1198,7 @@ RSBasicShapeExamples >> example47ExampleRTreeWithOverlapping [ ^ canvas ] -{ #category : #accessing } +{ #category : 'accessing' } RSBasicShapeExamples >> order [ ^ 0 ] diff --git a/src/Roassal-Examples/RSBezier.extension.st b/src/Roassal-Examples/RSBezier.extension.st index db507e46..9e5ac7e3 100644 --- a/src/Roassal-Examples/RSBezier.extension.st +++ b/src/Roassal-Examples/RSBezier.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSBezier } +Extension { #name : 'RSBezier' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSBezier class >> exampleBezier [ | bezier | bezier := self new. @@ -8,7 +8,7 @@ RSBezier class >> exampleBezier [ ^ (Smalltalk tools inspector inspect: bezier) window. ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSBezier class >> exampleControlPointsController [ | bezier controller points | bezier := self new. diff --git a/src/Roassal-Examples/RSBitmap.extension.st b/src/Roassal-Examples/RSBitmap.extension.st index 83923909..fd1c07e9 100644 --- a/src/Roassal-Examples/RSBitmap.extension.st +++ b/src/Roassal-Examples/RSBitmap.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSBitmap } +Extension { #name : 'RSBitmap' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSBitmap class >> example [ | image | image := self new. diff --git a/src/Roassal-Examples/RSBlink.extension.st b/src/Roassal-Examples/RSBlink.extension.st index 4f5f3159..13853231 100644 --- a/src/Roassal-Examples/RSBlink.extension.st +++ b/src/Roassal-Examples/RSBlink.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSBlink } +Extension { #name : 'RSBlink' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSBlink class >> example [ | canvas shapes | diff --git a/src/Roassal-Examples/RSBox.extension.st b/src/Roassal-Examples/RSBox.extension.st index e71b1be5..dc6f2f32 100644 --- a/src/Roassal-Examples/RSBox.extension.st +++ b/src/Roassal-Examples/RSBox.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSBox } +Extension { #name : 'RSBox' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSBox class >> example [ | box | box := self new. diff --git a/src/Roassal-Examples/RSCanvasController.extension.st b/src/Roassal-Examples/RSCanvasController.extension.st index 6061bd18..d14515a8 100644 --- a/src/Roassal-Examples/RSCanvasController.extension.st +++ b/src/Roassal-Examples/RSCanvasController.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSCanvasController } +Extension { #name : 'RSCanvasController' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSCanvasController class >> exampleNoLegend [ | canvas int | canvas := RSCanvas new. diff --git a/src/Roassal-Examples/RSCellLayout.extension.st b/src/Roassal-Examples/RSCellLayout.extension.st index 197c9425..f388ddd9 100644 --- a/src/Roassal-Examples/RSCellLayout.extension.st +++ b/src/Roassal-Examples/RSCellLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSCellLayout } +Extension { #name : 'RSCellLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSCellLayout class >> example1 [ | c shapes | c := RSCanvas new. @@ -12,7 +12,7 @@ RSCellLayout class >> example1 [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSCellLayout class >> example2 [ | c shapes | c := RSCanvas new. @@ -27,7 +27,7 @@ RSCellLayout class >> example2 [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSCellLayout class >> example3 [ | c shapes | c := RSCanvas new. diff --git a/src/Roassal-Examples/RSClusteringLayout.extension.st b/src/Roassal-Examples/RSClusteringLayout.extension.st index 2245a04b..5f249a55 100644 --- a/src/Roassal-Examples/RSClusteringLayout.extension.st +++ b/src/Roassal-Examples/RSClusteringLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSClusteringLayout } +Extension { #name : 'RSClusteringLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSClusteringLayout class >> exampleMondrian [ | m nodes | m := RSMondrian new. @@ -22,7 +22,7 @@ RSClusteringLayout class >> exampleMondrian [ ^ m canvas open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSClusteringLayout class >> exampleNumbers [ | m nodes | m := RSMondrian new. diff --git a/src/Roassal-Examples/RSConditionalLayout.extension.st b/src/Roassal-Examples/RSConditionalLayout.extension.st index e80d0fee..079b309c 100644 --- a/src/Roassal-Examples/RSConditionalLayout.extension.st +++ b/src/Roassal-Examples/RSConditionalLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSConditionalLayout } +Extension { #name : 'RSConditionalLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSConditionalLayout class >> createCanvas [ | classes shapes c eb | classes := Collection allSubclasses. @@ -17,7 +17,7 @@ RSConditionalLayout class >> createCanvas [ ^ c ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSConditionalLayout class >> exampleCollection [ | c | c := self createCanvas. @@ -28,7 +28,7 @@ RSConditionalLayout class >> exampleCollection [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSConditionalLayout class >> exampleCollection2 [ | c | c := self createCanvas. diff --git a/src/Roassal-Examples/RSControlConfiguration.extension.st b/src/Roassal-Examples/RSControlConfiguration.extension.st index 53ab5bca..9a468cd4 100644 --- a/src/Roassal-Examples/RSControlConfiguration.extension.st +++ b/src/Roassal-Examples/RSControlConfiguration.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSControlConfiguration } +Extension { #name : 'RSControlConfiguration' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSControlConfiguration class >> example1 [ | c controller | c := RSCanvas new. @@ -10,7 +10,7 @@ RSControlConfiguration class >> example1 [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSControlConfiguration class >> example2 [ | canvas shapes int | canvas := RSCanvas new. diff --git a/src/Roassal-Examples/RSDSMExample.class.st b/src/Roassal-Examples/RSDSMExample.class.st index bf9d233c..f1154a6b 100644 --- a/src/Roassal-Examples/RSDSMExample.class.st +++ b/src/Roassal-Examples/RSDSMExample.class.st @@ -41,12 +41,14 @@ RTDSMExample new installTitle: 'EvolutionDSM' ' " Class { - #name : #RSDSMExample, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-DSM' + #name : 'RSDSMExample', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-DSM', + #package : 'Roassal-Examples', + #tag : 'DSM' } -{ #category : #'example-data' } +{ #category : 'example-data' } RSDSMExample class >> collab [ ^ 'time n1 n2 weight 2005 Lea Lucas 4.0 @@ -259,7 +261,7 @@ RSDSMExample class >> collab [ 2010 Hugo Hugo 1.0' ] -{ #category : #'example-data' } +{ #category : 'example-data' } RSDSMExample class >> gtinspector [ ^ 'time n1 n2 weight 51 GTExample AndreiChis 1 @@ -307,7 +309,7 @@ RSDSMExample class >> gtinspector [ ' ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example01Numbers [ | dsm | @@ -317,7 +319,7 @@ RSDSMExample >> example01Numbers [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example02Numbers [ | dsm | @@ -328,7 +330,7 @@ RSDSMExample >> example02Numbers [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example03Classes [ | dsm | @@ -340,34 +342,41 @@ RSDSMExample >> example03Classes [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example04Token [ - + | packageRegExp packages getKeywordsFromClass rawKeywords top10Keywords dsm | - packageRegExp := { 'Roassal-*' }. + packageRegExp := { 'Roassal-*' }. packages := RPackageOrganizer default packages select: [ :p | - packageRegExp anySatisfy: [ :r | r match: p packageName ] ]. + packageRegExp anySatisfy: [ :r | r match: p name ] ]. getKeywordsFromClass := [ :cls | - (cls name cutCamelCase, ((((cls methods collect: #selector) flatCollect: [:k | - k substrings: ':' ] ) flatCollect: #cutCamelCase))) collect: #asLowercase ]. + cls name cutCamelCase + , + (((cls methods collect: #selector) + flatCollect: [ :k | k substrings: ':' ]) + flatCollect: #cutCamelCase) collect: + #asLowercase ]. - rawKeywords := (packages flatCollect: #definedClasses) flatCollect: getKeywordsFromClass. + rawKeywords := (packages flatCollect: #definedClasses) flatCollect: + getKeywordsFromClass. - top10Keywords := (((rawKeywords groupedBy: #yourself) associations sorted: [ :a :b | - a value size > b value size ]) first: 70) collect: #key. + top10Keywords := (((rawKeywords groupedBy: #yourself) associations + sorted: [ :a :b | a value size > b value size ]) + first: 70) collect: #key. dsm := RSDSM new. dsm objectsX: top10Keywords. dsm objectsY: packages. dsm setShouldFeedY. dsm labelShapeY textBlock: #packageName. - dsm dependency: [ :pak | pak definedClasses flatCollect: getKeywordsFromClass ]. + dsm dependency: [ :pak | + pak definedClasses flatCollect: getKeywordsFromClass ]. ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example05TopLabelRotation [ | dsm v keys | @@ -385,7 +394,7 @@ RSDSMExample >> example05TopLabelRotation [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example06StronglyConnected [ | dsm v keys | @@ -402,7 +411,7 @@ RSDSMExample >> example06StronglyConnected [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example07StronglyConnectedWithClasses [ | classes v keys dsm | @@ -425,7 +434,7 @@ RSDSMExample >> example07StronglyConnectedWithClasses [ ^ dsm ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example08Heatmap [ | builder | @@ -436,7 +445,7 @@ RSDSMExample >> example08Heatmap [ ^ builder ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example09HeatmapMonths [ | builder | @@ -465,7 +474,7 @@ RSDSMExample >> example09HeatmapMonths [ ^ builder ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example10Vegetables [ | vegetables farmers values h | @@ -488,7 +497,7 @@ RSDSMExample >> example10Vegetables [ ^ h ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example11Heatmap [ | builder | @@ -502,7 +511,7 @@ RSDSMExample >> example11Heatmap [ ^ builder canvas ] -{ #category : #sources } +{ #category : 'sources' } RSDSMExample >> example12Heatmap [ | builder | diff --git a/src/Roassal-Examples/RSDraggable.extension.st b/src/Roassal-Examples/RSDraggable.extension.st index 056a655f..199ba889 100644 --- a/src/Roassal-Examples/RSDraggable.extension.st +++ b/src/Roassal-Examples/RSDraggable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSDraggable } +Extension { #name : 'RSDraggable' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSDraggable class >> example [ | canvas | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSDraggableCanvasInteraction.extension.st b/src/Roassal-Examples/RSDraggableCanvasInteraction.extension.st index 03973748..2848cbef 100644 --- a/src/Roassal-Examples/RSDraggableCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSDraggableCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSDraggableCanvasInteraction } +Extension { #name : 'RSDraggableCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSDraggableCanvasInteraction class >> example [ | canvas interaction | canvas := self canvasExample. @@ -13,7 +13,7 @@ RSDraggableCanvasInteraction class >> example [ ^ canvas open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSDraggableCanvasInteraction class >> exampleOriginTopLeft [ | canvas | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSEquidistantCircleLayout.extension.st b/src/Roassal-Examples/RSEquidistantCircleLayout.extension.st index fd3ecfa1..d006fabf 100644 --- a/src/Roassal-Examples/RSEquidistantCircleLayout.extension.st +++ b/src/Roassal-Examples/RSEquidistantCircleLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSEquidistantCircleLayout } +Extension { #name : 'RSEquidistantCircleLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSEquidistantCircleLayout class >> example1 [ | v elements | diff --git a/src/Roassal-Examples/RSExpandingBoxes.class.st b/src/Roassal-Examples/RSExpandingBoxes.class.st index 916d051b..3e8e5a39 100644 --- a/src/Roassal-Examples/RSExpandingBoxes.class.st +++ b/src/Roassal-Examples/RSExpandingBoxes.class.st @@ -2,24 +2,26 @@ This is a simple example suggested by Nicolas Anquetil " Class { - #name : #RSExpandingBoxes, - #superclass : #RSObject, + #name : 'RSExpandingBoxes', + #superclass : 'RSObject', #instVars : [ 'canvas', 'color', 'base', 'border' ], - #category : #'Roassal-Examples-Experimental' + #category : 'Roassal-Examples-Experimental', + #package : 'Roassal-Examples', + #tag : 'Experimental' } -{ #category : #events } +{ #category : 'events' } RSExpandingBoxes >> close: shape [ shape children copy do: #remove. self update ] -{ #category : #initialization } +{ #category : 'initialization' } RSExpandingBoxes >> initialize [ super initialize. canvas := RSCanvas new. @@ -30,7 +32,7 @@ RSExpandingBoxes >> initialize [ border := RSBorder new ] -{ #category : #helpers } +{ #category : 'helpers' } RSExpandingBoxes >> nodeFor: cls [ | com | com := base copy. @@ -41,7 +43,7 @@ RSExpandingBoxes >> nodeFor: cls [ ^ com ] -{ #category : #events } +{ #category : 'events' } RSExpandingBoxes >> open: shape [ | children | children := shape model subclasses @@ -50,7 +52,7 @@ RSExpandingBoxes >> open: shape [ self update ] -{ #category : #events } +{ #category : 'events' } RSExpandingBoxes >> processEvent: evt [ | shape | shape := evt shape. @@ -59,7 +61,7 @@ RSExpandingBoxes >> processEvent: evt [ ifNotEmpty: [ self close: shape ] ] -{ #category : #updating } +{ #category : 'updating' } RSExpandingBoxes >> relayout: shape [ shape propertyAt: #original put: shape encompassingRectangle. @@ -69,7 +71,7 @@ RSExpandingBoxes >> relayout: shape [ shape padding: 10 ] -{ #category : #running } +{ #category : 'running' } RSExpandingBoxes >> run [ canvas add: (self nodeFor: Collection). @@ -77,13 +79,13 @@ RSExpandingBoxes >> run [ canvas open ] -{ #category : #updating } +{ #category : 'updating' } RSExpandingBoxes >> saveCurrent: shape [ shape children do: [ :s | self saveCurrent: s ]. shape propertyAt: #current put: shape encompassingRectangle ] -{ #category : #updating } +{ #category : 'updating' } RSExpandingBoxes >> scale: shape at: t [ | rect1 rect2 | shape children do: [ :s | self scale: s at: t ]. @@ -97,7 +99,7 @@ RSExpandingBoxes >> scale: shape at: t [ shape extent: (rect1 extent interpolateTo: rect2 extent at: t) ] -{ #category : #updating } +{ #category : 'updating' } RSExpandingBoxes >> update [ | first | first := canvas shapes first. @@ -111,7 +113,7 @@ RSExpandingBoxes >> update [ ] ] -{ #category : #updating } +{ #category : 'updating' } RSExpandingBoxes >> zoomCanvans [ canvas zoomToFit canvas camera scale: 1 diff --git a/src/Roassal-Examples/RSGhostDraggable.extension.st b/src/Roassal-Examples/RSGhostDraggable.extension.st index 36746c1f..b70a5bac 100644 --- a/src/Roassal-Examples/RSGhostDraggable.extension.st +++ b/src/Roassal-Examples/RSGhostDraggable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSGhostDraggable } +Extension { #name : 'RSGhostDraggable' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSGhostDraggable class >> example [ | canvas | canvas := self canvasExample. @@ -9,7 +9,7 @@ RSGhostDraggable class >> example [ setLabel: 'Drag and find the ghost' ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSGhostDraggable class >> exampleChangeColor [ | canvas int | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSHighlightable.extension.st b/src/Roassal-Examples/RSHighlightable.extension.st index 897ed257..a93d850d 100644 --- a/src/Roassal-Examples/RSHighlightable.extension.st +++ b/src/Roassal-Examples/RSHighlightable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSHighlightable } +Extension { #name : 'RSHighlightable' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> example [ | canvas | canvas := self canvasExample. @@ -10,7 +10,7 @@ RSHighlightable class >> example [ yourself ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleBorder [ | c shapes interaction | c := RSCanvas new. @@ -32,7 +32,7 @@ RSHighlightable class >> exampleBorder [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleGrid [ | c shapes interaction | c := RSCanvas new. @@ -49,7 +49,7 @@ RSHighlightable class >> exampleGrid [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleGrid2 [ | c shapes interaction | c := RSCanvas new. @@ -66,7 +66,7 @@ RSHighlightable class >> exampleGrid2 [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleInteractive [ | classes c shapes buttonReset selectedShapes highlightable lbl buttonInspect g | @@ -134,7 +134,7 @@ RSHighlightable class >> exampleInteractive [ ^ c openOnce ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleNumbers [ | c shapes lb int | c := RSCanvas new. @@ -156,7 +156,7 @@ RSHighlightable class >> exampleNumbers [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSHighlightable class >> exampleTree [ | c shapes interaction | c := RSCanvas new. diff --git a/src/Roassal-Examples/RSHighlightableExamples.class.st b/src/Roassal-Examples/RSHighlightableExamples.class.st index 1a2940ba..75695bc0 100644 --- a/src/Roassal-Examples/RSHighlightableExamples.class.st +++ b/src/Roassal-Examples/RSHighlightableExamples.class.st @@ -2,12 +2,14 @@ Basic examples about highlighting " Class { - #name : #RSHighlightableExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSHighlightableExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example01Basic [ | canvas shapes color | @@ -35,7 +37,7 @@ RSHighlightableExamples >> example01Basic [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example02ElementEdges [ | canvas shapes interaction color | @@ -65,7 +67,7 @@ RSHighlightableExamples >> example02ElementEdges [ ^ canvas ] -{ #category : #'examples - animated' } +{ #category : 'examples - animated' } RSHighlightableExamples >> example03Interactive [ @@ -102,7 +104,7 @@ RSHighlightableExamples >> example03Interactive [ ^ canvas ] -{ #category : #'examples - animated' } +{ #category : 'examples - animated' } RSHighlightableExamples >> example04Interactive [ @@ -141,7 +143,7 @@ RSHighlightableExamples >> example04Interactive [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example05Border [ | canvas shapes interaction color | @@ -170,7 +172,7 @@ RSHighlightableExamples >> example05Border [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example06IterateNext [ @@ -257,7 +259,7 @@ RSHighlightableExamples >> example06IterateNext [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example07HighlightButtons [ @@ -293,7 +295,7 @@ RSHighlightableExamples >> example07HighlightButtons [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example08DependendMethods [ @@ -302,7 +304,7 @@ RSHighlightableExamples >> example08DependendMethods [ packages := packagesRegExp flatCollect: [ :regExp | RPackageOrganizer default packages select: [ :p | - regExp match: p packageName ] ]. + regExp match: p name ] ]. canvas := RSCanvas new. popup := RSPopup new. @@ -377,7 +379,7 @@ RSHighlightableExamples >> example08DependendMethods [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSHighlightableExamples >> example09ArrowedLines [ | canvas interaction color shapes | @@ -411,7 +413,7 @@ RSHighlightableExamples >> example09ArrowedLines [ ^ canvas ] -{ #category : #elastic } +{ #category : 'elastic' } RSHighlightableExamples >> example10ElasticBox [ @@ -448,7 +450,7 @@ RSHighlightableExamples >> example10ElasticBox [ ^ canvas ] -{ #category : #elastic } +{ #category : 'elastic' } RSHighlightableExamples >> example11ElasticBoxWithCustomDraggable [ @@ -499,7 +501,7 @@ RSHighlightableExamples >> example11ElasticBoxWithCustomDraggable [ ^ canvas ] -{ #category : #elastic } +{ #category : 'elastic' } RSHighlightableExamples >> example12ShowingEdges [ | canvas shapes color interaction cpController| @@ -541,7 +543,7 @@ RSHighlightableExamples >> example12ShowingEdges [ ^ canvas ] -{ #category : #elastic } +{ #category : 'elastic' } RSHighlightableExamples >> example13Click [ diff --git a/src/Roassal-Examples/RSInspectableExample.class.st b/src/Roassal-Examples/RSInspectableExample.class.st index 508d7f62..ccd0d563 100644 --- a/src/Roassal-Examples/RSInspectableExample.class.st +++ b/src/Roassal-Examples/RSInspectableExample.class.st @@ -2,12 +2,14 @@ I have examples of different ways to inspect views an objects in Roassal " Class { - #name : #RSInspectableExample, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSInspectableExample', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #examples } +{ #category : 'examples' } RSInspectableExample >> example01SimpleExample [ | canvas boxes inspectable highligtable | @@ -40,7 +42,7 @@ RSInspectableExample >> example01SimpleExample [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSInspectableExample >> example02Inspect [ @@ -98,13 +100,13 @@ RSInspectableExample >> example02Inspect [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSInspectableExample >> example03Easing [ ^ RSEasingInterpolator bounceOut ] -{ #category : #examples } +{ #category : 'examples' } RSInspectableExample >> example04ChagingContext [ | c context int | diff --git a/src/Roassal-Examples/RSKeepCanvasPositionCanvasInteraction.extension.st b/src/Roassal-Examples/RSKeepCanvasPositionCanvasInteraction.extension.st index 7fc415d4..57d92ba5 100644 --- a/src/Roassal-Examples/RSKeepCanvasPositionCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSKeepCanvasPositionCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSKeepCanvasPositionCanvasInteraction } +Extension { #name : 'RSKeepCanvasPositionCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSKeepCanvasPositionCanvasInteraction class >> example [ | canvas window | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSKeyNavigationCanvasInteraction.extension.st b/src/Roassal-Examples/RSKeyNavigationCanvasInteraction.extension.st index 239ef8bf..ceb75515 100644 --- a/src/Roassal-Examples/RSKeyNavigationCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSKeyNavigationCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSKeyNavigationCanvasInteraction } +Extension { #name : 'RSKeyNavigationCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSKeyNavigationCanvasInteraction class >> example [ | canvas | canvas := self canvasExample. @@ -11,7 +11,7 @@ RSKeyNavigationCanvasInteraction class >> example [ yourself ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSKeyNavigationCanvasInteraction class >> exampleNoHorizontalScroll [ | canvas interaction | canvas := self canvasExample. @@ -24,7 +24,7 @@ RSKeyNavigationCanvasInteraction class >> exampleNoHorizontalScroll [ yourself ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSKeyNavigationCanvasInteraction class >> exampleNoVerticalScroll [ | canvas interaction | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSLabeled.extension.st b/src/Roassal-Examples/RSLabeled.extension.st index f5631443..dcb8adfd 100644 --- a/src/Roassal-Examples/RSLabeled.extension.st +++ b/src/Roassal-Examples/RSLabeled.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSLabeled } +Extension { #name : 'RSLabeled' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLabeled class >> exampleBoxes [ | c shapes | c := RSCanvas new. @@ -22,7 +22,7 @@ RSLabeled class >> exampleBoxes [ ^ c open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLabeled class >> exampleLabeledHighlightable [ | c shapes | c := RSCanvas new. diff --git a/src/Roassal-Examples/RSLayout.extension.st b/src/Roassal-Examples/RSLayout.extension.st index a1dbefb7..3fc56fd5 100644 --- a/src/Roassal-Examples/RSLayout.extension.st +++ b/src/Roassal-Examples/RSLayout.extension.st @@ -1,16 +1,16 @@ -Extension { #name : #RSLayout } +Extension { #name : 'RSLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLayout class >> example1 [ ^ RSGridLayout basicExample ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLayout class >> example2 [ ^ RSTreeLayout basicExample ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLayout class >> example3 [ ^ RSVerticalLineLayout basicExample ] diff --git a/src/Roassal-Examples/RSLayoutExamples.class.st b/src/Roassal-Examples/RSLayoutExamples.class.st index 4c494b10..cea04866 100644 --- a/src/Roassal-Examples/RSLayoutExamples.class.st +++ b/src/Roassal-Examples/RSLayoutExamples.class.st @@ -2,12 +2,14 @@ I use the RSShapeBuilder " Class { - #name : #RSLayoutExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSLayoutExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example01LayoutBasic [ @@ -28,7 +30,7 @@ RSLayoutExamples >> example01LayoutBasic [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example02Grid [ @@ -44,7 +46,7 @@ RSLayoutExamples >> example02Grid [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example03LayoutColorFadingBasic [ @@ -66,7 +68,7 @@ RSLayoutExamples >> example03LayoutColorFadingBasic [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example04LayoutColorFadingBasic2 [ @@ -89,7 +91,7 @@ RSLayoutExamples >> example04LayoutColorFadingBasic2 [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example05LayoutBasicWithColorFading [ | canvas shapes minAndMax color | @@ -112,7 +114,7 @@ RSLayoutExamples >> example05LayoutBasicWithColorFading [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example06TreeLayout [ | c shapes eb | @@ -143,7 +145,7 @@ RSLayoutExamples >> example06TreeLayout [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example07ForceBasedLayout [ | c shapes eb | @@ -178,7 +180,7 @@ RSLayoutExamples >> example07ForceBasedLayout [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example08HorizontalTree [ | c shapes | @@ -214,7 +216,7 @@ RSLayoutExamples >> example08HorizontalTree [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example09BorderAttachPoint [ | c shapes | @@ -233,7 +235,7 @@ RSLayoutExamples >> example09BorderAttachPoint [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example10Locate [ | canvas newshape e1 e2 color | @@ -259,7 +261,7 @@ RSLayoutExamples >> example10Locate [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example11PaddingInComposite [ | canvas shapes | @@ -285,7 +287,7 @@ RSLayoutExamples >> example11PaddingInComposite [ ^ canvas ] -{ #category : #animations } +{ #category : 'animations' } RSLayoutExamples >> example12AnimatedForceBasedLayout [ | c | @@ -299,7 +301,7 @@ RSLayoutExamples >> example12AnimatedForceBasedLayout [ ^ c ] -{ #category : #animations } +{ #category : 'animations' } RSLayoutExamples >> example13VisualizeQuatree [ @@ -362,7 +364,7 @@ RSLayoutExamples >> example13VisualizeQuatree [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example15SimpleClassHierarchy [ | c methods | @@ -398,7 +400,7 @@ RSLayoutExamples >> example15SimpleClassHierarchy [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSLayoutExamples >> example16SimpleClassHierarchy [ | c | @@ -426,7 +428,7 @@ RSLayoutExamples >> example16SimpleClassHierarchy [ ^ c ] -{ #category : #animations } +{ #category : 'animations' } RSLayoutExamples >> example17ForceBasedLayout [ | canvas shapes stepping edges layout | @@ -458,7 +460,7 @@ RSLayoutExamples >> example17ForceBasedLayout [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example18ClusterTree [ | canvas shapes | @@ -506,7 +508,7 @@ RSLayoutExamples >> example18ClusterTree [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example19AutomaticLayoutWhenWindowIsResized [ | classes shapes c eb | @@ -530,7 +532,7 @@ RSLayoutExamples >> example19AutomaticLayoutWhenWindowIsResized [ ^ c @ RSCanvasController @ RSHierarchyPackerInteraction ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example20FlowLayout [ @@ -645,7 +647,7 @@ RSLayoutExamples >> example20FlowLayout [ ^ canvas ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example21TreeLayoutEllipses [ | c shapes eb | @@ -680,7 +682,7 @@ RSLayoutExamples >> example21TreeLayoutEllipses [ ^ c ] -{ #category : #tests } +{ #category : 'tests' } RSLayoutExamples >> example22ClassHierarchies [ @@ -743,7 +745,7 @@ RSLayoutExamples >> example22ClassHierarchies [ @ RSCanvasController ] -{ #category : #tests } +{ #category : 'tests' } RSLayoutExamples >> example23RoassalCommitsWithTimeGaps [ @@ -840,7 +842,7 @@ RSLayoutExamples >> example23RoassalCommitsWithTimeGaps [ @ RSCanvasController ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example24SmartHorizontalTree [ | c shapes | @@ -877,7 +879,7 @@ RSLayoutExamples >> example24SmartHorizontalTree [ ^ c ] -{ #category : #layouts } +{ #category : 'layouts' } RSLayoutExamples >> example25SortBlock [ | c shapes | diff --git a/src/Roassal-Examples/RSLine.extension.st b/src/Roassal-Examples/RSLine.extension.st index e3ee6827..25cda5ab 100644 --- a/src/Roassal-Examples/RSLine.extension.st +++ b/src/Roassal-Examples/RSLine.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSLine } +Extension { #name : 'RSLine' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLine class >> exampleFMT [ | line | line := self new. @@ -16,7 +16,7 @@ RSLine class >> exampleFMT [ open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSLine class >> exampleLine [ | line | line := self new. diff --git a/src/Roassal-Examples/RSMenuActivable.extension.st b/src/Roassal-Examples/RSMenuActivable.extension.st index 61650753..53cc66c7 100644 --- a/src/Roassal-Examples/RSMenuActivable.extension.st +++ b/src/Roassal-Examples/RSMenuActivable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSMenuActivable } +Extension { #name : 'RSMenuActivable' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSMenuActivable class >> example [ | m | diff --git a/src/Roassal-Examples/RSPolyline.extension.st b/src/Roassal-Examples/RSPolyline.extension.st index 285a015d..471b5697 100644 --- a/src/Roassal-Examples/RSPolyline.extension.st +++ b/src/Roassal-Examples/RSPolyline.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSPolyline } +Extension { #name : 'RSPolyline' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSPolyline class >> exampleArrowedPolyline [ | line | line := self new. @@ -12,7 +12,7 @@ RSPolyline class >> exampleArrowedPolyline [ open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSPolyline class >> examplePolyline [ | line | line := self new. diff --git a/src/Roassal-Examples/RSRenderTreeExamples.class.st b/src/Roassal-Examples/RSRenderTreeExamples.class.st index 61f9664a..ea7413c6 100644 --- a/src/Roassal-Examples/RSRenderTreeExamples.class.st +++ b/src/Roassal-Examples/RSRenderTreeExamples.class.st @@ -3,12 +3,14 @@ This class is used to customize the render collection of roassal check RSAbstractRenderCollection " Class { - #name : #RSRenderTreeExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSRenderTreeExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #lines } +{ #category : 'lines' } RSRenderTreeExamples >> example01BigVisualization131k [ @@ -33,7 +35,7 @@ RSRenderTreeExamples >> example01BigVisualization131k [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSRenderTreeExamples >> example02BigVisualizationHalfMillion [ @@ -58,7 +60,7 @@ RSRenderTreeExamples >> example02BigVisualizationHalfMillion [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSRenderTreeExamples >> example03RTree [ diff --git a/src/Roassal-Examples/RSSVGPathLine.extension.st b/src/Roassal-Examples/RSSVGPathLine.extension.st index a71db92c..9621da2f 100644 --- a/src/Roassal-Examples/RSSVGPathLine.extension.st +++ b/src/Roassal-Examples/RSSVGPathLine.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSSVGPathLine } +Extension { #name : 'RSSVGPathLine' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSSVGPathLine class >> exampleArc [ | canvas line | canvas := RSCanvas new. diff --git a/src/Roassal-Examples/RSScrollBarsCanvasInteraction.extension.st b/src/Roassal-Examples/RSScrollBarsCanvasInteraction.extension.st index f1ed4c2e..18963b43 100644 --- a/src/Roassal-Examples/RSScrollBarsCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSScrollBarsCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSScrollBarsCanvasInteraction } +Extension { #name : 'RSScrollBarsCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSScrollBarsCanvasInteraction class >> example [ | canvas | canvas := self canvasExample. @@ -10,7 +10,7 @@ RSScrollBarsCanvasInteraction class >> example [ ^ canvas open ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSScrollBarsCanvasInteraction class >> exampleOriginTopLeft [ | canvas | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSScrollWheelCanvasInteraction.extension.st b/src/Roassal-Examples/RSScrollWheelCanvasInteraction.extension.st index b6d24b10..1a73ca01 100644 --- a/src/Roassal-Examples/RSScrollWheelCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSScrollWheelCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSScrollWheelCanvasInteraction } +Extension { #name : 'RSScrollWheelCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSScrollWheelCanvasInteraction class >> example [ | canvas | diff --git a/src/Roassal-Examples/RSSearchInCanvasInteraction.extension.st b/src/Roassal-Examples/RSSearchInCanvasInteraction.extension.st index d6250d51..46bb1295 100644 --- a/src/Roassal-Examples/RSSearchInCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSSearchInCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSSearchInCanvasInteraction } +Extension { #name : 'RSSearchInCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSSearchInCanvasInteraction class >> exampleCollection [ | c shapes lb | c := RSCanvas new. @@ -19,7 +19,7 @@ RSSearchInCanvasInteraction class >> exampleCollection [ yourself ] -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSSearchInCanvasInteraction class >> exampleCollection2 [ | c classes g elements high con | diff --git a/src/Roassal-Examples/RSSelfLoopCPController.extension.st b/src/Roassal-Examples/RSSelfLoopCPController.extension.st index f3dff2dc..e6ae6e15 100644 --- a/src/Roassal-Examples/RSSelfLoopCPController.extension.st +++ b/src/Roassal-Examples/RSSelfLoopCPController.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSSelfLoopCPController } +Extension { #name : 'RSSelfLoopCPController' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSSelfLoopCPController class >> example [ | canvas links models arrow | canvas := RSCanvas new. diff --git a/src/Roassal-Examples/RSShapeExamples.class.st b/src/Roassal-Examples/RSShapeExamples.class.st index 60eb22d2..a1db4bb0 100644 --- a/src/Roassal-Examples/RSShapeExamples.class.st +++ b/src/Roassal-Examples/RSShapeExamples.class.st @@ -2,12 +2,14 @@ I use the RSShapeBuilder " Class { - #name : #RSShapeExamples, - #superclass : #RSAbstractExamples, - #category : #'Roassal-Examples-Basic' + #name : 'RSShapeExamples', + #superclass : 'RSAbstractExamples', + #category : 'Roassal-Examples-Basic', + #package : 'Roassal-Examples', + #tag : 'Basic' } -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example01BasicShape [ @@ -27,7 +29,7 @@ RSShapeExamples >> example01BasicShape [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example02BasicEdge [ @@ -55,7 +57,7 @@ RSShapeExamples >> example02BasicEdge [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example04LineDashes [ @@ -80,7 +82,7 @@ RSShapeExamples >> example04LineDashes [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example05CapStyles [ @@ -113,7 +115,7 @@ RSShapeExamples >> example05CapStyles [ ^ canvas ] -{ #category : #normalizer } +{ #category : 'normalizer' } RSShapeExamples >> example07NormalizeColor [ @@ -148,7 +150,7 @@ RSShapeExamples >> example07NormalizeColor [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example08Labels [ | canvas shapes random | @@ -176,7 +178,7 @@ RSShapeExamples >> example08Labels [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example09Polyline [ | canvas box box1 line box2 | @@ -204,7 +206,7 @@ RSShapeExamples >> example09Polyline [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example10Donut [ | data radius color canvas border | @@ -233,7 +235,7 @@ RSShapeExamples >> example10Donut [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example11ClassTree [ | canvas shapes | @@ -276,7 +278,7 @@ RSShapeExamples >> example11ClassTree [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example12Polygons [ | canvas color border | @@ -306,7 +308,7 @@ RSShapeExamples >> example12Polygons [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example13Arrow [ | canvas polygon labels paint | @@ -347,7 +349,7 @@ RSShapeExamples >> example13Arrow [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example14Marker [ | canvas shapes line arrow | @@ -379,7 +381,7 @@ RSShapeExamples >> example14Marker [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example16Bezier [ | canvas box1 box2 line | @@ -416,7 +418,7 @@ RSShapeExamples >> example16Bezier [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example17Labeled [ | canvas e1 e2 s line label | @@ -447,7 +449,7 @@ RSShapeExamples >> example17Labeled [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example19Bitmap [ @@ -470,7 +472,7 @@ RSShapeExamples >> example19Bitmap [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example20Highlightable [ | canvas shapes labeled | @@ -491,7 +493,7 @@ RSShapeExamples >> example20Highlightable [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example21MenuActivableOnElement [ | canvas boxes | @@ -516,7 +518,7 @@ RSShapeExamples >> example21MenuActivableOnElement [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example22ScaleEvents [ "Zooming preserve the size of the red arrow" @@ -556,7 +558,7 @@ RSShapeExamples >> example22ScaleEvents [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example24Highlightable [ | canvas shapes interaction | @@ -588,7 +590,7 @@ RSShapeExamples >> example24Highlightable [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example26AnimatedPopup [ | canvas interaction s box | @@ -615,7 +617,7 @@ RSShapeExamples >> example26AnimatedPopup [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example27MultilineLabelBasic [ @@ -644,7 +646,7 @@ qui s''alimentent de ta lumière"'. ^ canvas zoomToFit ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example28MultilineLabel [ @@ -680,7 +682,7 @@ RSShapeExamples >> example28MultilineLabel [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example29AntAnimation [ > example29AntAnimation [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example30EdgesToChildren [ @@ -777,7 +779,7 @@ RSShapeExamples >> example30EdgesToChildren [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example31BasicGrapher [ | classes canvas line shapes color | @@ -819,7 +821,7 @@ RSShapeExamples >> example31BasicGrapher [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example32RSLabeledOnComposite [ | canvas shapes labeled | @@ -853,7 +855,7 @@ RSShapeExamples >> example32RSLabeledOnComposite [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example33ColorScaling [ | c classes scale numberOfMethods | @@ -881,7 +883,7 @@ RSShapeExamples >> example33ColorScaling [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example34MorphicPopup [ | c | @@ -898,7 +900,7 @@ RSShapeExamples >> example34MorphicPopup [ ^ c ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example35Lines [ | c circle box dragMeLabel | @@ -941,7 +943,7 @@ RSShapeExamples >> example35Lines [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example36ShapePosition [ @@ -984,7 +986,7 @@ RSShapeExamples >> example36ShapePosition [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example37PunchCard [ | card | @@ -996,7 +998,7 @@ RSShapeExamples >> example37PunchCard [ ^ card build ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example38Transformable [ | c | @@ -1049,7 +1051,7 @@ RSShapeExamples >> example38Transformable [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example39RoassalPackages [ @@ -1087,7 +1089,7 @@ RSShapeExamples >> example39RoassalPackages [ ^ canvas ] -{ #category : #lines } +{ #category : 'lines' } RSShapeExamples >> example40LabelingLine [ @@ -1123,7 +1125,7 @@ RSShapeExamples >> example40LabelingLine [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example41Butterfly [ @@ -1195,7 +1197,7 @@ RSShapeExamples >> example41Butterfly [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example42DirectedBezier [ | c shapes | @@ -1222,7 +1224,7 @@ RSShapeExamples >> example42DirectedBezier [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example43KeepLabelSize [ @@ -1249,7 +1251,7 @@ RSShapeExamples >> example43KeepLabelSize [ ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example44Donna [ | text canvas horizontal vertical groups count | @@ -1326,7 +1328,7 @@ E di pensier ^ canvas ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example45CompositeDragResize [ | c nodes | @@ -1351,7 +1353,7 @@ RSShapeExamples >> example45CompositeDragResize [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example46Popups [ | c shapes color | @@ -1386,7 +1388,7 @@ RSShapeExamples >> example46Popups [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example47CompositeClipChildren [ @@ -1431,7 +1433,7 @@ RSShapeExamples >> example47CompositeClipChildren [ ^ c ] -{ #category : #shapes } +{ #category : 'shapes' } RSShapeExamples >> example48GhostDraggable [ @@ -1455,7 +1457,7 @@ RSShapeExamples >> example48GhostDraggable [ ^ c @ RSCanvasController simple ] -{ #category : #accessing } +{ #category : 'accessing' } RSShapeExamples >> order [ ^ 20 ] diff --git a/src/Roassal-Examples/RSVerticalCellLayout.extension.st b/src/Roassal-Examples/RSVerticalCellLayout.extension.st index 2f01d64f..2b85610e 100644 --- a/src/Roassal-Examples/RSVerticalCellLayout.extension.st +++ b/src/Roassal-Examples/RSVerticalCellLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSVerticalCellLayout } +Extension { #name : 'RSVerticalCellLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSVerticalCellLayout class >> example1 [ | c shapes | c := RSCanvas new. diff --git a/src/Roassal-Examples/RSWeightedCircleLayout.extension.st b/src/Roassal-Examples/RSWeightedCircleLayout.extension.st index 50cba3ac..98b3e0b4 100644 --- a/src/Roassal-Examples/RSWeightedCircleLayout.extension.st +++ b/src/Roassal-Examples/RSWeightedCircleLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSWeightedCircleLayout } +Extension { #name : 'RSWeightedCircleLayout' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSWeightedCircleLayout class >> example1 [ | v elements | v := RSCanvas new. diff --git a/src/Roassal-Examples/RSZoomLevelText.extension.st b/src/Roassal-Examples/RSZoomLevelText.extension.st index b87436b8..40099d18 100644 --- a/src/Roassal-Examples/RSZoomLevelText.extension.st +++ b/src/Roassal-Examples/RSZoomLevelText.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSZoomLevelText } +Extension { #name : 'RSZoomLevelText' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSZoomLevelText class >> exampleSimpleUML [ | builder | builder := RSUMLClassBuilder new. diff --git a/src/Roassal-Examples/RSZoomToFitCanvasInteraction.extension.st b/src/Roassal-Examples/RSZoomToFitCanvasInteraction.extension.st index 48230e3d..27f17beb 100644 --- a/src/Roassal-Examples/RSZoomToFitCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSZoomToFitCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSZoomToFitCanvasInteraction } +Extension { #name : 'RSZoomToFitCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSZoomToFitCanvasInteraction class >> example [ | canvas interaction | canvas := self canvasExample. diff --git a/src/Roassal-Examples/RSZoomableCanvasInteraction.extension.st b/src/Roassal-Examples/RSZoomableCanvasInteraction.extension.st index 0479aad5..376ea101 100644 --- a/src/Roassal-Examples/RSZoomableCanvasInteraction.extension.st +++ b/src/Roassal-Examples/RSZoomableCanvasInteraction.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSZoomableCanvasInteraction } +Extension { #name : 'RSZoomableCanvasInteraction' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } RSZoomableCanvasInteraction class >> example [ | canvas | canvas := self canvasExample. diff --git a/src/Roassal-Examples/String.extension.st b/src/Roassal-Examples/String.extension.st index d608fbfe..a20a5ca0 100644 --- a/src/Roassal-Examples/String.extension.st +++ b/src/Roassal-Examples/String.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #String } +Extension { #name : 'String' } -{ #category : #'*Roassal-Examples' } +{ #category : '*Roassal-Examples' } String >> cutCamelCase [ "Breaks apart words written in camel case. diff --git a/src/Roassal-Examples/package.st b/src/Roassal-Examples/package.st index 75e586fa..b64321db 100644 --- a/src/Roassal-Examples/package.st +++ b/src/Roassal-Examples/package.st @@ -1 +1 @@ -Package { #name : #'Roassal-Examples' } +Package { #name : 'Roassal-Examples' } diff --git a/src/Roassal-SVG-Examples/RSAnimationExamples.extension.st b/src/Roassal-SVG-Examples/RSAnimationExamples.extension.st index 624d1063..3fa609b6 100644 --- a/src/Roassal-SVG-Examples/RSAnimationExamples.extension.st +++ b/src/Roassal-SVG-Examples/RSAnimationExamples.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSAnimationExamples } +Extension { #name : 'RSAnimationExamples' } -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSAnimationExamples >> example04Phyco [ diff --git a/src/Roassal-SVG-Examples/RSBasicShapeExamples.extension.st b/src/Roassal-SVG-Examples/RSBasicShapeExamples.extension.st index a05aca0b..6b519e41 100644 --- a/src/Roassal-SVG-Examples/RSBasicShapeExamples.extension.st +++ b/src/Roassal-SVG-Examples/RSBasicShapeExamples.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSBasicShapeExamples } +Extension { #name : 'RSBasicShapeExamples' } -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSBasicShapeExamples >> example16BasicLinePath [ diff --git a/src/Roassal-SVG-Examples/RSChartExample.extension.st b/src/Roassal-SVG-Examples/RSChartExample.extension.st index 20a02004..1e28b97a 100644 --- a/src/Roassal-SVG-Examples/RSChartExample.extension.st +++ b/src/Roassal-SVG-Examples/RSChartExample.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSChartExample } +Extension { #name : 'RSChartExample' } -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example13AreaPlot [ | x y1 y2 p canvas charts | @@ -24,7 +24,7 @@ RSChartExample >> example13AreaPlot [ ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example14AreaPlotWithError [ | x y polyfit res y_est y_err c scatter | @@ -55,7 +55,7 @@ RSChartExample >> example14AreaPlotWithError [ ^ c ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example15AreaBox [ | x y1 y2 c | @@ -73,7 +73,7 @@ RSChartExample >> example15AreaBox [ ^ c ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example16Series [ | x cumsum c b y error | @@ -108,7 +108,7 @@ RSChartExample >> example16Series [ ^ c canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example17CLPvsUSD [ | dates y data x c plot paint horizontal | @@ -166,7 +166,7 @@ RSChartExample >> example17CLPvsUSD [ ^ c ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSChartExample >> example18Animation [ diff --git a/src/Roassal-SVG-Examples/RSLayoutExamples.extension.st b/src/Roassal-SVG-Examples/RSLayoutExamples.extension.st index b604019f..d9803154 100644 --- a/src/Roassal-SVG-Examples/RSLayoutExamples.extension.st +++ b/src/Roassal-SVG-Examples/RSLayoutExamples.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSLayoutExamples } +Extension { #name : 'RSLayoutExamples' } -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSLayoutExamples >> example14ClassHierarchy [ | c classes | diff --git a/src/Roassal-SVG-Examples/RSSVGAnimationExamples.class.st b/src/Roassal-SVG-Examples/RSSVGAnimationExamples.class.st index d977933e..03f901f9 100644 --- a/src/Roassal-SVG-Examples/RSSVGAnimationExamples.class.st +++ b/src/Roassal-SVG-Examples/RSSVGAnimationExamples.class.st @@ -2,17 +2,18 @@ I have animated svg examples " Class { - #name : #RSSVGAnimationExamples, - #superclass : #RSAnimationExamples, - #category : #'Roassal-SVG-Examples' + #name : 'RSSVGAnimationExamples', + #superclass : 'RSAnimationExamples', + #category : 'Roassal-SVG-Examples', + #package : 'Roassal-SVG-Examples' } -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGAnimationExamples >> america [ ^ 'M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z' ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example01SVGIcons [ @@ -65,7 +66,7 @@ RSSVGAnimationExamples >> example01SVGIcons [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example02Miku [ | random canvas lines easing | @@ -109,7 +110,7 @@ RSSVGAnimationExamples >> example02Miku [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example03Boat [ | canvas perlin frame scale lines boat x pharo g updateLines | @@ -205,7 +206,7 @@ RSSVGAnimationExamples >> example03Boat [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example04RoassalIcon [ @@ -262,7 +263,7 @@ RSSVGAnimationExamples >> example04RoassalIcon [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example05Corona [ | canvas extent mainScale curveScale yscale color axis title ytitle xtitle lineTitle line curve normalY spoint | @@ -356,7 +357,7 @@ RSSVGAnimationExamples >> example05Corona [ ^ canvas ] -{ #category : #examples } +{ #category : 'examples' } RSSVGAnimationExamples >> example06AnimatedSVG [ @@ -384,7 +385,7 @@ RSSVGAnimationExamples >> example06AnimatedSVG [ ^ c ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGAnimationExamples >> miku [ ^ 'm 148.25647,236.39122 -3.89508,14.84999 -14.11966,51.12292 -10.10286,26.9004 -15.70204,33.35162 -14.849996,32.37785 -10.589748,26.90039 -6.207783,20.20573 -5.477456,18.25819 -3.408195,26.77867 0.365164,20.69261 2.556146,18.62335 6.329504,21.42294 1.095491,-13.38934 2.434425,-21.7881 3.89508,-24.34425 7.546717,-21.1795 5.477456,19.84057 7.303275,27.63072 11.92868,23.97908 17.04097,22.8836 9.61598,9.25081 5.84262,-16.43237 6.81639,-24.1008 3.28648,-15.21516 2.3127,-20.57089 2.55615,-15.70204 0.48688,-21.7881 0.60861,-26.90039 3.85187,-84.73722 3.09851,-18.41896 3.09852,-17.73041 7.57415,23.58316 2.23782,-5.85275 8.95127,-21.51748 5.1642,-11.18909 6.71345,27.54237 8.60699,21.34534 3.27066,-26.85381 4.13136,15.83686 4.64777,18.24682 6.88559,16.86971 4.64778,5.33633 -0.17214,-11.87765 0.34428,-15.49258 228.94597,2.23782 2.06568,14.45974 0.8607,18.5911 1.03284,24.616 0.51642,34.08369 0.17214,32.53443 1.54926,22.55031 5.33633,26.3374 2.92638,17.38612 8.43485,32.70657 4.13136,-2.23782 17.55826,-19.62394 15.83687,-20.3125 12.22192,-17.7304 12.22193,-21.34534 9.12341,-22.72246 7.74629,-25.64883 5.68062,17.7304 8.09057,30.12447 4.81992,22.20604 2.40995,18.93538 0.51642,9.29555 2.75424,-7.22987 4.13136,-14.80403 2.58209,-14.80403 -0.86069,-19.10752 -2.75424,-16.52542 -3.4428,-16.18114 -4.99205,-13.25477 -8.26272,-17.55826 -6.19703,-12.73835 -10.84481,-20.82892 -14.63188,-25.4767 -9.4677,-19.96822 -7.05773,-16.35328 -6.36917,-14.97617 -3.95922,-11.18908 -21.87474,-45.37302 -14.3631,-37.73359 -37.73359,15.33688 0.73033,17.28442 -4.86885,6.08606 -0.24344,-23.12704 -60.86062,13.63278 -74.4934,10.22459 -67.92046,-2.19099 -54.77455,-7.30327 z #299ca3 @@ -619,17 +620,17 @@ m 466.15466,362.01006 c 3.19923,26.33245 3.71863,64.39733 2.7468,78.73861 -2.797 ' ] -{ #category : #accessing } +{ #category : 'accessing' } RSSVGAnimationExamples >> order [ ^ 1001 ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGAnimationExamples >> puzzlePiece [ ^ 'M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z' ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGAnimationExamples >> supermarketCart [ ^ 'M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z' ] diff --git a/src/Roassal-SVG-Examples/RSSVGShapeExamples.class.st b/src/Roassal-SVG-Examples/RSSVGShapeExamples.class.st index aef87c05..f6bae678 100644 --- a/src/Roassal-SVG-Examples/RSSVGShapeExamples.class.st +++ b/src/Roassal-SVG-Examples/RSSVGShapeExamples.class.st @@ -2,12 +2,13 @@ I have basic svg examples " Class { - #name : #RSSVGShapeExamples, - #superclass : #RSShapeExamples, - #category : #'Roassal-SVG-Examples' + #name : 'RSSVGShapeExamples', + #superclass : 'RSShapeExamples', + #category : 'Roassal-SVG-Examples', + #package : 'Roassal-SVG-Examples' } -{ #category : #examples } +{ #category : 'examples' } RSSVGShapeExamples >> example01SVGShape [ | c | @@ -37,7 +38,7 @@ RSSVGShapeExamples >> example01SVGShape [ ^ c ] -{ #category : #examples } +{ #category : 'examples' } RSSVGShapeExamples >> example02SpockLizard [ | canvas radius paint arrow relations color lb | @@ -138,27 +139,27 @@ RSSVGShapeExamples >> example02SpockLizard [ ^ canvas ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGShapeExamples >> lizard [ ^ 'M560.8,71.3c19.5,0,38,4.5,55.5,13.4c17.5,8.9,32.1,21.2,43.5,36.8l273.7,373.7c37.6,50.7,56.5,108,56.5,171.8v169.9c0,25.5-8.9,47.2-26.8,65.1s-39.6,26.8-65.1,26.8H714.4c-25.5,0-47.2-8.9-65.1-26.8s-26.8-39.6-26.8-65.1v-84.7l-136.9-68.4H224.4c-25.5,0-47.2-8.9-65.1-26.8c-17.9-17.9-26.8-39.6-26.8-65.1v-15.3c0-38,13.5-70.4,40.4-97.4c27-27,59.4-40.4,97.4-40.4h201l20.1-61.3H163.1c-31.9,0-59.6-10.8-83-32.3c-23.4-21.5-36.4-48.1-39-79.7C20.4,240.3,10,211.3,10,178.4v-15.3c0-25.5,8.9-47.2,26.8-65.1c17.9-17.9,39.6-26.8,65.1-26.8H560.8L560.8,71.3z M928.8,836.9V667c0-50.1-14.8-95.4-44.5-135.9L610.1,157.4c-12.4-16.6-28.9-24.9-49.3-24.9H101.9c-8.3,0-15.5,3-21.5,9.1c-6.1,6.1-9.1,13.2-9.1,21.5c0,10.2,0.2,18.1,0.7,23.7c0.5,5.6,2,12,4.5,19.4s6.5,14.2,12,20.6c3.2-9.9,8.9-17.9,17-23.9s17.1-9.1,27-9.1h398.1v15.3H132.5c-8.3,0-15.5,3-21.5,9.1c-6.1,6.1-9.1,13.2-9.1,21.5c0,14,0.5,23.3,1.4,27.8c2.6,14,9.6,25.7,21.1,34.9c11.5,9.3,24.4,13.9,38.8,13.9h349.8c12.8,0,23.6,4.5,32.5,13.4c8.9,8.9,13.4,19.8,13.4,32.5c0,4.8-0.8,9.6-2.4,14.4l-30.6,91.9c-3.2,9.3-8.8,16.8-16.7,22.7c-8,5.9-16.9,8.9-26.8,8.9h-212c-21.1,0-39.1,7.5-54.1,22.5c-15,15-22.5,33-22.5,54.1v15.3c0,8.3,3,15.5,9.1,21.5c6.1,6.1,13.2,9.1,21.5,9.1h268.4c5.1,0,9.7,1.1,13.9,3.3l151.7,75.6c7.7,4.1,13.8,9.9,18.4,17.2c4.6,7.3,6.9,15.3,6.9,23.9v94.3c0,8.3,3,15.5,9.1,21.5c6.1,6.1,13.2,9.1,21.5,9.1h183.8c8.3,0,15.5-3,21.5-9.1C925.7,852.3,928.8,845.2,928.8,836.9L928.8,836.9z' ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGShapeExamples >> paper [ ^ 'M535.1,80.1c-16.8,0-31.2,6-43.2,18.1c-12,12-18.1,26.4-18.1,43.2v358.8h-17.5V211.3c0-16.8-6-31.2-18.1-43.2c-12-12-26.4-18.1-43.2-18.1c-16.8,0-31.1,6-43.2,18.1c-12,12-18.1,26.4-18.1,43.2v428.8l-84.2-112.1c-13.9-18.6-32.5-27.9-55.8-27.9c-19.3,0-35.8,6.8-49.5,20.5c-13.7,13.7-20.5,30.2-20.5,49.5c0,15.7,4.7,29.7,14.2,42.1l210,280c13.9,18.6,32.5,27.9,55.8,27.9h376.3c12.4,0,23.5-4,33.4-12c9.8-8,16.1-18.2,18.6-30.7l41.6-221.5c1.8-11.7,2.7-22.4,2.7-32.3V351.3c0-16.8-6-31.2-18.1-43.2c-12-12-26.4-18.1-43.2-18.1c-16.8,0-31.1,6-43.2,18.1c-12,12-18.1,26.4-18.1,43.2V500h-17.5V211.3c0-16.8-6-31.1-18.1-43.2c-12-12-26.4-18.1-43.2-18.1c-16.8,0-31.1,6-43.2,18.1c-12,12-18.1,26.4-18.1,43.2V500h-17.5V141.2c0-16.8-6-31.1-18.1-43.2C566.3,86,551.9,80,535.1,80.1L535.1,80.1z M535.1,10.1c24.8,0,47.6,6.5,68.6,19.4c21,12.9,37.1,30.5,48.4,52.8c6.9-1.4,14.6-2.2,23-2.2c36.1,0,67,12.9,92.7,38.6c25.7,25.7,38.6,56.6,38.6,92.7v9.3c38.3-2.2,71.2,9.5,98.7,35c27.5,25.5,41.3,57.4,41.3,95.7v272.4c0,14.6-1.4,29.7-4.3,45.4L900.3,890c-5.1,28.8-19,52.7-41.9,71.6c-22.8,18.9-49,28.4-78.5,28.4H403.8c-21.9,0-42.8-5-62.6-15.1c-19.9-10-36.4-23.6-49.5-40.7l-210-280C63,629.4,53.8,601.4,53.8,570c0-38.6,13.7-71.6,41-99c27.3-27.3,60.3-41,99-41c28.4,0,51.8,6.2,70,18.6V211.3c0-36.1,12.9-67,38.6-92.7C328,92.9,358.9,80,395,80c8.4,0,16.1,0.7,23,2.2c11.3-22.3,27.4-39.9,48.4-52.8c21-12.9,43.8-19.4,68.6-19.4L535.1,10.1z' ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGShapeExamples >> rock [ ^ 'M408.864 79.052c-22.401-33.898-66.108-42.273-98.813-23.588-29.474-31.469-79.145-31.093-108.334-.022-47.16-27.02-108.71 5.055-110.671 60.806C44.846 105.407 0 140.001 0 187.429v56.953c0 32.741 14.28 63.954 39.18 85.634l97.71 85.081c4.252 3.702 3.11 5.573 3.11 32.903 0 17.673 14.327 32 32 32h252c17.673 0 32-14.327 32-32 0-23.513-1.015-30.745 3.982-42.37l42.835-99.656c6.094-14.177 9.183-29.172 9.183-44.568V146.963c0-52.839-54.314-88.662-103.136-67.911zM464 261.406a64.505 64.505 0 0 1-5.282 25.613l-42.835 99.655c-5.23 12.171-7.883 25.04-7.883 38.25V432H188v-10.286c0-16.37-7.14-31.977-19.59-42.817l-97.71-85.08C56.274 281.255 48 263.236 48 244.381v-56.953c0-33.208 52-33.537 52 .677v41.228a16 16 0 0 0 5.493 12.067l7 6.095A16 16 0 0 0 139 235.429V118.857c0-33.097 52-33.725 52 .677v26.751c0 8.836 7.164 16 16 16h7c8.836 0 16-7.164 16-16v-41.143c0-33.134 52-33.675 52 .677v40.466c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16v-27.429c0-33.03 52-33.78 52 .677v26.751c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16 0-33.146 52-33.613 52 .677v114.445z' ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGShapeExamples >> scissors [ ^ 'M596.9,920h-96.8c-59.4,0-100.6-25.7-123.6-77.1c-8.4-17.9-12.6-36.5-12.6-55.8v-2.7c-22.6-10.9-40.6-27-53.9-48.4c-13.3-21.3-20-44.6-19.9-69.7c0-13.9,0.9-22.6,2.7-26.3H150c-38.6,0-71.6-13.7-99-41c-27.3-27.3-41-60.3-41-99c0-38.6,13.7-71.6,41-99s60.3-41,99-41h61.8l-24.1-9.3c-27-10.2-48.8-27.3-65.4-51.1c-16.6-23.8-24.9-50.4-24.9-79.6c0-38.6,13.7-71.6,41-99s60.3-41,99-41c16.8,0,33.3,3.1,49.8,9.3L630.7,220H850c38.6,0,71.6,13.7,99,41c27.3,27.3,41,60.3,41,99v365.3c0,32.1-9.8,60.8-29.5,86.1c-19.7,25.3-45.2,41.8-76.6,49.5l-185.4,46.5C665,915.8,631.1,920,596.9,920L596.9,920z M570.1,531.2L485.3,570l-89.1,40.5c-10.9,5.1-19.7,12.6-26.3,22.7c-6.6,10-9.9,21.1-9.9,33.1c0,16.8,6,31.1,18.1,43.2c12,12,26.4,18.1,43.2,18.1c9.5,0,17.8-1.8,25.1-5.5l184.9-84.2c-17.9-3.6-32.5-12.8-44-27.4c-11.5-14.6-17.2-31-17.2-49.2V531.2L570.1,531.2z M745.1,701.3c0-16.8-6-31.1-18.1-43.2c-12-12-26.4-18.1-43.2-18.1c-9.5,0-17.9,1.8-25.1,5.5l-158.6,72.2c-10.2,4.8-17,7.9-20.2,9.3c-3.3,1.4-8.8,4.6-16.7,9.3c-7.8,4.8-13.2,9.1-16.1,12.9c-2.9,3.8-5.8,9.1-8.7,15.9c-2.9,6.8-4.4,14.1-4.3,22.1c0,18.2,5.7,33.2,17.2,44.9c11.5,11.7,26.3,17.5,44.6,17.5c7.3,0,14.2-1.6,20.8-4.9l192.5-87.5c10.9-5.1,19.7-12.6,26.3-22.7c6.6-10,9.9-21.1,9.9-33.1L745.1,701.3z M618.2,290L262.8,154.4c-8.7-2.9-17.1-4.3-25.1-4.3c-19.3,0-35.8,6.8-49.5,20.5s-20.5,30.2-20.5,49.5c0,14.6,4.1,27.9,12.3,39.9s19.1,20.6,32.5,25.7l287.6,109.4v35h-350c-19.3,0-35.8,6.8-49.5,20.5c-13.7,13.7-20.5,30.2-20.5,49.5s6.8,35.8,20.5,49.5c13.7,13.7,30.2,20.5,49.5,20.5h292.6l127.4-58V403.8c0-23,8.4-42.3,25.1-58l60.7-55.8L618.2,290L618.2,290z M596.9,850c29.9,0,58.2-3.5,84.8-10.4L867,793.2c15.7-4,28.4-12.3,38.3-24.9c9.8-12.6,14.8-26.9,14.8-42.9V360.1c0-19.3-6.8-35.8-20.5-49.5c-13.7-13.7-30.2-20.5-49.5-20.5H681.7L607.3,359c-13.1,12-19.7,27-19.7,44.9v161.9c0,16.8,6,30.8,18.1,42.1c12,11.3,26.4,17,43.2,16.9c16.8,0,31.1-6.4,43.2-19.1c12-12.7,18.1-27.5,18.1-44.3V447.6h17.5v113.8c0,25.5-10.4,46.3-31.1,62.4c18.9,2.9,34.7,11.7,47.3,26.5c12.6,14.8,18.9,31.8,18.9,51.1c0,15.3-4.2,29.5-12.6,42.6c-8.4,13.1-19.5,22.8-33.4,29l-169.5,77.1H597L596.9,850z' ] -{ #category : #'data - svg' } +{ #category : 'data - svg' } RSSVGShapeExamples >> spock [ ^ 'M426.6,107.9c-16.3,0-29.9,5.8-40.6,17.4c-10.7,11.6-16.1,25.5-16.1,41.9c0,4.7,0.5,9.5,1.5,14.3L448,500h-13.3l-59.2-246.1c-3-12.9-9.8-23.5-20.2-31.6c-10.4-8.1-22.2-12.2-35.5-12.2c-16,0-29.4,5.8-40.3,17.4c-10.9,11.6-16.3,25.4-16.3,41.4c0,3.7,0.7,8.7,2,14.8c1,4.4,7.6,31.8,19.9,82.2c12.3,50.4,23.9,98.3,34.7,143.9c10.8,45.6,16.3,69.1,16.3,70.4v115.9L179.5,578.7c-11.6-8.8-24.7-13.3-39.3-13.3c-17.7,0-32.9,6.2-45.7,18.6c-12.8,12.4-19.1,27.5-19.1,45.2c0,22.8,9.5,41.5,28.6,56.1l258.8,193.5c11.6,8.8,24.5,13.3,38.8,13.3h354.3c11.2,0,21.3-3.5,30.1-10.5c8.8-7,14.6-15.9,17.4-26.8l51-204.7c2.7-10.2,4.4-25.2,5.1-45c0.7-19.8,2.2-34.4,4.6-43.9l59.2-244c1-4.1,1.5-8.5,1.5-13.3c0-15.6-5.6-29.1-16.9-40.3c-11.2-11.2-24.9-16.9-40.8-16.9c-12.9,0-24.7,4.3-35.2,13c-10.5,8.7-17.3,19.3-20.4,31.9L761,500h-13.3l67.4-279.2c1-4.7,1.5-9.5,1.5-14.3c0-16-5.4-29.6-16.3-40.8c-10.9-11.2-24.5-16.9-40.8-16.9c-12.9,0-24.6,4.1-35,12.2c-10.4,8.1-17.1,18.7-20.2,31.6l-74,307.3h-64.8l-83.7-348.1c-3-12.9-9.8-23.5-20.2-31.6C451.1,112,439.4,107.9,426.6,107.9L426.6,107.9z M755.8,957.3H401.5c-28.9,0-55-8.7-78.1-26l-258.8-194c-17-12.9-30.4-28.9-40.1-48c-9.7-19-14.5-39.1-14.6-60.2c0-35.7,12.8-66.2,38.3-91.3c25.5-25.2,56.2-37.8,91.9-37.8c8.5,0,16.9,0.9,25.3,2.8c8.4,1.9,15.4,3.7,21.2,5.6s12.7,5.4,20.9,10.5c8.2,5.1,14.1,9,17.8,11.8c3.7,2.7,10.3,7.8,19.7,15c9.4,7.3,15.8,12.1,19.1,14.6l-62.8-261.4c-2.4-11.9-3.6-21.9-3.6-30.1c0-31.7,10.2-59.2,30.6-82.7c20.4-23.5,46.3-36.9,77.6-40.3c4.7-29.6,18.4-54.2,41.1-73.8c22.7-19.6,49.1-29.3,79.4-29.3c28.2,0,53.4,8.8,75.5,26.3c22.1,17.5,36.6,40.1,43.4,67.6L598,355l42.3-177.7c6.8-27.6,21.3-50.1,43.4-67.6c22.1-17.5,47.3-26.3,75.5-26.3c29.6,0,55.6,9.2,77.8,27.6c22.3,18.4,36.3,42,42.1,71c31.7,3.4,58,16.7,79.1,39.8S990,272.3,990,304c0,10.2-1.2,19.9-3.6,29.1l-59.2,243.5c-1.7,7.5-2.5,18.9-2.5,34.2c0,17.3-2.2,35.7-6.7,55.2l-51.6,204.7c-6.4,25.5-20,46.4-40.6,62.5c-20.6,16.2-44,24.2-70.2,24.2L755.8,957.3z' ] diff --git a/src/Roassal-SVG-Examples/RSShapeExamples.extension.st b/src/Roassal-SVG-Examples/RSShapeExamples.extension.st index 44790693..36c8e198 100644 --- a/src/Roassal-SVG-Examples/RSShapeExamples.extension.st +++ b/src/Roassal-SVG-Examples/RSShapeExamples.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RSShapeExamples } +Extension { #name : 'RSShapeExamples' } -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example03LinePath [ @@ -64,7 +64,7 @@ RSShapeExamples >> example03LinePath [ ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example06JoinStyles [ | canvas line path styles | @@ -107,7 +107,7 @@ RSShapeExamples >> example06JoinStyles [ ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example15BimetricLine [ | canvas s1 s2 l | @@ -136,7 +136,7 @@ RSShapeExamples >> example15BimetricLine [ ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example18ExampleFromMondrian [ | canvas legend | @@ -183,33 +183,38 @@ blue links = dependencies; layout = force based layout on the inheritance links' ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example25BimetricLineOnLargeExample [ + | packagesRegExp packages l packageElements high canvas | packagesRegExp := { 'Calypso*' }. packages := packagesRegExp flatCollect: [ :regExp | - RPackageOrganizer default packages - select: [ :p | regExp match: p packageName ] ]. + RPackageOrganizer default packages select: [ :p | + regExp match: p name ] ]. - l := RSLabeled new text: [ :model | model packageName ]. - packageElements := packages collect: [ :pkg | | shapes | - shapes := pkg definedClasses collect: [ :cls | - RSBox new - color: Color black; - size: cls numberOfMethods sqrt; - yourself - ] as: RSGroup. - RSGridLayout on: shapes. - RSComposite new - color: Color blue translucent; - model: pkg; - addInteraction: l; - draggable; - shapes: shapes; - padding: 5; - yourself ] as: RSGroup. + l := RSLabeled new text: [ :model | model name ]. + packageElements := packages + collect: [ :pkg | + | shapes | + shapes := pkg definedClasses + collect: [ :cls | + RSBox new + color: Color black; + size: cls numberOfMethods sqrt; + yourself ] + as: RSGroup. + RSGridLayout on: shapes. + RSComposite new + color: Color blue translucent; + model: pkg; + addInteraction: l; + draggable; + shapes: shapes; + padding: 5; + yourself ] + as: RSGroup. high := RSHighlightable new. high withLines. high highlightColor: Color red translucent. @@ -221,42 +226,51 @@ RSShapeExamples >> example25BimetricLineOnLargeExample [ canvas: canvas; objects: packages; noBorder; - widthFrom:[ :edge | (edge key numberOfDependenciesToward: edge value) sqrt * 4 ]; - widthTo:[ :edge | (edge value numberOfDependenciesToward: edge key) sqrt * 4 ]; + widthFrom: [ :edge | + (edge key numberOfDependenciesToward: edge value) sqrt * 4 ]; + widthTo: [ :edge | + (edge value numberOfDependenciesToward: edge key) sqrt * 4 ]; paint: Color blue translucent; withBorderAttachPoint; connectFrom: #yourself toAll: #dependentPackages. - RSWeightedCircleLayout new initialRadius: 300; on: packageElements. + RSWeightedCircleLayout new + initialRadius: 300; + on: packageElements. canvas @ RSCanvasController. ^ canvas ] -{ #category : #'*Roassal-SVG-Examples' } +{ #category : '*Roassal-SVG-Examples' } RSShapeExamples >> example25BisBimetricLineOnLargeExample [ - "Same than example25BimetricLineOnLargeExample, but with no label" + + | packagesRegExp packages packageElements high canvas | packagesRegExp := { 'Calypso*' }. packages := packagesRegExp flatCollect: [ :regExp | - RPackageOrganizer default packages - select: [ :p | regExp match: p packageName ] ]. + RPackageOrganizer default packages select: [ :p | + regExp match: p name ] ]. - packageElements := packages collect: [ :pkg | | shapes | - shapes := pkg definedClasses collect: [ :cls | - RSBox new - color: Color black; - size: cls numberOfMethods sqrt; - yourself - ] as: RSGroup. - RSGridLayout on: shapes. - RSComposite new - color: Color blue translucent; - model: pkg; - draggable; - shapes: shapes; - padding: 5; - yourself ] as: RSGroup. + packageElements := packages + collect: [ :pkg | + | shapes | + shapes := pkg definedClasses + collect: [ :cls | + RSBox new + color: Color black; + size: cls numberOfMethods sqrt; + yourself ] + as: RSGroup. + RSGridLayout on: shapes. + RSComposite new + color: Color blue translucent; + model: pkg; + draggable; + shapes: shapes; + padding: 5; + yourself ] + as: RSGroup. high := RSHighlightable new. high withLines. high highlightColor: Color red translucent. @@ -268,12 +282,16 @@ RSShapeExamples >> example25BisBimetricLineOnLargeExample [ canvas: canvas; objects: packages; noBorder; - widthFrom:[ :edge | (edge key numberOfDependenciesToward: edge value) sqrt * 4 ]; - widthTo:[ :edge | (edge value numberOfDependenciesToward: edge key) sqrt * 4 ]; + widthFrom: [ :edge | + (edge key numberOfDependenciesToward: edge value) sqrt * 4 ]; + widthTo: [ :edge | + (edge value numberOfDependenciesToward: edge key) sqrt * 4 ]; paint: Color blue translucent; withBorderAttachPoint; connectFrom: #yourself toAll: #dependentPackages. - RSWeightedCircleLayout new initialRadius: 300; on: packageElements. + RSWeightedCircleLayout new + initialRadius: 300; + on: packageElements. canvas @ RSCanvasController. ^ canvas ] diff --git a/src/Roassal-SVG-Examples/package.st b/src/Roassal-SVG-Examples/package.st index a635201a..82fb34ae 100644 --- a/src/Roassal-SVG-Examples/package.st +++ b/src/Roassal-SVG-Examples/package.st @@ -1 +1 @@ -Package { #name : #'Roassal-SVG-Examples' } +Package { #name : 'Roassal-SVG-Examples' }