如何更改amcharts中的气球文本
How to change balloonText in amchart
我正在使用实时 amchart,我想将日期添加到气球文本,这是代码:
"balloonText": "<img src='javascripts/images/info.png' style='vertical-align:bottom; margin-right: 5px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span><img src='javascripts/images/time.png' style='vertical-align:bottom; margin-right: 5px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[category]]</b></span>",
我想在 [[category]] 旁边添加今天的日期,如何?
谢谢。
<b>[[category]]"+ new Date().toJSON().slice(0,10).replace(/-/g,'/') +"</b>
我正在使用实时 amchart,我想将日期添加到气球文本,这是代码:
"balloonText": "<img src='javascripts/images/info.png' style='vertical-align:bottom; margin-right: 5px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[value]]</b></span><img src='javascripts/images/time.png' style='vertical-align:bottom; margin-right: 5px; width:28px; height:21px;'><span style='font-size:14px; color:#000000;'><b>[[category]]</b></span>",
我想在 [[category]] 旁边添加今天的日期,如何? 谢谢。
<b>[[category]]"+ new Date().toJSON().slice(0,10).replace(/-/g,'/') +"</b>