Pie chart graphics is not shown

Thread is closed for posting
6 posts, 0 answers
  1. Carlos
    Carlos avatar
    3 posts
    Member since:
    Sep 2012

    Posted 21 Sep 2012 Link to this post

    Hi, I'm working on an app asp.net and using radchart control in it, I wrote the next test code:

    HTML
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div>
            <telerik:RadChart ID="chrChart" runat="server" >
                <PlotArea>
                    <EmptySeriesMessage  Visible="True">
                        <Appearance Visible="True">
                        </Appearance>
                    </EmptySeriesMessage>
                </PlotArea>
            </telerik:RadChart>
        </div>
    </form>

    vb.net code

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        chrChart.Clear()
        chrChart.AutoLayout = True
        chrChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = New Font("Arial", 10)
        chrChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black
        chrChart.PlotArea.XAxis.AutoScale = False
        Dim loDataSeries As New ChartSeries("Chart test", ChartSeriesType.Bar)
        loDataSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels
        Dim myItem1 As New ChartSeriesItem(10, "myitem1")
        myItem1.Name = "myitem1"
        Dim myItem2 As New ChartSeriesItem(20, "myitem2")
        myItem2.Name = "myitem2"
        loDataSeries.AddItem(myItem1)
        loDataSeries.AddItem(myItem2)
        chrChart.AddChartSeries(loDataSeries)
    End Sub

    this code showed the bar chart correctly, but When I changed the ChartSeriesType to Pie, the graphics is not shown, (see image attached).
    Dim loDataSeries As New ChartSeries("Chart test", ChartSeriesType.PIE)

    When I comment the next code:

    'chrChart.PlotArea.XAxis.AutoScale = False

    I get the next exception

        Unable to cast object of type 'Telerik.Charting.ChartXAxis' to type 'Telerik.Charting.ChartYAxis'.

    regardless if the  ChartSeriesType is Bar or Pie, I get the error.

    What am I doing wrong?

    This is my web.config file:

    <?xml version="1.0"?>
    <configuration>
      <appSettings>
        <add key="Telerik.Skin" value="Metro"/>
        <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>
      </appSettings>
      <system.web>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </assemblies>
        </compilation>
        <pages>
          <controls>
            <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
          </controls>
        </pages>
        <httpHandlers>
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
        </httpHandlers>
        <httpModules>
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="RadCompression"/>
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
        </modules>
        <handlers>
          <remove name="ChartImage_axd"/>
          <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
          <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
          <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_RadUploadProgressHandler_ashx"/>
          <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik.Web.UI.WebResource"/>
          <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
        </handlers>
      </system.webServer>
     
      <location path="Telerik.Web.UI.WebResource.axd">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="ChartImage.axd">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location
    </configuration>


    This problem didn't happen when I used the build 2012_1_215, this problem ocurred to me with the build  2012_2_918

    any help solving this topic is appreciate, I need purchase this controls immediately.

    kind regards.

  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 26 Sep 2012 Link to this post

    Hi Carlos,

    I have examined your code and created a test project, but unfortunately I couldn't reproduce your problems. As far as I know there are no changes in the RadChart codebase between these 2 versions you mentioned that could cause your issues. 

    Please examine the attached project and check for any inconsistencies with yours. I hope this will help.

    All the best,
    Petar Kirov
    the Telerik team

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter
    Peter avatar
    2 posts
    Member since:
    Jul 2012

    Posted 26 Sep 2012 Link to this post

    I have tested sample program using version 2012.2.925.40 and it still have same problem. I refer the component in download folder.
  5. Carlos
    Carlos avatar
    3 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2012 Link to this post

    Thanks for you response, I have loaded the assembly that you put in the example project, and it's worked, the assembly
    that I downloaded from your page seems to be faulty for it doesn't work eather in my project or yours, it should be noted that the size of telerik bin in my project is different that yours, but is the same version(in a few bytes).
  6. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 01 Oct 2012 Link to this post

    Hello,

    We have been able to identify the cause for this error and the fix will be available with this week's latest internal build which you can download from your account. 

    Kind regards,
    Petar Kirov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Carlos
    Carlos avatar
    3 posts
    Member since:
    Sep 2012

    Posted 02 Oct 2012 Link to this post

    Great, Thank you very much for your technical support.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017