[7849] | 1 | package charts {
|
---|
| 2 | //import caurina.transitions.Tweener;
|
---|
| 3 |
|
---|
| 4 | import flash.display.Sprite;
|
---|
| 5 | import flash.events.Event;
|
---|
| 6 | import flash.events.MouseEvent;
|
---|
| 7 | import charts.series.Element;
|
---|
| 8 | import charts.series.dots.PointDot;
|
---|
| 9 | import string.Utils;
|
---|
| 10 | import flash.display.BlendMode;
|
---|
| 11 |
|
---|
| 12 | public class LineDot extends LineBase
|
---|
| 13 | {
|
---|
| 14 |
|
---|
| 15 | public function LineDot( json:Object )
|
---|
| 16 | {
|
---|
| 17 |
|
---|
| 18 | this.style = {
|
---|
| 19 | values: [],
|
---|
| 20 | width: 2,
|
---|
| 21 | colour: '#3030d0',
|
---|
| 22 | text: '', // <-- default not display a key
|
---|
| 23 | 'dot-size': 5,
|
---|
| 24 | 'halo-size': 2,
|
---|
| 25 | 'font-size': 12,
|
---|
| 26 | tip: '#val#',
|
---|
| 27 | 'line-style': new LineStyle( json['line-style'] )
|
---|
| 28 | };
|
---|
| 29 |
|
---|
| 30 | object_helper.merge_2( json, style );
|
---|
| 31 |
|
---|
| 32 | this.style.colour = string.Utils.get_colour( this.style.colour );
|
---|
| 33 |
|
---|
| 34 | this.key = style.text;
|
---|
| 35 | this.font_size = style['font-size'];
|
---|
| 36 |
|
---|
| 37 | // this.axis = which_axis_am_i_attached_to(data, num);
|
---|
| 38 | // tr.ace( name );
|
---|
| 39 | // tr.ace( 'axis : ' + this.axis );
|
---|
| 40 |
|
---|
| 41 | this.values = style['values'];
|
---|
| 42 | this.add_values();
|
---|
| 43 |
|
---|
| 44 | //
|
---|
| 45 | // this allows the dots to erase part of the line
|
---|
| 46 | //
|
---|
| 47 | this.blendMode = BlendMode.LAYER;
|
---|
| 48 |
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | //
|
---|
| 53 | // called from the BaseLine object
|
---|
| 54 | /*
|
---|
| 55 | protected override function get_element( index:Number, value:Object ): Element {
|
---|
| 56 |
|
---|
| 57 | var s:Object = this.merge_us_with_value_object( value );
|
---|
| 58 | //
|
---|
| 59 | // the width of the hollow circle is the same as the width of the line
|
---|
| 60 | //
|
---|
| 61 | s.width = this.style.width;
|
---|
| 62 | if( s.type == null )
|
---|
| 63 | s.type = 'solid-dot';
|
---|
| 64 |
|
---|
| 65 | return new PointDot( index, s );
|
---|
| 66 | }
|
---|
| 67 | */
|
---|
| 68 | }
|
---|
| 69 | }
|
---|