JSFiddle - React, Tailwind, and code Playground

by Satyanshu Acharya

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="https://rawgit.com/highslide-software/pattern-fill/master/pattern-fill.js"></script>

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

JavaScript

var gfxPath = 'http://www.highcharts.com/components/com_demo/assets/demo/gfx/';

var chart = new Highcharts.Chart({

    chart: {
        renderTo: 'container'
    },
    
    title: {
        text: 'Pattern fill plugin demo'
    },

    xAxis: {
        categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
         plotBands: [{
            from: 6,
            to: 12,
            color: {
                pattern: gfxPath + 'pattern3.png',
                width: 6,
                height: 6
            }
        }]
    },
    
    yAxis: {
        plotBands: [{
            from: 100,
            to: 200,
            color: {
                pattern: gfxPath + 'pattern3.png',
                width: 6,
                height: 6
            }
        }]
    },

    series: [{
        type: 'area',
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        fillColor: {
            pattern: gfxPath + 'pattern1.png',
            width: 6,
            height: 6
        }
    }, {
        type: 'column',
        data: [148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6],
        color: {
            pattern: gfxPath + 'pattern2.png',
            width: 6,
            height: 6,
            // VML only:
            color1: 'red',
            color2: 'yellow'
        }
    }]
    
});