HTMLGraph: LabelsAppearance empty when value is zero

4 posts, 0 answers
  1. Blas
    Blas avatar
    55 posts
    Member since:
    Dec 2007

    Posted 04 Mar 2014 Link to this post

    Hi, 

    Is it possible to show an empty label when the column has a zero value? I've tried DataFormatString="{0:#}" but it doesn't work.



    <telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Height="550px" Style="left: 10px; right: 10px;"  >
        <PlotArea>
            
            <Series>
                <telerik:ColumnSeries DataFieldY="AcumuladoAnt"  Name="<%$Resources:htmlChartAnterior %>" >
                   <LabelsAppearance DataFormatString="{0:#}"></LabelsAppearance>
                    
                </telerik:ColumnSeries>
                <telerik:ColumnSeries DataFieldY="AcumuladoAct" Name="<%$Resources:htmlChartActual %>">
                     <LabelsAppearance DataFormatString="{0:#}" ></LabelsAppearance>
                </telerik:ColumnSeries>
            </Series>
            <XAxis DataLabelsField="Mes">
                <TitleAppearance Text="<%$Resources:htmlChartMes %>">
                    <TextStyle Margin="20" />
                </TitleAppearance>
                <MajorGridLines Visible="false" />
                <MinorGridLines Visible="false" />
            </XAxis>
            <YAxis>
                <TitleAppearance Text="<%$Resources:htmlChartImporte %>">
                    <TextStyle Margin="20" />
                </TitleAppearance>
                  
                <MinorGridLines Visible="false" />
            </YAxis>
        </PlotArea>
        <ChartTitle Text="<%$Resources:htmlChartTitle %>">
        </ChartTitle>
        <Legend>
            <Appearance BackgroundColor="White" Position="Bottom">
                <TextStyle Bold="false" FontFamily="Helvetica" Italic="false" Color="Black" FontSize="12"
                    Margin="0" Padding="0" />
            </Appearance>
        </Legend>
    </telerik:RadHtmlChart>

    Here is a screenshot of the graph.

    Thank you
    Roberto

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1493 posts

    Posted 05 Mar 2014 Link to this post

    Hi Roberto,

    Can you try to upgrade your version of Telerik UI to the latest official one - 2014.1.225 and then tell us whether the labels for zero items are displayed?

    Regards,
    Danail Vasilev
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Blas
    Blas avatar
    55 posts
    Member since:
    Dec 2007

    Posted 05 Mar 2014 in reply to Danail Vasilev Link to this post

    Hi Danail

    It's the version I have, and I didn't noticed this behavior before I've installed it.

    Regards
    Roberto
  5. Jim
    Jim avatar
    6 posts
    Member since:
    Feb 2013

    Posted 28 Mar 2014 Link to this post

    I'm seeing something very similar on the latest version if one of the dates on the xaxis does not have values for any of the three column series in the chart.
Back to Top