我想在jqplot中有一个工具提示悬停突出显示的东西.问题是我希望它在轴上提供更多细节.因此格式化程序应该是不同的.我无法显示秒数:
有一个JS FIDLE 这里!
我希望时间戳显示为小时:分钟:秒,这将是格式字符串'%H:%M:%S'或'%T'或'%X'.但是我该怎么做?
highlighter: {
show: true,
sizeAdjust: 3,
//useAxesFormatters: false,
//tooltipFormatString: '%H:%M:%S',
formatString: '<table class="jqplot-highlighter"><tr><td>tijd:</td><td>%s</td></tr><tr><td>snelheid:</td><td>%s</td></tr></table>',
},
Run Code Online (Sandbox Code Playgroud) 我有一个带有两条数据线的jqplot图表.只有一个应该启用荧光笔.我试过这个:
series:[
{
highlighter: {
formatString: "",
show: false
}
},
{
highlighter: {
formatString: "Day %s: %d",
show: true
}
}
]
Run Code Online (Sandbox Code Playgroud)
但不幸的是,这不起作用:荧光笔在第一行显示一个小空点,而它应该什么都不显示.
如何在一张图表上显示荧光笔而不在另一张图表上?
我正在尝试为线图获取自定义工具提示,因为我希望工具提示更详细地描述点而不是该点的值.(附图进一步解释了我的意思)
我已尝试过如何做到这一点.
以下是我的代码:
<script type="text/javascript"> $('#page3a').live('pageshow', function () {
var s1 = [1, 2, 3, 4, 5];
var s2 = ["Message 1", "Message 2", "Message 3", "Message 4", "Message 5"];
var lineGraph1 = $.jqplot('lineGraph1', [s1,s2], {
animate: true,
seriesDefault: {
showMarker: false,
pointLabels: { show: true }
},
grid: {
drawBorder: false,
drawGridlines: false,
background: '#eafaff',
shadow: false
},
axesDefaults: {
show: false,
showTicks: false,
showTickMarks: false
},
highlighter: {
show: true,
sizeAdjust: 8,
tooltipLocation: 'n',
tooltipAxes: 'piered',
formatString:'%s',
fadeTooltip: …Run Code Online (Sandbox Code Playgroud) 我已经和JQPlot一起工作了一个星期左右,我正在撞墙试图突出工作.我正在加载以下CSS和.js文件...
jquery.jqplot.min.css
jQueryCombined.css
...其他几个不相关的...
jquery-1.4.2.min.js
jquery-ui-1.8rc3.custom.min.js
jquery.tree.js
fancybox/jquery.fancybox-1.3.1.js
functions.js jquery.calendar
-widget.js
jquery.validate.min.js
validation-additional-methods.js
jquery.form.js
thickbox.js
jquery.jqplot.min.js
plugins/jqplot.canvasTextRenderer.min.js
plugins/jqplot.canvasAxisLabelRenderer.min.js
plugins/jqplot.dateAxisRenderer.min.js
plugins/jqplot.canvasAxisTickRenderer.min.js
plugins/jqplot.highlighter.min.js
plugins/jqplot.cursor .min.js
jquery.pstrength-min.1.2.js
jquery.qtip-1.0.0-rc3.min.js
fileuploader.js
这里是生成图形的JS:
function plotGraph628() { var line1 = [[1, 1.366556], [2, 1.317904], [3, 1.406245], [4, 1.590483], [5, 1.716111], [6, 1.815133], [7, 1.92456]]; var line2 = [[1, 1.36964213], [2, 1.35712154], [3, 1.36646157], [4, 1.35650663], [5, 1.54406956], [6, 1.78211369], [7, 1.86560989], [8, 1.94269674], [9, 1.81608062], [10, 2.03318191], [11, 1.58755349], [12, 1.42688531]]; var line3 = [[1, 1.4628504486138], [2, …Run Code Online (Sandbox Code Playgroud)