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?
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 nelsongarcia.info@gmail.com 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 Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
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