2 つの配列を取得する必要がある jqchart でグラフを作成したい
今、私は以下のように操作を実行したい.もちろんエラーを出している.
html
$.ajax(
{
type: "GET",
url: "customer_coverage.php",
data: {id:id},
contentType: "application/json",
dataType: "json",
success: function (data21,data22) {
initChart2(data21,data22);
}
});
function initChart2(data21,data22) {
$('#jqChart2').jqChart({
series: [
{
type: 'column',
title: 'no of days ',
data:data21,
},
{
type: 'column',
title: 'no of days ',
data:data22,
},
]
});
}
ここにPHPコード
echo json_encode($arr1);
echo json_encode($arr2);
誰でもそれを行う方法を知っていますか?