Chart in DotNetNuke

Thread is closed for posting
7 posts, 0 answers
  1. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 18 Jun 2009 Link to this post

    I am in the process of upgrading a fairly large project from the asp.net suite to the ajax suite, and have hit a rather strange bug.

    I am attempting to upgrade the chart control and to test the functioanlity I am attempting to display a very simple graph from the demo's page

    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %> 
     
    <telerik:RadChart runat="server" Width="500px" ID="RadChart2" Skin="LightGreen" > 
         <Series> 
         <telerik:ChartSeries Name="series 1" Type="Bar">  
         <Items> 
         <telerik:ChartSeriesItem YValue="5" /> 
         <telerik:ChartSeriesItem YValue="50" /> 
         <telerik:ChartSeriesItem YValue="500" /> 
         <telerik:ChartSeriesItem YValue="5000" /> 
         </Items> 
         </telerik:ChartSeries> 
         </Series> 
         <PlotArea> 
         <Appearance> 
         </Appearance> 
                <YAxis IsLogarithmic="true">  
                </YAxis> 
         </PlotArea> 
            <ChartTitle> 
                <TextBlock Text="Logarithmic Axis">  
                    <Appearance TextProperties-Color="70, 143, 190">  
                    </Appearance> 
                </TextBlock> 
            </ChartTitle> 
    </telerik:RadChart> 

    The problem is when I try to display this in a ascx file I get the 'Error loading radchart image' message box... The strange thing is that when I copy the above code to an aspx file on the same site it works perfectly - which I guess indicates that the configuration is OK.  I have tired switching the DNN 'Supports Partial Rendering?' flag to no avail.

    For the moment I will revert to the asp.net control, but if you can help it would be appreciated as I would prefer to only use one suite if possible.

    Suite version : Q1 2009
    DNN version : 4.6.2
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 23 Jun 2009 Link to this post

    Hi Alex,

    A possible reason for this could be the url rewriter in dnn. You can either exclude the ChartImage.axd from the SiteUrls.config file in your web root or use the HttpHandlerUrl property of RadChart. In the latter case -- assign that property the correct path to the chart HttpHandler. You can check this forum post for more details.

    Best wishes,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 24 Jun 2009 Link to this post

    Thanks, the httphandler fix doesn't work - do you have an example of how I can configure the siteurls.config file?  Current contents are:

    <?xml version="1.0" encoding="utf-8" ?>
    <RewriterConfig>
        <Rules>
            <RewriterRule>
                <LookFor>.*DesktopDefault.aspx(.*)</LookFor>
                <SendTo>~/Default.aspx$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>.*EditModule.aspx(.*)</LookFor>
                <SendTo>~/Default.aspx$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>.*/TabId/(\d+)(.*)/Logoff.aspx</LookFor>
                <SendTo>~/Admin/Security/Logoff.aspx?tabid=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>.*/TabId/(\d+)(.*)/rss.aspx</LookFor>
                <SendTo>~/rss.aspx?TabId=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>[^?]*/TabId/(\d+)(.*)</LookFor>
                <SendTo>~/Default.aspx?TabId=$1</SendTo>
            </RewriterRule>
        </Rules>
    </RewriterConfig>
  4. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 26 Jun 2009 Link to this post

    Alex,

    You can find an example, posted by Tim here.

    Regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 30 Jun 2009 Link to this post

    No joy I'm afraid
  6. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 02 Jul 2009 Link to this post

    Hi Alex,

    These two suggestions have proven helpful in this kind of issues and have helped with every request so far. Just in case -- I assume the chart HttpHandler has been correctly registered in your web.config file as you mentioned that the tests with RadChart in .aspx page have been successful. Can you please check the value of the src attribute of the chart image in the page source. Please, check this value with and without the update in siteurls.config file. This issue has been described and discussed in details in the dnn forums, eventually using the same solution in the end -- update in the siteurls.config file.

    Sincerely,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 02 Jul 2009 Link to this post

    Hi Ves,

    I have reapplied the siteurl fix and it seems to have worked this time, sorry for any confusion and thanks for your help.

    Thanks,
    Lee
Back to Top