Adding first data visualization.
This commit is contained in:
parent
04cb54214c
commit
62465a5a47
@ -60,6 +60,41 @@ FossilRepo >> commitsByDate [
|
||||
^ result
|
||||
]
|
||||
|
||||
{ #category : #'data visualization' }
|
||||
FossilRepo >> commitsCalendarFrom: startYear to: endYear colored: colorsPalette [
|
||||
"I"
|
||||
|
||||
| b colors dictionary valuedColors |
|
||||
dictionary := self commitsByDate.
|
||||
colors := RTColorPalette sequential colors: 9 scheme: 'Blues'.
|
||||
valuedColors := self commitsByDate collect: [ :v | colors at: v // 2 + 1 ].
|
||||
b := RTCalendarBuilder new.
|
||||
b dateShape rectangle
|
||||
size: 15;
|
||||
color: Color white;
|
||||
borderColor: Color lightGray.
|
||||
b monthShape shape: (b monthShapePath: 15.0).
|
||||
b yearShape
|
||||
composite: [ :comp |
|
||||
comp
|
||||
add:
|
||||
(RTLabel new
|
||||
text: [ :d | d year ];
|
||||
height: 20).
|
||||
comp add: (RTBox new color: Color transparent) ].
|
||||
b dates: ((Year year: startYear) to: (Year year: endYear)).
|
||||
b dateLayout gapSize: 0.
|
||||
b monthLayout month.
|
||||
b yearLayout horizontalLine.
|
||||
b dateShape
|
||||
if: [ :d | dictionary includesKey: d ]
|
||||
color: [ :d | valuedColors at: d ].
|
||||
b dateInteraction popup.
|
||||
b build.
|
||||
(b view elements select: [ :e | e model isKindOf: Month ]) pushFront.
|
||||
^ b view
|
||||
]
|
||||
|
||||
{ #category : #wiki }
|
||||
FossilRepo >> createPage: pageName [
|
||||
^ NeoJSONReader fromString: (self jsonWikiDataFor: 'create/', pageName)
|
||||
|
13
repository/Fossil/ManifestFossil.class.st
Normal file
13
repository/Fossil/ManifestFossil.class.st
Normal file
@ -0,0 +1,13 @@
|
||||
"
|
||||
I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
|
||||
"
|
||||
Class {
|
||||
#name : #ManifestFossil,
|
||||
#superclass : #PackageManifest,
|
||||
#category : #Fossil
|
||||
}
|
||||
|
||||
{ #category : #'code-critics' }
|
||||
ManifestFossil class >> ruleRBBadMessageRuleV1FalsePositive [
|
||||
^ #(#(#(#RGMethodDefinition #(#FossilRepo #commitsCalendarFrom:to:colored: #false)) #'2017-10-12T15:19:50.932072-05:00') )
|
||||
]
|
Loading…
Reference in New Issue
Block a user