Wow wow!!!! Beautiful!
Alexandre On Jan 15, 2014, at 4:12 AM, Tudor Girba <tu...@tudorgirba.com> wrote: > I took a bit of time and added gapFraction support for horizontal bar > diagram. It is not quite solid yet (it needs some refactoring), but the core > is in place. We have to adapt the vertical bar diagram as well. > > There are two tests that fail, but I do not quite understand why: > https://ci.inria.fr/moose/job/graph-et/307/testReport/junit/ > > In any case, now if you execute this in the very latest Moose image: > MessageTally new spyEvery: 1 on: [10000 timesRepeat: [Collection > withAllSubclassesDo: #printString]]; yourself. > > You get this (I still seem to have problems with the alignment of the inner > bars): > > <Inspector on a MessageTally (nil(...oIt).png> > > > Doru > > > On Wed, Jan 8, 2014 at 10:44 PM, Tudor Girba <tu...@tudorgirba.com> wrote: > Hi Daniel, > > Good work! > > But, there is still something I do not quite understand. Take a look at the > produced image. Why is it that in the first red bar appears behind the gray > one, and the rest appear in front of the corresponding gray bars? > > Related to the GapFraction: Could you describe what makes it such an > expensive issue to compute the width of the bar with a bit of scaling? I am > asking because this particular diagram does not work without it. > > Cheers, > Doru > > <Screenshot 2014-01-08 22.40.58.png> > > > > On Wed, Jan 8, 2014 at 6:50 PM, Daniel Aviv Notario > <daniel_avivnota...@hotmail.com> wrote: > So, attending to the request Doru made, here's something similar to the > example he provided in EyeSee... All the methods were already implemented but > most of them didn't have a clear accesor to modify them. > > So, if you just load the last version of GraphET and do this: > > > builder := GETDiagramBuilder new. > grouped := { #item1->{10 . 12 . 11 . 14 } . #item2-> { 1 . 1 . 20 > } > . #item3->{ 1 . 1 . 1 . 1 . 1} }. > diag := (GETVerticalBarDiagram new) > modelLabels: [:each | each key ]; > y: [:each | each value size]; > yAxisLabel: 'Count'; > valueAxis; > height:200; > spacing:20; > yAxisOnRight; > color: Color veryLightGray; > axisColor: Color veryLightGray; > models: grouped; > yourself. > diag2 := (GETVerticalBarDiagram new) > y: [:each | each value sum]; > regularAxis; > height: 200; > spacing:20; > yAxisLabel: 'Sum'; > color: (Color red); > axisColor: (Color red); > models: grouped; > yourself. > (builder unionDiagram) > add: diag; > add: diag2. > builder open > > > You'll see it's very similar. There's two things I couldn't replicate so far, > one of them is the rotating labels, as Roassal can't rotate labels yet, and > the second one was the GapFraction, as axis in GraphET need some work yet, so > implementing that kind of thing would be hard. I think I'll dedicate to a > proper axis in the next couple of weeks. > > Cheers :)! > > > > >>> ---------- Forwarded message ---------- > > > >>> From: Tudor Girba <tu...@tudorgirba.com> > > > >>> Date: Sat, Jan 4, 2014 at 10:39 PM > > > >>> Subject: Re: [Pharo-dev] Feature for request for GraphET? > > > >>> To: Pharo Development List <pharo-dev@lists.pharo.org> > > > >>> > > > >>> > > > >>> Here is one thing I would want: a correspondent Graph-ET > > > >>> functionality to make something like this EyeSee script work as > > > >>> in > > > >>> the first attached picture. > > > >>> > > > >>> renderer := ESDiagramRenderer new. > > > >>> grouped := { #item1->{10 . 12 . 11 . 14 } . #item2-> { 1 . 1 . 20 > > > >>> } > > > >>> . #item3->{ 1 . 1 . 1 . 1 . 1} }. > > > >>> diag := (ESVerticalBarDiagram new) > > > >>> identifier: [:each | each key ]; > > > >>> y: [:each | each value size]; > > > >>> yAxisLabel: 'Count'; > > > >>> valueAxis; > > > >>> rightYAxis; > > > >>> defaultColor: Color veryVeryLightGray; > > > >>> axisColor: Color veryVeryLightGray; > > > >>> models: grouped; > > > >>> rotatedLabels: true; > > > >>> yourself. > > > >>> diag2 := (ESVerticalBarDiagram new) > > > >>> y: [:each | each value sum]; > > > >>> regularAxis; > > > >>> yAxisLabel: 'Sum'; > > > >>> gapFraction: 2 / 3; > > > >>> defaultColor: (Color red); > > > >>> axisColor: (Color red); > > > >>> models: grouped; > > > >>> yourself. > > > >>> (renderer compositeDiagram) > > > >>> add: diag; > > > >>> add: diag2. > > > >>> renderer open > > > >>> > > > >>> > > > >>> <Screenshot 2014-01-04 22.31.57.png> > > > >>> > > > >>> > > > >>> The best I could produce with Graph-ET is this (I commented out > > > >>> the > > > >>> message to which I did not find a correspondent): > > > >>> > > > >>> builder := GETDiagramBuilder new. > > > >>> grouped := { #item1->{10 . 12 . 11 . 14 } . #item2-> { 1 . 1 . 20 > > > >>> } > > > >>> . #item3->{ 1 . 1 . 1 . 1 . 1} }. > > > >>> diag := (GETVerticalBarDiagram new) > > > >>> "identifier: [:each | each key ];" > > > >>> y: [:each | each value size]; > > > >>> yAxisLabel: 'Count'; > > > >>> valueAxisLine; > > > >>> "rightYAxis;" > > > >>> color: Color veryLightGray; > > > >>> "axisColor: Color veryLightGray;" > > > >>> models: grouped; > > > >>> "rotatedLabels: true;" > > > >>> yourself. > > > >>> diag2 := (GETVerticalBarDiagram new) > > > >>> y: [:each | each value sum]; > > > >>> regularAxis; > > > >>> yAxisLabel: 'Sum'; > > > >>> "gapFraction: 2 / 3;" > > > >>> color: (Color red); > > > >>> "axisColor: (Color red);" > > > >>> models: grouped; > > > >>> yourself. > > > >>> (builder compositeDiagram) > > > >>> add: diag; > > > >>> add: diag2. > > > >>> builder open > > > >>> > > > >>> <Screenshot 2014-01-04 22.36.40.png> > > > >>> > > > >>> Cheers, > > > >>> Doru > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.