Highcharts Stock Demo

author(s): Torstein Hønsi

by Yonathan Benitah

HTML

<div id="container" style="height: 400px; min-width: 600px"></div>

<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="https://www.highcharts.com/samples/data/usdeur.js"></script>

JavaScript

Highcharts.stockChart('container', {
    title: {
        text: 'xAxis.labels.enabled = false'
    },
    xAxis: {
        labels: {
            enabled: false
        }
    },

    rangeSelector: {
     buttonTheme: { // styles for the buttons
            fill: 'none',
            stroke: 'none',
            'stroke-width': 0,
            r: 8,
            style: {
                color: '#039',
                fontWeight: 'bold'
            },
            states: {
                hover: {
                },
                select: {
                    fill: '#039',
                    style: {
                        color: 'white'
                    }
                }
                // disabled: { ... }
            }
        },
        selected: 1
    },
    navigation:{
    buttonOptions: {
    enabled: true,
            theme: {
                'stroke-width': 1,
                stroke: 'block',
                r: 0,
                states: {
                    hover: {
                        fill: '#a4edba'
                    },
                    select: {
                        stroke: 'black',
                        fill: '#a4edba'
                    }
                }
            }
        },
    },
navigator:{
xAxis:{
labels:{
y:27
}
}
},
    series: [{
        name: 'USD to EUR',
        data: usdeur
    }]
});