class CandleStyle extends BarStyle { public var is_bar:Boolean = true; // MovieClip that holds each bar: private var bar_mcs:Array; public var name:String; private var line_width = 3; var links:Array; public function CandleStyle( lv:Object, name:String ) { this.name = 'candle'+name; // this calls parent obj Style.Style first this.parse_bar( lv[this.name] ); //this.set_values( lv['values'+name], lv['links'+name], lv['tool_tips_set'+name] ); this.links = new Array(); } public function parse_bar( val:String ) { var vals:Array = val.split(","); this.alpha = Number( vals[0] ); this.line_width = Number( vals[1] ); this.colour = _root.get_colour(vals[2]); if( vals.length > 3 ) this.key = vals[3]; if( vals.length > 4 ) this.font_size = Number( vals[4] ); } // a group looks like "[1,2,3,4]" private function parse_group( g:String ) { var group:Array = g.split(','); this.values.push( { high: Number( group[0] ), open: Number( group[1] ), close: Number( group[2] ), low: Number( group[3] ), tip: String( group[4] ), // BSS: Add link: String( group[5] ) // BSS: Add } ); } function groups( vals:String ) { var groups:Array=new Array(); var tmp:String = ''; var start:Boolean = false; for( var i=0; ii ) { mc._ofc_link = this.links[i]; mc.onRelease = function ():Void { trace(this._ofc_link); getURL(this._ofc_link); }; mc.useHandCursor = true; } else mc.useHandCursor = false; //mc.onRollOver = ChartUtil.glowIn; // this is used in FadeIn and FadeOut //mc.tool_tip_title = labels[i]; var tooltip:Object = {x_label:labels[i], value:this.values[i], key:this.key}; mc.tooltip = tooltip; // add the MovieClip to our array: this.bar_mcs[i] = mc; } } public function valPos( b:Box, right_axis:Boolean, min:Number, bar_count:Number, bar:Number ) { this.ExPoints=Array(); var item_width:Number = b.width_() / this.values.length; // the bar(s) have gaps between them: var bar_set_width:Number = item_width*_root._bars_width; // get the margin between sets of bars: var bar_left:Number = b.left_()+((item_width-bar_set_width)/2); // 1 bar == 100% wide, 2 bars = 50% wide each var bar_width:Number = bar_set_width/bar_count; for( var i:Number=0; i < this.values.length; i++) { var tmp:PointCandle = b.make_point_candle( i, this.values[i].high, this.values[i].open, this.values[i].close, this.values[i].low, right_axis, bar, bar_count ); var myTip:String = this.values[i].tip; // BSS: Add if ( myTip == '' ) // BSS: Add myTip=_root.get_tooltip_string(); // BSS: Add tmp.make_tooltip( myTip, // BSS: Changed: _root.get_tooltip_string(), this.key, this.values[i], _root.get_x_legend(), _root.get_x_axis_label(i) ); //var tooltip:Object = {x_label:labels[i], value:this.values[i], key:this.key}; //mc.tooltip = tooltip; if ( this.values[i].link != '' ) // BSS: Add this.links[i] = this.values[i].link; // BSS: Add this.ExPoints.push( tmp ); } } public function draw_bar( val:Object, i:Number ) { var top:Number; var height:Number; var line_width:Number = this.line_width; var hollow:Boolean = false; if( val.open > val.close ) { hollow = true; var tmp:Number = val.open; val.open = val.close; val.close = tmp; } /* if(val.bar_bottom