[7849] | 1 | package {
|
---|
| 2 | public class PointCandle extends Point
|
---|
| 3 | {
|
---|
| 4 | public var width:Number;
|
---|
| 5 | public var bar_bottom:Number;
|
---|
| 6 | public var high:Number;
|
---|
| 7 | public var open:Number;
|
---|
| 8 | public var close:Number;
|
---|
| 9 | public var low:Number;
|
---|
| 10 |
|
---|
| 11 | public function PointCandle( x:Number, high:Number, open:Number, close:Number, low:Number, tooltip:Number, width:Number ):void {
|
---|
| 12 | super( x, high );
|
---|
| 13 |
|
---|
| 14 | this.width = width;
|
---|
| 15 | this.high = high;
|
---|
| 16 | this.open = open;
|
---|
| 17 | this.close = close;
|
---|
| 18 | this.low = low;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public override function make_tooltip(
|
---|
| 22 | tip:String, key:String, val:Number, x_legend:String,
|
---|
| 23 | x_axis_label:String, tip_set:String ):void {
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | super.make_tooltip( tip, key, val, x_legend, x_axis_label, tip_set );
|
---|
| 27 | // super.make_tooltip( tip, key, val.open, x_legend, x_axis_label, tip_set );
|
---|
| 28 | //
|
---|
| 29 | // var tmp:String = this.tooltip;
|
---|
| 30 | // tmp = tmp.replace('#high#',NumberUtils.formatNumber(val.high));
|
---|
| 31 | // tmp = tmp.replace('#open#',NumberUtils.formatNumber(val.open));
|
---|
| 32 | // tmp = tmp.replace('#close#',NumberUtils.formatNumber(val.close));
|
---|
| 33 | // tmp = tmp.replace('#low#',NumberUtils.formatNumber(val.low));
|
---|
| 34 |
|
---|
| 35 | // this.tooltip = tmp;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | public override function get_tip_pos():Object {
|
---|
| 39 | return {x:this.x+(this.width/2), y:this.y};
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 | }
|
---|