我尝试为jqPlot创建图例,但它们只会显示y斜率的最大值和最小值。就像“Max: 16 Min:2”一样,但我想不出是怎么回事。例如,我试着给标签如下
var labels = [{'Max':16}, {'Min':2}];但似乎什么都不起作用。你知道有什么快速的方法吗,或者我应该为这个创建我自己的特殊渲染器?谢谢。
发布于 2012-03-18 18:39:49
乌夫丘克。我也遇到了同样的问题,我通过以下方式解决了这个问题:
$("#hereGoesMyMinValue").text($("#myGraphId").
children(".jqplotxaxis").children(":first").text());
//first value shown
$("#hereGoesMyMaxValue").text($("#myGraphId").
children(".jqplot-xaxis").children(":last").text());
//last value shown请注意,此操作只会执行一次。Here解释了如何同步它们
顺便说一下,您还可以执行以下操作:
var title=$("#selecting_period").children(".jqplot-title").text();
var coolTitle=
title+": Showing "+ $("#myGraphId").children(".jqplot-xaxis").
children(":first").text()+" to "+$("#myGraphId").
children(".jqplot-xaxis").children(":last").text();
$("#myGraphId").children(".jqplot-title").text(coolTitle);https://stackoverflow.com/questions/9533184
复制相似问题