• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERPPieChart pie piece color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERPPieChart pie piece color


  • Subject: Re: ERPPieChart pie piece color
  • From: Michael Sharp <email@hidden>
  • Date: Mon, 20 Sep 2010 16:17:30 +1000

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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ERPPieChart pie piece color (From: Baiss Eric Magnusson <email@hidden>)

  • Prev by Date: Re: EOEditingContext help
  • Next by Date: Re: Handling just-in-time login - alternative title: dimmer than a very dim thing
  • Previous by thread: ERPPieChart pie piece color
  • Next by thread: Migrations and Default Values
  • Index(es):
    • Date
    • Thread