2
是否可以在圖例中顯示標籤的值?jqplot - 如何在圖例中顯示標籤的值?
是否可以在圖例中顯示標籤的值?jqplot - 如何在圖例中顯示標籤的值?
可以在jqPlot
做多:
legend
labels
元素字符串數組將顯示在你的傳奇,shown here。$.jqplot.postDrawHooks
來完成圖表的操作,因爲我還需要對圖例標籤進行一些定製,所以我一路走過去(即我沒有設置labels
元素)。<script src="JqPloatChart/plugins/jqplot.pointLabels.js"></script>
seriesDefaults: {renderer: $.jqplot.BarRenderer,pointLabels: { show: true },rendererOptions: {showDataLabels: true,}},
請加 的文件,並寫入渲染jqplot選項。 –
儘管此代碼片段可能會解決問題,但[包括解釋](// meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers)確實有助於提高帖子的質量。請記住,您將來會爲讀者回答問題,而這些人可能不知道您的代碼建議的原因。也請儘量不要使用解釋性註釋來擠佔代碼,因爲這會降低代碼和解釋的可讀性! – FrankerZ