Apexcharts 更新系列
Apexcharts update series
我想更改我的小部件,但我只想更改
series: [<?php echo $data['campaign']['0']->report_summary->open_rate * 100?>],
对于新数据,我得到了类似系列的内容:[100],但这不起作用
$(document).ready(function () {
var element = document.getElementById("kt_mixed_widget_18_chart");
var height = parseInt(KTUtil.css(element, 'height'));
if (!element) {
return;
}
var options = {
series: [<?php echo $data['campaign']['0']->report_summary->open_rate * 100?>],
chart.updateOptions([{
series: [newData]
}]);
这成功了!
ApexCharts.exec('chart_id', 'updateSeries', [5]);
我想更改我的小部件,但我只想更改
series: [<?php echo $data['campaign']['0']->report_summary->open_rate * 100?>],
对于新数据,我得到了类似系列的内容:[100],但这不起作用
$(document).ready(function () {
var element = document.getElementById("kt_mixed_widget_18_chart");
var height = parseInt(KTUtil.css(element, 'height'));
if (!element) {
return;
}
var options = {
series: [<?php echo $data['campaign']['0']->report_summary->open_rate * 100?>],
chart.updateOptions([{
series: [newData]
}]);
这成功了!
ApexCharts.exec('chart_id', 'updateSeries', [5]);