1

I am using jqplot to display graphs/charts. I want to display a small pie-chart.

So I have fixed the 'height x width' of the div to 100 x 100. Here's how the pie-chart is displayed.

enter image description here

There are extra spaces/padding around the pie. I don't want that. Also how can I remove the canvas from the background. Such that only the pie-chart is displayed.

Any help would be appreciated.

Thanks in advance

Anish Nair
  • 3,238
  • 29
  • 41

2 Answers2

2

To remove the background(canvas), you need to set the following:

grid: { backgroundColor: 'transparent', drawBorder: false, shadow: false }

This will remove the background-canvas(also its border shadow) and also the shadow of the pie.

Hope it helps.

Anish Nair
  • 3,238
  • 29
  • 41
1

From the jqplot documentation:

$.jqplot.PieRenderer Plugin renderer to draw a pie chart.
Properties
padding padding between the pie and plot edges, legend, etc.

Mark
  • 106,305
  • 20
  • 172
  • 230
  • And what about removing the canvas? Any idea? – Anish Nair Nov 19 '12 at 07:38
  • 1
    What do you mean by "canvas"? The border and shadow around the plot? Look at the properties of the "grid": http://www.jqplot.com/docs/files/jqplot-core-js.html#Grid.Properties, background and drawBorder would probably help you. – Mark Nov 19 '12 at 15:04
  • To remove the background(canvas), you need to set the following: grid: { backgroundColor: 'transparent', drawBorder: false, shadow: false } This will remove the background and also the shadow of the pie – Anish Nair Dec 15 '12 at 06:10
  • can i change size of length of area graph ? ? – Smoke Jul 05 '14 at 10:27