Completed
Last Updated: 28 Jul 2015 08:17 by Rommel
ADMIN
Danail Vasilev
Created on: 12 Mar 2014 13:08
Category: HtmlChart
Type: Bug Report
3
FIX the decimal parsing of string data source fields bound to the RadHtmlChart
String data source fields in the RadHtmlChart that contain only numeric characters should not be parsed to decimal. Also when such a string starts with the 0 character, it is omitted. For example the "0" item in the legend is not displayed with the example below:
ASPX:

        <telerik:RadHtmlChart runat="server" ID="PieChart1" Width="800" Height="500" Transitions="true">
            <Appearance>
                <FillStyle BackgroundColor="White"></FillStyle>
            </Appearance>
            <ChartTitle Text="Browser Usage for April 2012">
                <Appearance Align="Center" BackgroundColor="White" Position="Top">
                </Appearance>
            </ChartTitle>
            <Legend>
                <Appearance BackgroundColor="White" Position="Right" Visible="true">
                </Appearance>
            </Legend>
            <PlotArea>
                <Appearance>
                    <FillStyle BackgroundColor="White"></FillStyle>
                </Appearance>
                <Series>
                    <telerik:PieSeries StartAngle="90" DataFieldY="code_count" NameField="items_names">
                        <LabelsAppearance Position="OutsideEnd" DataFormatString="{0} %">
                        </LabelsAppearance>
                        <TooltipsAppearance Color="White" DataFormatString="{0} %"></TooltipsAppearance>
                    </telerik:PieSeries>
                </Series>
            </PlotArea>
        </telerik:RadHtmlChart>

C#:

using System.Data;

    protected void Page_Load(object sender, EventArgs e)
    {
        PieChart1.DataSource = GetData();
        PieChart1.DataBind();
    }

    protected DataTable GetData()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add("ID", typeof(int));
        dt.Columns.Add("code_count", typeof(int));
        dt.Columns.Add("items_names", typeof(string));

        dt.Rows.Add(1, 771, "0");
        dt.Rows.Add(2, 187, "1");
        dt.Rows.Add(3, 178, "2");
        dt.Rows.Add(4, 60, "3");

        return dt;
    }
1 comment
Rommel
Posted on: 21 Jul 2015 00:39
Has this been addressed yet?