Highcharts Demo

author(s): Torstein Hønsi

by Torstein Hønsi

HTML

<script src="http://github.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px"></div>

JavaScript

'hidden',$(function () {
    $('#container').highcharts({

        chart: {
            marginBottom: 120,
            width: 500
        },

        legend: {
            itemWidth: 100,
            itemStyle: {
                color: '#7CB57C',
                fontWeight: 'bold',
                width: '70px',
                textOverflow: "ellipsis",
                overflow: "hidden",
                whiteSpace: "nowrap"
            },
            useHTML: true
        },

        series: [{
            data: [6, 4, 2],
            name: 'First but too long to be well displayed'
        }, {
            data: [7, 3, 2],
            name: 'Second'
        }, {
            data: [9, 4, 8],
            name: 'Third'
        }, {
            data: [1, 2, 6],
            name: 'Fourth'
        }, {
            data: [4, 6, 4],
            name: 'Fifth'
        }, {
            data: [1, 2, 7],
            name: 'Sixth'
        }, {
            data: [4, 2, 5],
            name: 'Seventh'
        }, {
            data: [8, 3, 2],
            name: 'Eighth'
        }, {
            data: [4, 5, 6],
            name: 'Ninth'
        }]
    });
});