2012-06-23 66 views

回答

4

可以在jqPlot做多:

  1. 最容易:設置legendlabels元素字符串數組將顯示在你的傳奇,shown here
  2. 自己動手,如樣本attached to this answer所示。在那裏,我使用$.jqplot.postDrawHooks來完成圖表的操作,因爲我還需要對圖例標籤進行一些定製,所以我一路走過去(即我沒有設置labels元素)。
1
<script src="JqPloatChart/plugins/jqplot.pointLabels.js"></script> 
seriesDefaults: {renderer: $.jqplot.BarRenderer,pointLabels: { show: true },rendererOptions: {showDataLabels: true,}}, 
+0

請加 的文件,並寫入渲染jqplot選項。 –

+0

儘管此代碼片段可能會解決問題,但[包括解釋](// meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers)確實有助於提高帖子的質量。請記住,您將來會爲讀者回答問題,而這些人可能不知道您的代碼建議的原因。也請儘量不要使用解釋性註釋來擠佔代碼,因爲這會降低代碼和解釋的可讀性! – FrankerZ

相關問題