Hello I have a barchart that works great when I have multiple result, (multiple bars)
But when I only have one results, it shows one bar that takes the entire width of the chart and there is no label on the x-axis.
Thanks for your help
Hello Arnold,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
With the code
<igchart:UltraChart ID="UC3" 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="199px" Width="450px" BackColor="#EAEAEA"
datasourceid="SqlDS_monthlydefect" Visible="False" >
<TitleTop HorizontalAlign="Center"
Font="Microsoft Sans Serif, 9.75pt, style=Bold" Extent="13">
<Margins Bottom="0" Left="0" Right="0" Top="0" />
</TitleTop>
<Tooltips Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" />
<TitleBottom HorizontalAlign="Center" Text="Month of Production" Extent="13"
Location="Bottom" Font="Verdana, 8pt, style=Bold">
<Margins Bottom="0" Top="0" left="0" right="0" />
</TitleBottom>
<Border Thickness="0" />
<Data UseMinMax="True" ZeroAligned="True"></Data><TitleLeft HorizontalAlign="Center" Text="Claims"
Visible="True" Extent="13"
Location="Left" Font="Microsoft Sans Serif, 9.75pt, style=Bold">
<Margins Left="0" Right="0" Bottom="0" Top="0" />
</TitleLeft>
<ColorModel AlphaLevel="150" ModelStyle="CustomSkin">
<Skin ApplyRowWise="False">
<PEs>
<igchartprop:PaintElement ElementType="Gradient" Fill="Blue"
FillGradientStyle="HorizontalBump"
FillStopColor="White" />
<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="40" RangeMax="1000" RangeType="Custom">
<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, 10pt" FormatString="<SERIES_LABEL:MMM-yy>"
HorizontalAlign="Center" Orientation="VerticalLeftFacing"
VerticalAlign="Center">
<Layout Behavior="Auto">
</Layout>
</SeriesLabels>
</Labels>
</X>
<Y LineThickness="1" TickmarkInterval="40" TickmarkStyle="Smart" Visible="True"
Extent="30">
<MajorGridLines AlphaLevel="255" Color="DarkGray" DrawStyle="Dot" Thickness="1"
Visible="True" />
<Labels Font="Verdana, 10pt" HorizontalAlign="Far"
ItemFormatString="<DATA_VALUE:0.##>" Orientation="Horizontal"
<SeriesLabels Font="Verdana, 10pt" HorizontalAlign="Center"
Orientation="VerticalLeftFacing" VerticalAlign="Center">
</Y>
<Y2 LineThickness="1" TickmarkInterval="40" TickmarkStyle="Smart"
Visible="False">
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near"
ItemFormatString="<DATA_VALUE:00.##>" Orientation="Horizontal"
<SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Center"
</Y2>
<X2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart"
<Labels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Far"
Orientation="Horizontal" VerticalAlign="Center">
</X2>
<Z LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart" Visible="False">
ItemFormatString="" Orientation="Horizontal" VerticalAlign="Center">
<SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Center"
</Z>
<Z2 LineThickness="1" TickmarkInterval="0" TickmarkStyle="Smart"
</Z2>
</Axis>
<ColumnChart SeriesSpacing="0">
<ChartText>
<igchartprop:ChartTextAppearance ChartTextFont="Arial, 10pt" Column="-2"
ItemFormatString="<DATA_VALUE:0>" Row="-2" VerticalAlign="Far"
</ChartText>
</ColumnChart>
<Legend AlphaLevel="140" Location="Bottom" SpanPercentage="8">
<Margins Top="0" Bottom="0" Left="0" Right="0" />
</Legend>
</igchart:UltraChart>
Thank you for the provided code snippet!
However I was not able to reproduce the behavior that you're seeing on your side. I have attached the sample project I used to test this. Please test this project on your side; whether or not it works correctly may help indicate the nature of this issue. If this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.