Hello,I have couples Stackcolumn chart, they all work great except one that does not stack the data but only shows a chart like a regular column chart. I am very confused as I bind them the same wayAnyhow,Here is the Data that I bind to the chart:
DEFECT QtyA QtyBdefecta 8 0defectb 6 4defectc 0 3
Please let me know if you have any idea of what I could be doing wrong.
Thanks
It's hard to tell without seeing your code. Can you post the code you used to create these charts?
Binding to this data should be fairly simple:
DataTable dt = new DataTable();dt.Columns.Add("col1", typeof(int));dt.Columns.Add("col2", typeof(int));dt.Rows.Add(new object[] { 8, 0 });dt.Rows.Add(new object[] { 6, 4 });dt.Rows.Add(new object[] { 0, 3 });ultraChart1.ChartType = ChartType.StackColumnChart;ultraChart1.Data.DataSource = dt;ultraChart1.Data.DataBind();
Hi,The way I databind the chart is fairly simple:DataTable table4 = data.getClaimsByDefectByCommodityPerAcceptReject()UltraChart4.Data.DataSource = table4;UltraChart4.Data.DataBind();This query return table with 3 column, first column is the defect name and the 2 other column are values. I ran this query seperately and I am sure about the return.
Below is the html code :
<igchart:UltraChart ID="UltraChart4" runat="server" BackgroundImageFileName=""
BorderColor="Black" BorderWidth="1px"
EmptyChartText="Data Not Available. Please call UltraChart.Data.DataBind() after setting valid Data.DataSource"
Version="8.2" Height="557px" Width="1024px"
ChartType="StackColumnChart">
<TitleTop HorizontalAlign="Center"
Text="BMW E7x Warranty Parts analyzed at Fountain Inn GLOVE-BOX Status"
Font="Microsoft Sans Serif, 9.75pt, style=Bold">
</TitleTop>
<Tooltips Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" />
<TitleBottom HorizontalAlign="Center" Extent="33"
Location="Bottom" Visible="False">
</TitleBottom>
<Data UseMinMax="True"></Data><TitleLeft HorizontalAlign="Center" Text="Claims" Visible="True" Extent="30"
Location="Left" Font="Microsoft Sans Serif, 9.75pt, style=Bold">
</TitleLeft>
<TitleRight Extent="30" Location="Right" Visible="True">
</TitleRight>
<ColorModel AlphaLevel="150" ModelStyle="CustomSkin">
<Skin ApplyRowWise="False">
<PEs>
<igchartprop:PaintElement ElementType="Gradient" Fill="Blue"
FillGradientStyle="ForwardDiagonal" FillOpacity="111"
FillStopColor="LightSkyBlue" />
<igchartprop:PaintElement ElementType="Gradient" Fill="108, 162, 36" FillGradientStyle="Horizontal"
FillStopColor="148, 244, 17">
</igchartprop:PaintElement>
</PEs>
</Skin>
</ColorModel>
<Axis>
<PE ElementType="None" Fill="Cornsilk" />
<X LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="True"
Extent="30">
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot"
Thickness="1" Visible="True" />
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot"
Thickness="1" Visible="False" />
<Labels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Near"
ItemFormatString="<ITEM_LABEL>" Orientation="VerticalLeftFacing"
VerticalAlign="Center" Visible="False">
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Center"
Orientation="Horizontal" VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</X>
<Y LineThickness="1" TickmarkInterval="200" TickmarkStyle="Smart"
Visible="True" Extent="30">
<Labels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Far"
ItemFormatString="<DATA_VALUE:00.##>" Orientation="Horizontal"
VerticalAlign="Center">
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" FormatString=""
HorizontalAlign="Far" Orientation="Horizontal" VerticalAlign="Center">
</Y>
<Y2 LineThickness="1" TickmarkInterval="200" TickmarkStyle="Smart"
Visible="False">
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near"
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" FormatString=""
HorizontalAlign="Near" Orientation="Horizontal" VerticalAlign="Center">
</Y2>
<X2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart"
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Far"
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Far"
Orientation="VerticalLeftFacing" VerticalAlign="Center">
</X2>
<Z LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
ItemFormatString="" Orientation="Horizontal" VerticalAlign="Center">
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Near"
</Z>
<Z2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart"
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near"
</Z2>
</Axis>
<ColumnChart ColumnSpacing="1">
<ChartText>
<igchartprop:ChartTextAppearance ChartTextFont="Arial, 7pt" Column="-1"
ItemFormatString="<DATA_VALUE:0>" Row="-1" VerticalAlign="Far"
Visible="True" />
</ChartText>
</ColumnChart>
<Legend AlphaLevel="140" Location="Bottom" SpanPercentage="8" Visible="True">
<Margins Top="0" Bottom="0" Left="0" Right="0" />
</Legend>
</igchart:UltraChart>