Phil 10.29.12

8:00 – 4:00 ESSO

  • So begins a very wet day.
  • Working on figuring out why coloring chart lines is so different from all the other charts. Going to try building a toy project with just one line chart in it and (maybe?) an item renderer.
  • Well that turned out to be easier than I thought.
	private function init():void{
		var hsb:HsbObject = new HsbObject(0x0000AA);
		var lsa:Array = new Array();
		lsa.push(createLineSeries("Profit", "Profit", hsb));
		hsb.rotateHue(40);
		lsa.push(createLineSeries("Expenses", "Expenses", hsb));
		hsb.rotateHue(40);
		lsa.push(createLineSeries("Amount", "Amount", hsb));

		_linechart.series = lsa;
	}

	private function createLineSeries(yf:String, dn:String, hsb:HsbObject):LineSeries{
		var scs:SolidColorStroke = new SolidColorStroke(hsb.getHexColor());
		scs.weight = 3;
		var ls:LineSeries = new LineSeries();
		ls.yField = yf;
		ls.displayName = dn;
		ls.setStyle("lineStroke", scs);
		return ls;
	}

The project files are here. There are two projects. The EdgeUtils project contains the HsbObject class.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.