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
4110
Simple Pie chart only shows 100 percent
posted

I have a simple pie chart (see code below) with two data columns column1=79.48 and column2=20.52, however, when the chart is rendered, it only displays a single slice of 100.00%. I am using a datatable with two fields. Am I just not referencing or assigning something properly?

<igchart:UltraChart ID="igPieChart" runat="server" BackgroundImageFileName="" BorderColor="Black"
BorderWidth="1px" ChartType="PieChart3D" EmptyChartText="Data Not Available. Please call UltraChart.Data.DataBind() after setting valid Data.DataSource"
Section508Compliant="True" Style="position: relative"
Version="8.1">
<PieChart3D BreakAllSlices="True" BreakOthersSlice="True">
<ChartText>
<igchartprop:ChartTextAppearance ChartTextFont="Arial, 7pt" Column="-2" ItemFormatString="&lt;DATA_VALUE:00.00&gt;"
Row="-2">
</igchartprop:ChartTextAppearance>
</ChartText>
</PieChart3D>
<ColorModel AlphaLevel="255" ColorBegin="Pink" ColorEnd="DarkRed" ModelStyle="CustomLinear">
</ColorModel>
<Effects>
<Effects>
<igchartprop:GradientEffect>
</igchartprop:GradientEffect>
</Effects>
</Effects>
<Axis>
<Z LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Far" ItemFormatString=""
Orientation="Horizontal" VerticalAlign="Center" Visible="False">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Far" Orientation="Horizontal"
VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</Z>
<Y2 LineThickness="1" TickmarkInterval="10" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near" ItemFormatString=""
Orientation="Horizontal" VerticalAlign="Center" Visible="False">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" FormatString="" HorizontalAlign="Near"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</Y2>
<X LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Near" ItemFormatString="&lt;ITEM_LABEL&gt;"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" FormatString="" HorizontalAlign="Near"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</X>
<Y LineThickness="1" TickmarkInterval="10" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Far" ItemFormatString="&lt;DATA_VALUE:00.##&gt;"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" FormatString="" HorizontalAlign="Far"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</Y>
<X2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Far" ItemFormatString=""
Orientation="Horizontal" VerticalAlign="Center" Visible="False">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" FormatString="" HorizontalAlign="Far"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</X2>
<PE ElementType="None" Fill="Cornsilk" />
<Z2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot" Thickness="1"
Visible="False" />
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near" ItemFormatString=""
Orientation="Horizontal" VerticalAlign="Center" Visible="False">
<Layout Behavior="Auto">
</Layout>
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near" Orientation="Horizontal"
VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</Z2>
</Axis>
<Legend Location="Bottom"></Legend>
<Data ZeroAligned="True">
</Data>
</igchart:UltraChart>

  • 4110
    posted

    That was it. I knew I had to be overlooking something simple, I just couldn't see it. I've not done alot of charting. Thanks for the great response & for responding so quickly.

     

  • 28496
    Verified Answer
    Offline posted

    try toggling the value of the igPieChart.Data.SwapRowsAndColumns.  set it to "True."  the default setting is "False," and by default it expects a table with one column and multiple rows.