The colours come from JFreeChart's DefaultDrawingSupplier.

There's nothing you can supply in the objects that go into the items array that 
will affect rendering. The items, nameKey and valueKey bindings are all about 
building the dataset for your chart.

If you really wanted to go down the path of having ERPlot build the chart for 
you with the colours of your choice you'll probably need your own 
DrawingSupplier implementation which would allow you provide an array of 
colours for rendering, then use the configurations binding the set your 
DrawingSupplier for some keypath similar to "plot.drawingSupplier".

I think you should take the responsibility away from ERPlot for building the 
chart. If you build it yourself you gain control over changing the rendering 
values for individual sections/items etc, something you can't achieve with the 
configurations binding and kvc..

Sharpy..



On 18/09/2010, at 6:44 AM, Baiss Eric Magnusson wrote:

> I thought if I supplied to the <item> binding of ERPPieChart the <totals> 
> NSMutableArray below:
> 
>       public class TotalOfMonth  {    // inner class
>               public BigDecimal       _total;
>               public String           _name;
>               public Color            _color;
>               public String           _legend;
>               
>               TotalOfMonth( BigDecimal total, String name, Color color )  {
>                       _total = total;
>                       _name = name;
>                       _color = color;
>                       mTotalsGraph += total.doubleValue();
>               }
>       }
> 
>       NSMutableArray<TotalOfMonth> totals = new 
> NSMutableArray<TotalOfMonth>(5);
>     Color fixedExpColor =  new Color( 0xff, 0x66, 0x00 );                     
>                               
>       totals.addObject( new TotalOfMonth( thisMonth.fixedMonthlyExpense(), 
> "Fixed Expense ", fixedExpColor ));
>       ...
> That the "Fixed Expense " piece of the pie chart would be set to the color 
> <fixedExpColor>, but the color seems to come from ???
> 
> 
> ----
> Baiss Eric Magnusson
> CascadeWebDesign.com
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to