/**
* chart tool handle
*/
// ++ handle
    /**
    * constructor
    */
    function Handle(t,v) {
        this.value = v;
        this.timestamp = t;
    }
    /**
    * properties
    */
    Handle.prototype.value      = 0;
    Handle.prototype.timestamp  = 0;
    Handle.prototype.index      = 0;
// -- handle

/**
* chart tool base class
*/
// ++ Tool
    /**
    * constructor
    */
    function Tool(){};
    /**
    * handles
    * @var array<Handle>
    */
    Tool.prototype._handles = null;
    /**
    * draw
    */
    Tool.prototype.draw = function(chart, offset, begin, end){};
// -- Tool

/**
* chart line (2 handles)
*/
// ++ ChartLine
    /**
    * constructor
    */
    ToolLine = function(t,v) {
        this._handles = [];
        
        var h = new Handle(t,v);
        this._handles.push(h);
        
        h = new Handle(t,v);
        this._handles.push(h);
    };
    ToolLine.prototype = Tool.prototype;
    /**
    * draw
    */
    ToolLine.prototype.draw = function(chart, offset, begin, end) {
        var c = chart._context;
        c.strokeStyle = '#000000';
        c.beginPath();
        c.moveTo(chart._getX(this._handles[0].index-offset.index),chart._getY(this._handles[0].value));
        c.lineTo(chart._getX(this._handles[1].index-offset.index),chart._getY(this._handles[1].value));
        c.stroke();
    };
// -- ChartLine