Jump to content
Software FX Community

How to remove extra space in Pie chart?


User (Legacy)

Recommended Posts

My code has following lines to generate the Pie chart. I set all gaps to 0.

Still, the chart has extra space on its all sides (i.e. top, bottom, left &

right).

How to get rid of this extra space?

Thanks.

myGraph.AllowEdit = False

myGraph.Chart3D = False

myGraph.Gallery = ChartFX.Gallery.Pie

myGraph.BackColor = System.Drawing.Color.White

myGraph.Palette = "Default.ChartFX6"

myGraph.Border = True

myGraph.BorderStyle = ChartFX.BorderType.None

myGraph.AxesStyle = ChartFX.AxesStyle.None

myGraph.OpenData(ChartFX.COD.Values, 1, 2)

myGraph.Value(0, 0) = CType(BigInUse, Double)

myGraph.Value(0, 1) = CType(BigTotal - BigInUse, Double)

myGraph.CloseData(ChartFX.COD.Values)

Dim myPie As SoftwareFX.ChartFX.Internet.Server.GalleryObj.Pie =

myGraph.GalleryObj

myPie.ExplodingMode =

SoftwareFX.ChartFX.Internet.Server.GalleryObj.ExplodingMode.Last

myPie.SliceSeparation = 20

myGraph.LeftGap = 0

myGraph.RightGap = 0

myGraph.TopGap = 0

myGraph.BottomGap = 0

Link to comment
Share on other sites

A few things:

1) Zero (0) in the gaps means "auto", assign 1 for minimum gap

2) The volume property also affects the size of the Pie chart as a

percentage of the total space

4) The Pie chart is circular (same with and height) while the chart area may

be rectangular.

To obtain the maximum Pie size:

chart.LeftGap = 1;

chart.TopGap = 1;

chart.RightGap = 1;

chart.BottomGap = 1;

chart.Volume = 100;

--

FP

Software FX Support

"Hetal Shah" <hshah@turnstone.com> wrote in message

news:#Mx2YkXoCHA.2684@webserver1.softwarefx.com...

> My code has following lines to generate the Pie chart. I set all gaps to

0.

> Still, the chart has extra space on its all sides (i.e. top, bottom, left

&

> right).

>

>

> How to get rid of this extra space?

>

> Thanks.

>

> myGraph.AllowEdit = False

> myGraph.Chart3D = False

> myGraph.Gallery = ChartFX.Gallery.Pie

> myGraph.BackColor = System.Drawing.Color.White

> myGraph.Palette = "Default.ChartFX6"

> myGraph.Border = True

> myGraph.BorderStyle = ChartFX.BorderType.None

> myGraph.AxesStyle = ChartFX.AxesStyle.None

> myGraph.OpenData(ChartFX.COD.Values, 1, 2)

> myGraph.Value(0, 0) = CType(BigInUse, Double)

> myGraph.Value(0, 1) = CType(BigTotal - BigInUse, Double)

> myGraph.CloseData(ChartFX.COD.Values)

> Dim myPie As SoftwareFX.ChartFX.Internet.Server.GalleryObj.Pie =

> myGraph.GalleryObj

> myPie.ExplodingMode =

> SoftwareFX.ChartFX.Internet.Server.GalleryObj.ExplodingMode.Last

> myPie.SliceSeparation = 20

>

> myGraph.LeftGap = 0

> myGraph.RightGap = 0

> myGraph.TopGap = 0

> myGraph.BottomGap = 0

>

>

>

PieChart.bmp

Link to comment
Share on other sites

  • 6 years later...
  • 1 month later...

Hi,

I am not sure about which line you want to get rid of. Could you please post a screenshot showing this line?

In regard to your second question, unfortunately, there is no built-in feature to enable label-wrapping. However, as a workaround you can specify a line break (\n) when defining a value for the text property of the point class:

Chart1.AllSeries.PointLabels.Format = "%L";Chart1.Points[0, 0].Text = "Line1 \n Line 2";

Regards,

RandyJ

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...