JSFiddle - React, Tailwind, and code Playground

by avrelian

HTML

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

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

CSS

#container {
	min-width: 310px;
	max-width: 800px;
	height: 400px;
	margin: 0 auto
}

JavaScript

Highcharts.setOptions({
    lang: {
          months: ['января', 'февраля', 'мартя', 'апреля', 'мая', 'июня',  'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря']
        }
});

Highcharts.chart('container', {

		chart: {
    	zoomType: 'xy',
    },

    title: {
        text: 'График эффективности'
    },

    yAxis: [
    {
        lineWidth: 1,
        title: {
            text: 'Клики'
        }
    }, 
    {
        lineWidth: 1,
        opposite: true,
        title: {
            text: 'Затраты, руб.'
        }
    },
    {
        lineWidth: 1,
        opposite: true,
        title: {
            text: 'CTR, %'
        }
    }
    ],
    legend: {
        layout: 'horizontal',
        align: 'left',
        verticalAlign: 'top',
        y: 25
    },
    
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            day: '%Y-%m-%d'
        }
    },

    plotOptions: {
        series: {
            pointStart: Date.UTC(2010, 1, 5),
            pointInterval: 24 * 3600 * 1000, // one day
            tooltip: {
                dateTimeLabelFormats: {
                      millisecond:"%A, %b %e, %H:%M:%S.%L",
                      second:"%A, %b %e, %H:%M:%S",
                      minute:"%A, %b %e, %H:%M",
                      hour:"%A, %b %e, %H:%M",
                      day:"%e %B %Y",
                      week:"Week from %A, %b %e, %Y",
                      month:"%B %Y",
                      year:"%Y"
                }
            }
        },
        
    },

    series: [{
        name: 'Клики',
        data: [null, null, 57177, 69658, 97031, 119931, 137133, 154175]
    }, {
        name: 'Затраты',
        data: [24916, 24064, 29742, null, 32490, 30282, 38121, 40434]
    }, {
        name: 'GA: сеансы',
        data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
        yAxis: 1
    }, {
        name: 'CTR, %',
        data: [43934, 52503, 7988, 12169, 15112, 22452, 34400, 34227],
        yAxis: 1
   ...