是否可以在指南行 AmCharts 中使用会话值?
Is it possible to use session value in guides line AmCharts?
我在带有参考线的程序中使用 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"]; ?>,
但这不起作用。
谁能帮帮我,我有点卡住了。
忘了我的评论吧。您只是忘记了回显会话变量的值:
"value": <?php echo $_SESSION["RMFRtarget"]; ?>
我在带有参考线的程序中使用 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"]; ?>,
但这不起作用。
谁能帮帮我,我有点卡住了。
忘了我的评论吧。您只是忘记了回显会话变量的值:
"value": <?php echo $_SESSION["RMFRtarget"]; ?>