Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
755
How to reduce the margin around a pie chart
posted

I've defined a Pie Chart whith MaxWidth = 200 and MaxHeight = 200.  The chart appears verry small with a blank space all around of it.  How can I reduce the martin of the chart.  I have the same probleme with a Column Chart. 

<
igCA:XamChart Grid.Row="1" Grid.Column="0"

Name="pieChartCtrl" View3D="True"

HorizontalAlignment="Stretch"

VerticalAlignment="Stretch" MaxWidth="200"

MaxHeight="200">

<igCA:XamChart.Legend>

<igCA:Legend Visible="False"/>

</igCA:XamChart.Legend>

<igCA:XamChart.Series >

<igCA:Series Name="pieChartSeries" ChartType="Pie">

</igCA:Series>

</igCA:XamChart.Series>

<igCA:XamChart.Transform3D>

<Transform3DGroup>

<RotateTransform3D >

<RotateTransform3D.Rotation>

<AxisAngleRotation3D Angle="-40" Axis="1,0,0"/>

</RotateTransform3D.Rotation>

</RotateTransform3D>

</Transform3DGroup>

</igCA:XamChart.Transform3D>

 

</igCA:XamChart>

  • 28496
    Offline posted

     this is sort of a hack, but you can use the 3d transform to reclaim some of that space.  sample code below.  if you want to request this as a supported feature, please visit http://devcenter.infragistics.com/protected/requestfeature.aspx

            <igCA:XamChart  Background="Pink"
                Name="pieChartCtrl"
                View3D="True"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                MaxWidth="200"
                MaxHeight="200">
                <igCA:XamChart.Legend>
                    <igCA:Legend Visible="False"/>
                </igCA:XamChart.Legend>
                <igCA:XamChart.Series>
                    <igCA:Series Name="pieChartSeries" ChartType="Pie">
                        <igCA:Series.DataPoints>
                            <igCA:DataPoint Value="1" />
                            <igCA:DataPoint Value="1" />
                            <igCA:DataPoint Value="1" />
                        </igCA:Series.DataPoints>
                    </igCA:Series>
                </igCA:XamChart.Series>
                <igCA:XamChart.Transform3D>
                    <Transform3DGroup>
                        <RotateTransform3D >
                            <RotateTransform3D.Rotation>
                                <AxisAngleRotation3D Angle="-40" Axis="1,0,0"/>
                            </RotateTransform3D.Rotation>
                        </RotateTransform3D>
                        <ScaleTransform3D ScaleX="1.75" ScaleY="2.0" ScaleZ="1.5"></ScaleTransform3D>
                        <TranslateTransform3D OffsetY=".4" />
                    </Transform3DGroup>
                </igCA:XamChart.Transform3D>

            </igCA:XamChart>