0

Hi I have got a pie chart which is generated using jqPlot. But the jqPlot area is covering the whole width of the page. I want to show that only at the left half of the page. Can any on please provide me a little help to do this. My code is given below-

var plot2 = jQuery.jqplot ('month_record', [data], 
{ 
  title: "Records saved per month in the previous year",
  seriesDefaults: {
    // Make this a pie chart.
    renderer: jQuery.jqplot.PieRenderer, 
    rendererOptions: {
      // Put data labels on the pie slices.
      showDataLabels: true,
      startAngle:-90,
      dataLabels: monthRecord,
      dataLabelFormatString:'%d',

    }
  }, 
  legend: { show: true, location: 'e' }
}

);

4

1 回答 1

3

jqPlot 使用容器的高度/宽度<div>来设置绘图尺寸。

<div id="chart" style="width: 400px; height: 260px;" class="jqplot-target">
    <!-- plot will render here with the above dimensions -->
</div>
于 2012-08-14T15:21:57.810 回答