This is a migrated thread and some comments may be shown as answers.

HTMLGraph: LabelsAppearance empty when value is zero

3 Answers 80 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Blas
Top achievements
Rank 1
Blas asked on 04 Mar 2014, 05:20 PM
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

3 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 05 Mar 2014, 02:23 PM
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!

0
Blas
Top achievements
Rank 1
answered on 05 Mar 2014, 05:11 PM
Hi Danail

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

Regards
Roberto
0
Jim
Top achievements
Rank 1
answered on 28 Mar 2014, 09:46 PM
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.
Tags
Chart (HTML5)
Asked by
Blas
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Blas
Top achievements
Rank 1
Jim
Top achievements
Rank 1
Share this question
or