Highcharts Demo

author(s): Øystein Moseng

by koh_edwin

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/pattern-fill.js"></script>

<div id="container"></div>

CSS

#container {
    height: 600px;
    max-width: 800px;
    margin: 0 auto;
}

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'bar'
    },

    title: {
        text: 'Pattern fill plugin demo'
    },

    xAxis: {
        categories: ['Jan', ]
    },

    /*plotOptions: {
        bar: {
            fillColor: {
                pattern: {
                    path: {
                        d: 'M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11',
                        strokeWidth: 3
                    },
                    width: 10,
                    height: 10,
                    opacity: 0.4
                }
            }
        }
    },
*/
    series: [{
        data: [{y:29.9, color: {
            pattern:  {
                     path: {
                        d: 'M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11',
                        strokeWidth: 1,
                       
                    },
                    width: 10,
                    height: 10,
                    opacity: 1
                }
        }}, ],
        color: '#88e',
       
    }]
});