JSFiddle - React, Tailwind, and code Playground

by muris2016

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="InvestmentPerformanceChartContainerID" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
                $('#InvestmentPerformanceChartContainerID').data("FirstYear", -1);
                var m_names = new Array("Jan", "Feb", "Mar",
            "Apr", "May", "Jun", "July", "Aug", "Sep",
            "Oct", "Nov", "Dec");
                $('#InvestmentPerformanceChartContainerID').highcharts({
                    credits: {
                        enabled: true,
                        text: '@Powered by data from jerry 2014'
                    },
                    chart: {
                        marginBottom:275
                    },
                    title: {
                        text: 'Performance',
                        align: 'left',
                    style: { "fontSize": '10px' 
            }
        },
        xAxis: {
            title: {
                text: 'Period'
            },
            min: Date.UTC(2013,2,26),
            max: Date.UTC(2014,11,12),
                type: 'datetime',
                tickPositioner: function () {
                    var positions = [],
                        tick = Math.floor(this.dataMin)
                
                    var monthincrement = 2592000000;
                    ////is roughly how many seconds you have in a month
                    var totalLabel = 5;
                    var increment = Math.ceil((this.dataMax - this.dataMin) / totalLabel);
                
                    var previousTickDate = null;
                       
                    for (tick; tick - increment <= this.dataMax; tick += increment) {
                        if (previousTickDate == null)
                        {
                            ////start date is in.
                            positions.push(tick);
                            previousTickDate = new Date(tick); 
                        }
                        else{
                            currentTickDate = new Date(tick);
                            if (previousTickDate.getMonth() ==
                          ...