Humm, very long email.
Is it something like this that you need?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view shape rectangle
linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color
green;
size: 30.
view nodes: (1 to: 20).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I committed version 2.129 of Mondrian with this improvement.
There is linearFillColor:within:highColor: as well.
Alexandre
On 8 Nov 2011, at 07:08, Usman Bhatti wrote:
Alex
We are improving the distribution customization points. Now we can give a title for
distributionMap and subclasses.
We want to change the fill color of a linear distribution by default it is grey and we
want to be able to let the user specify the color.
How do we parameterize the linearFillColor below so that it represents various variation
LinearDistributionMap>>renderElementsFrom: node on: view
view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
view shape rectangle
size: 10;
linearFillColor: [ :e | elementsAndPropertyValue at: e ] within:
elementsAndPropertyValue keys;
borderColor: self baseColor.
view nodes: (self orderElementsFor: node)
We saw that we can call linearRedFillColor: anObject within: aGroup
instead of linearFillColor: [ :e | elementsAndPropertyValue at: e ] within:
elementsAndPropertyValue keys;
but we would like to say specify a base color and that the distributionmap uses this
color as a reference.
packageVersionMap
"self packageVersionMap"
| dm |
dm := (LinearDistributionMap
onContainers: (model allModelPackages)
elements: #classes
properties: [ :cl | cl parentPackage numberOfVersions]).
dm title: 'Package Versions'.
***> dm baseColor: Color red.
dm render.
dm open.
and obtain the attached figure but without having to use at our level (distribution map)
linearRedFillColor:
So alex would it be possible that we pass the highColor for a linearFill?
Stef and Ussman coding close the fireplace :)
Thanks
<Screen shot 2011-11-08 at 4.02.43 PM.png>
_______________________________________________
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.