JSFiddle - React, Tailwind, and code Playground

by Caio Sant Anna

HTML

<script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js"></script>

<div id="main" style="width: 800px;height:600px;"></div>

JavaScript

var myChart = echarts.init(document.getElementById('main'));

var option = {
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow',
        }        
    },
    backgroundColor: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            offset: 0,
            color: '#580891',
        },
        {
            offset: 0.8,
            color: '#041E48',
        },
    ]),
    legend: {
        data: ['Amount', 'Value'],
        bottom: 10,
        left: 'center',
    },
    grid: {
        left: '40',
        right: '45',
        bottom: '70',
        top: '20',
        containLabel: false,
        show: true,

    },
    xAxis: [{
            splitLine: {
                show: false
            },
            data: ['01/04', '01/05', '01/06', '01/07', '01/08'],
        },
        {
            axisPointer: {
                show: false
            },
            axisTick: {
                show: false
            },
            offset: 20,
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#FFFFFF'
                }
            }
        }
    ],
    yAxis: [{
            splitLine: {
                show: false
            },
            axisTick: {
                show: false
            },
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#FFFFFF'
                }
            }
        },
        {
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#FFFFFF'
                }
            },
            axisTick: {
                show: false
            },
        }
    ],
    series: [{
            name: 'Amount',
            type: 'bar',
            itemStyle: {
                borderRadius: [1000, 1000, 0, 0],
                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                        offset: 0,
                        color:...