function Linechart() {

	this.seriesData = [];

	this.setTarget = function(target) {
		this.target = target;
	};

	this.setTitle = function(title) {
		this.title = title;
	};

	this.setSubTitle = function(title) {
		this.subTitle = title;
	};

	this.getTitle = function() {
		if (this.title === undefined) {
			return "";
		} else {
			return this.title;
		}
	};
	
	this.setStartDate = function (start) {
	     this.startDate = start;  
	};
	
	this.getStartDate = function () {
	    return this.startDate;
	}
	
	this.getSubTitle = function() {
		if (this.subTitle === undefined) {
			return "";
		} else {
			return this.subTitle;
		}
	};

	this.addSeriesData = function(value) {
		this.seriesData.push(value);
	};
	
	this.setSeriesData = function(data) {
	    this.seriesData = data;
	};

	this.setMaxQuantity = function(num) {
		
	};

	this.getSeriesData = function() {
		return this.seriesData;
	};
	
	this.render = function() {
        chart = new Highcharts.Chart({
        				chart: {
        					renderTo: this.target,
        					zoomType: 'x'
        				},
        			        title: {
        					text: this.getTitle()
        				},
        			        subtitle: {
        					text: this.getSubTitle()
        				},
        				xAxis: {
        					type: 'datetime',
        					maxZoom: 14 * 24 * 3600000, // fourteen days
        					title: {
        						text: null
        					}
        				},
        				
        				yAxis: {
        					title: {
        						text: null
        					}
        				},

        				tooltip: {
        					formatter: function() {
        						return new Date(this.x).toString('yyyy-MM-dd') + '<br/>'+ this.y +' kr';
        					}
        				},
        				legend: {
        					enabled: false
        				},
        				credits: {
            				enabled: false
            			},
        				plotOptions: {
        					area: {
        						fillColor: {
        							linearGradient: [0, 0, 0, 300],
        							stops: [
        								[0, '#a7ff35'],
        								[1, '#1eb800']
        							]
        						},
        						lineWidth: 1,
        						marker: {
        							enabled: false,
        							states: {
        								hover: {
        									enabled: true,
        									radius: 3
        								}
        							}
        						},
        						shadow: true,
        						states: {
        							hover: {
        								lineWidth: 1						
        							}
        						}
        					}
        				},

        				series: [{
        					type: 'area',
        					name: '',
        					pointInterval: 24 * 3600 * 1000,
        					pointStart: this.getStartDate().getTime(),
        					data: this.getSeriesData()
        				}]
        			});
	};
}
