2

是否可以在图例中显示标签及其值?

4

2 回答 2

4

You can do it and more in jqPlot:

  1. Easiest: Set labels element of legend to an array of Strings that will be displayed in your legend, shown here.
  2. Do it yourself, as it is shown in the sample, attached to this answer. There I used $.jqplot.postDrawHooks to act when graph is finished, since I also needed to do some customization of the legend labels, so I went all the way (i.e. I didn't set the labels element).
于 2012-06-23T08:39:55.060 回答
1
<script src="JqPloatChart/plugins/jqplot.pointLabels.js"></script>
seriesDefaults: {renderer: $.jqplot.BarRenderer,pointLabels: { show: true },rendererOptions: {showDataLabels: true,}},
于 2016-07-27T12:00:51.820 回答