#8258

HTML

<script type="text/javascript" src="http://www.amcharts.com/lib/3/amcharts.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/xy.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/themes/none.js"></script>
<div id="chartdiv"></div>

CSS

#chartdiv {
	width		: 100%;
	height		: 500px;
	font-size	: 11px;
}

JavaScript

var chartData = [{
        "ay": 0.5,
        "by": 2.2,
        "date": 1406840400000
    }, {
        "ay": 1.3,
        "by": 4.9,
        "date": 1406926800000
    }, {
        "ay": 2.3,
        "by": 5.1,
        "date": 1407013200000
    }, {
        "ay": 2.8,
        "by": 5.3,
        "date": 1407099600000
    }, {
        "ay": 3.5,
        "by": 6.1,
        "date": 1407186000000
    }, {
        "ay": 5.1,
        "by": 8.3,
        "date": 1407272400000
    }, {
        "ay": 6.7,
        "by": 10.5,
        "date": 1407358800000
    }, {
        "ay": 8,
        "by": 12.3,
        "date": 1407445200000
    }, {
        "ay": 8.9,
        "by": 14.5,
        "date": 1407531600000
    }, {
        "ay": 9.7,
        "by": 15,
        "date": 1407704400000
    }, {
        "ay": 10.4,
        "by": 18.8,
        "date": 1407790800000
    }, {
        "ay": 11.7,
        "by": 19,
        "date": 1407877200000
    }];

var guides = [];
for(var x in chartData) {
    guides.push({ 
        "above": true,
        "angle": 18, 
        "balloonColor": "#CE3131", 
        "balloonText": "umesh", 
        "boldLabel": true, 
        "dashLength": 3, 
        "fillAlpha": 0, 
        "fillColor": "#3FAD44", 
        "fontSize": 14, 
        "id": "Guide-1", 
        "inside": true, 
        "label": "umesh #" + x, 
        "labelRotation": 90, 
        "lineAlpha": 1, 
        "lineColor": "#DA2525", 
        "lineThickness": 3, 
        "position": "bottom", 
        "value": chartData[x].date, 
        "toValue": chartData[x].date,
        "valueAxis": "v1",
        "balloonText": "<b>umesh #" + x + ":</b> hi"
    });
}

var chart = AmCharts.makeChart("chartdiv", {
    "type": "xy",
    "theme": "none",
    "pathToImages": "http://www.amcharts.com/lib/3/images/",
    "dataProvider": chartData,
    "valueAxes": [{
        "id": "v1",
        "position":"bottom",
        "axisAlpha": 0,
        "dashLength": 1,
        "title": "X Axis (simulated date)",
   ...