GCA HighStock

by Jens Kühn

HTML

<script src="https://code.highcharts.com/stock/highstock.js"></script>
<div id="container"></div>

JavaScript

$(function() {
createChart();
// create the chart when all data is loaded
function createChart() {
    chart = new Highcharts.StockChart({
        chart: {renderTo: 'container'},            
        rangeSelector: {
                buttons: [{
                    type: 'day',
                    count: 3,
                    text: '3d'
                }, {
                    type: 'week',
                    count: 1,
                    text: '1w'
                }, {
                    type: 'month',
                    count: 1,
                    text: '1m'
                }, {
                    type: 'month',
                    count: 6,
                    text: '6m'
                }, {
                    type: 'year',
                    count: 1,
                    text: '1y'
                }, {
                    type: 'all',
                    text: 'All'
                }],
                selected: 5,
                        inputEnabled: false //Datumsauswahl ausblenden
            },
        xAxis: {
          type: 'datetime',
          dateTimeLabelFormats: {day: '%d. %m'}
        },
        yAxis: {
            title: { text: 'Daten in Euro/MWh' } ,
            labels: {formatter: function() {return this.value;}}
        },
        plotOptions: {
            series: {
                lineWidth: 0.7
//                pointInterval: (3600000*1), // one hour
//                pointStart: Date.UTC()
            }
        },
        legend: {
            enabled: false,
            align: 'center',
            backgroundColor: '#ffffff',
            borderColor: '#444444',
            borderWidth: 1,
            layout: 'vertical',
            verticalAlign: 'top',
            y: 0,
            shadow: true
        },
        series: [

                {
                        name: 'ECONGAS.IX.CTAGMD.KWH',
                        color: '#4CAF45',
                        data: [[Date.UTC(2011, 2, 16, 7, 0, 0),119886],[Date.UTC(2011, 2,...