Hi all! I want to make a little graph of a vector, with bars:
| b ds labels |
b := RTGrapher new.
b extent: 300 @ 200.
ds := RTStackedDataSet new.
ds points: { 2 . 2.3 . 1.2 }.
ds barShape width: 40.
b add: ds.
labels := #(x y z - -).
b axisX numberOfLabels:labels size-1.
b axisX numberOfTicks:labels size-1.
b axisX labelConvertion: [ :item | labels at:item +1].
b build.
^ b view
The code above writes the x 2 times. I just want an x, y and z under each
one of the bars. Also, I havo to do the 'item+1' thing because it somehow
starts at 0, and smalltalk arrays start at 1...
Thanks!
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Roassal
New issue 1119 by alexandr...(a)gmail.com: progress bar when using the force
based layout
https://code.google.com/p/moose-technology/issues/detail?id=1119
An alternative is to have another subclass, such as
RTForceBasedWithProgressBarLayout
But this is not idea, because the progress bar should be by default Pharo.
And on VisualWorks no.
Another alternative, and the cleanest one I believe, is to have event
generated to every X steps. You can have whatever you wish as a callback,
moving the progress bar or not.
Alexandre
On Apr 8, 2015, at 9:50 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
We need a better way of modeling that :)
Doru
On Wed, Apr 8, 2015 at 2:44 PM, Alexandre Bergel <alexandre.bergel(a)me.com>
wrote:
I have cleaned a bit your code with something like:
doExecute: nodeElements
self start: nodeElements.
self isJobInstalled
ifTrue: [ self runLayoutInJob ]
ifFalse: [ self runLayoutSimply ].
alpha := 0.
nodes do: [ :e | translator translateTopLeftOf: e to: e position ]
It is in version .816 of Roassal2.
We should be able to run the layout without job. This is important for us
Thanks!
Alexandre
> On Apr 7, 2015, at 5:04 PM, Peter Uhnák <i.uhnak(a)gmail.com> wrote:
> Out of curiosity I dug a little deeper and was happy to learn about a Job
> and more about Pharo internals.
> In any case, try replacing RTForceBasedLayout>>doExecute: with this
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> doExecute: nodeElements
> self start: nodeElements.
> [ :job |
> job
> title: 'Laying out elements';
> min: 1 - alpha;
> max: 1.
> nbIterations = 0
> ifTrue: [ [ alpha := alpha * 0.99. alpha > 0.005 ]
> whileTrue: [ self step. job currentValue: 1 - alpha ] ]
> ifFalse: [ nbIterations timesRepeat: [ alpha :=
> alpha * 0.99. self step. job currentValue: 1 - alpha ] ]
> ] asJob run.
> alpha := 0.
> nodes do: [ :e | translator translateTopLeftOf: e to: e position ].
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> it's bit messy (and doesn't account for nbIterations), but its a proof of
> concept.
> I thing that it makes sense to create execution indicator without
> progress (with spinner for example)
> What can be done is to display alpha on progress bar. From current value
> to 0.005 or whatever there is.
> I was thinking more something like this
> http://www.barchart.com/shared/images/progress_bar.gif or thsi
> https://i.stack.imgur.com/gz9GK.gif
> Peter
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Hello
I am trying to work with composite shapes, but I encountered a problem.
Let's say I need to create a circle... and in the center of it is another,
smaller, circle with label (but I need it to be centered according to both
label and smaller circle, that's why I decided to use composite shapes
instead of RTLabelled).
I am able to create it just fine, problem is when I call update on its
RTElement. I'm not sure whether I am even supposed to do it, but I think I
should be.
I start with just the inner circle with label:
| composite view |
composite := (RTLabel new
text: 'label';
yourself)
+
(RTEllipse new
size: 10;
yourself).
composite horizontal.
element := composite element.
view := RTView new.
view
add: element;
open.
element update.
Before element update, it looks fine, but when I call update, composite
layout (horizontal) gets lost.
Let's say I can ignore this problem (which I can't), and I will try the same
thing with whole shape
| composite view subcomposite |
subcomposite := (RTLabel new
text: 'label';
yourself)
+
(RTEllipse new
size: 10;
yourself).
subcomposite horizontal.
composite := (RTEllipse new
size: 50;
color: Color transparent;
borderColor: Color black;
yourself) + subcomposite.
element := composite element.
view := RTView new.
view
add: element;
open.
element update
this time I get exception MessageNotUnderstood: TRCompositeShape>>text:on:
I will appreciate any help, either by fixing something if it is broken, or
explaining how to reach my goal the correct way.
Jan
--
View this message in context: http://forum.world.st/Roassal-2-updating-CompositeShape-tp4813359.html
Sent from the Moose mailing list archive at Nabble.com.
Dear all,
As many of you know, Grapher is a über-cool charting engine, part of Roassal.
For people who do not know what Grapher is, here is a (compelling we hope) example:
Which is obtained by the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b colors points ds pts dec lb |
b := RTGrapher new.
colors := Array with: Color red with: Color blue.
points := OrderedCollection new.
colors do: [ :c |
ds := RTStackedDataSet new.
pts := ((1 to: 100) collect: [ :i | 50 atRandom - 25 ]) cumsum.
points add: pts.
ds points: pts.
dec := RTDevVarDecorator new.
dec moveBehind;
desviation: 0.5;
color: (c alpha: 0.3);
points: pts.
ds connectUsing: (RTLine new color: (c alpha: 0.5); width: 1 ).
b add: ds.
b addDecorator: dec.
].
b axisX; axisY.
b build.
lb := RTLegendBuilder new.
lb view: b view.
colors doWithIndex: [ :c :i |
lb addColor: c text: 'Series ', i printString ].
lb build.
b view @ RTZoomableView.
b view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
In our grand vision of making Roassal the best visualizing engine of the Universe (we also know to be modest time to time, but not today :-), Grapher will play a very important role. We would like to stabilize Grapher and make it sure it happily fits everybody needs. You can help on it:
- When you are tempted to look at the dark side of the planet (this is where R, JFreeChart, gnuplot, D3 and all their friends live), let us know. We will make sure to make you are happy again.
- Share your wishlist with us. We already have a long todo list, but your opinion does matter and will take it seriously
- we are open to contributions, which could be financial, bug fixe, enhancement, or simply encouragement.
I am very happy to be surrounded by very smart engineers. Your encouragement are making them happy :-)
Cheers,
Alexandre, in the name of the Object Profile Team
NB: sorry for the cross-list posting, but this email is very important for us, and for you we hope.
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hello.
The RTPolygon borders are scaled with the rest of the image. I resolved this issue.
Can someone integrate mcz file in attachment?
Best regards,
Natalia
Hey,
I usually inspect a lot with arrays and since recently, I don't see really
an array content, just number of items, eg:
#( #('a' 'b') #('b')) -> inspect
an Array [2 items]
an Array [1 item]
Instead of:
#( #('a' 'b') #('b'))
This is -- for me -- super-annoying. do you think an original functionality
can be returned back, or you have some serious reasons to have it like this?
Cheers,
Jan