如何通过单击工具提示访问 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>