RTPieBuilder custom label is posible?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RTPieBuilder custom label is posible?

Nelson Garcia
I' trying to customize label in RTPieBuilder this is my sample.


b := RTPieBuilder new.
b interaction popup.
b view: v.
b objects: listByRegion associations.
b slice: [ :e | e value size ].
b globalRule distinctColor.
"b labelled."
b label: (RTLabel new text: 'label test').
b build.

I commented "b labelled", but when I try to set label with RTLabel I get
it error in trachelShape, there is a way to set a custom label?
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTPieBuilder custom label is posible?

Leonel Merino
Hi Nelson,

I think the label: method is not meant to be used like that. It is expecting one of the objects that you passed when calling the objects: method (listByRegion asssociations).
I did not find a method for custom labels in the builder. See the implementation of the labelled method (you could easily add a new method for custom labels).
 
Best regards,
Leonel

> On 02 Dec 2014, at 05:15, Nelson Garcia <[hidden email]> wrote:
>
> I' trying to customize label in RTPieBuilder this is my sample.
>
>
> b := RTPieBuilder new.
> b interaction popup.
> b view: v.
> b objects: listByRegion associations.
> b slice: [ :e | e value size ].
> b globalRule distinctColor.
> "b labelled."
> b label: (RTLabel new text: 'label test').
> b build.
>
> I commented "b labelled", but when I try to set label with RTLabel I get it error in trachelShape, there is a way to set a custom label?
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTPieBuilder custom label is posible?

abergel
In reply to this post by Nelson Garcia
Hi Nelson,

The PieBuilder is not well documented.
Try the following:

-=-=-=-=-=-=-=-=-=-=-=-=
b := RTPieBuilder new.
b interaction popup.

b objects: #(10 4 1 2 5).
b slice: [ :aNumber | aNumber ].
b globalRule distinctColor.
b labelled.
b build.
-=-=-=-=-=-=-=-=-=-=-=-=

You should not use #label:, this is a private method.

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Dec 2, 2014, at 1:15 AM, Nelson Garcia <[hidden email]> wrote:
>
> I' trying to customize label in RTPieBuilder this is my sample.
>
>
> b := RTPieBuilder new.
> b interaction popup.
> b view: v.
> b objects: listByRegion associations.
> b slice: [ :e | e value size ].
> b globalRule distinctColor.
> "b labelled."
> b label: (RTLabel new text: 'label test').
> b build.
>
> I commented "b labelled", but when I try to set label with RTLabel I get it error in trachelShape, there is a way to set a custom label?
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev