我正在使用jquery jqplot(条形图)和ruby on rails应用程序。我将2012年4月的日期和美元金额发送到图表中。在工具栏上,鼠标悬停工具提示将日期显示为索引,即1,$200,2,$300而不是日期(2013年4月)。如何将此索引替换为date??其中date在x轴上,amount在Y轴上。下面是我的荧光笔代码:
highlighter:
show: true
showMarker: false
formatString: '<table class="jqplot-highlighter">
<tr><td><b>%s</b></td><td><b>%s</b></td>
</tr></table>'发布于 2013-05-03 15:26:31
这个JS是你添加的吗?
<script type="text/javascript" language="javascript" src="plugins/jqplot.dateAxisRenderer.js"></script>然后试试这个:
highlighter: {
tooltipAxes: 'y',
yvalues: 2,
formatString: '<table class="jqplot-highlighter">
<tr><td><b>%b</b></td><td><b>,%Y</b></td>
</tr></table>'
}More details.
https://stackoverflow.com/questions/16352183
复制相似问题