Adding first data visualization.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-10-12 15:24:47 +00:00
parent 04cb54214c
commit 62465a5a47
2 changed files with 48 additions and 0 deletions

View File

@ -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)

View 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') )
]