相关疑难解决方法(0)

如何访问 Apexchart 的 dataPointSelection 函数上的值

如何通过单击工具提示来访问 Apex 图表的数据值?

我不想要索引。我需要这个值。我如何访问该值?

<script>
var options = {
    chart: {
        type: 'line',
        events: {
            dataPointSelection: function (event, chartContext, config) {
                console.log(config);
                var ix = config.dataPointIndex;

                alert(ix);

            }
        }
    },
    series: [{
        name: 'TEST',
        data: [[1324508400000, 34], [1324594800000, 54], [1325604800000, 39] , [1326236400000, 43]]
    }],
    xaxis: {

    },
    tooltip: {
        intersect: true,
        shared: false
    },
    markers: {
        size: 6,
    }
}

var chart = new ApexCharts(document.querySelector("#chart"), options);

chart.render();
</script>
Run Code Online (Sandbox Code Playgroud)

apexcharts

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

apexcharts ×1