Create Spark Components in actionscript

import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.graphics.IFill;
import mx.graphics.IStroke;
import mx.graphics.SolidColor;
import mx.graphics.Stroke;
import flash.display.Graphics;
import sparkcom.sparkline.*;

[Bindable]
public var sparkData:Array = new Array();

[Bindable]
//public var sparkLine:Sparkline;
public var sparkLine:ColumnSparkline;

/**
This is for initialize components
@param – void
*/
private function init():void
{
sparklineBox.removeAllChildren();
sparklineBox.addChild(createSparkLineChart());
}

/**
This is for create sparkline component
@param – void
@return – Sparkline
*/
/*private function createSparkLineChart():Sparkline
{

sparkLine = new Sparkline();
sparkLine.normalRange = [50000,100000];
sparkLine.xMinMarkerEnabled = true;
sparkLine.xMaxMarkerEnabled = true;
sparkLine.yMinMarkerEnabled = true;
sparkLine.yMaxMarkerEnabled = true;
sparkLine.dataProvider = sparkData;
//sparkLine.normalRangeFill = new SolidColor(0x2963a3);
//sparkLine.yMinFill = new SolidColor(0xFF0000);
//sparkLine.yMaxFill = new SolidColor(0x00a700);
return sparkLine;
}*/

/**
This is for create Sparkline components
@param – void
*/
private function createSparkLineChart():ColumnSparkline
{
sparkLine = new ColumnSparkline();
sparkLine.setStyle(“positiveFill”, new SolidColor(0x00a700));
sparkLine.setStyle(“negativeFill”, new SolidColor(0xff0000));
//sparkLine.setStyle(“zeroStroke”, new SolidColor(0x000000));
sparkLine.dataProvider = sparkData;
return sparkLine;
}

About ashokabhat

I am a C,C ,JAVA,Adobe Flex,.NET Programmer Currently working as a Software Developer
This entry was posted in Uncategorized. Bookmark the permalink.

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