我在带有向导行的程序中使用AmCharts。 我用一些值测试的这些指导方针,请参见下面的代码。
"guides": [{
"value": 17.3,
"toValue": 17.3,
"lineColor": "#FF3C1E",
"balloonText": "17.3",
"fillAlpha": 1,
"fillColor": "#FF3C1E",
"position": "right",
"label": "Max grens"
}, {
"value": 16.5,
"toValue": 16.5,
"lineColor": "#CCF500",
"balloonText": "16.5",
"fillAlpha": 1,
"fillColor": "#CCF000",
"position": "right",
"label": "Target"
}, {
"value": 15.2,
"toValue": 15.2,
"lineColor": "#FF3C1E",
"balloonText": "15.2",
"fillAlpha": 1,
"fillColor": "#FF3C1E",
"position": "right",
"label": "Min grens"
}],
我尝试将会话值变成这样:"value": <?php $_SESSION["RMFRtarget"]; ?>,
但这不起作用。
有人可以帮我吗,我有点坚持。
答案 0 :(得分:1)
忘记我的评论。您只是忘了回显会话变量的值:
"value": <?php echo $_SESSION["RMFRtarget"]; ?>