locked
Implementing Line/Bar Charts with/without Ajax RRS feed

  • Question

  • User-223976922 posted

    Hi All,

    I am looking for references to implement Line /Bar Chart in my project and I found  implementation with and w/o Ajax like below:

    <!--?xml:namespace prefix = "asp" /--><!--?xml:namespace prefix = "asp" /--> <asp:Chart ID="Chart1" runat="server">

    or

    <ajaxToolkit:LineChart ID="LineChart1" runat="server">

    I tried an example w/o Ajax and works fine. However, I want to understand which approach should be used and what are the advantages?

    Also the other issue is in my AjaxToolkit, I dont see any chart controls like LineChart, PieChart,BarChart.(PS: Ajax is successfuly installed and registered as I am already using ajaxTabContainer and its working fine, so no issues with AjaxToolkit registrtaion)

    I tried this:

    <ajaxtoolkit:LineChart ID="LineChart1" runat="server"></ajaxtoolkit:LineChart>

    Warning 1 Element 'LineChart' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. D:\WebApp_14Nov\AssessmentSummary.aspx 27 18 D:\WebApp_14Nov\

    Error 3 Unknown server tag 'ajaxtoolkit:LineChart'. D:\WebApp_14Nov\AssessmentSummary.aspx 27 

    Any inputs will be really helpful!! 

     

    Wednesday, December 18, 2013 5:06 AM

Answers

  • User-223976922 posted

    Hi All,

    After reading online, I have figured out that MS charts or Ajax Charts can be used to implement Charts in ASP.NET

    Both charts are free, but the AJAX charts are interactive JavaScript charts

    The biggest difference is Image (MS Charts) and Non Image (AJAX Charts)

    So for my project, I am planning to use MS charts!

    Also, incase AJAx Tool Kit is missing the chart controls, Install Ajax using Nuget in  visual studio to install the latest version.

    Thanks!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 23, 2013 9:04 PM

All replies

  • User-837620913 posted

    Have you included the latest AJAX Control Toolkit in your Visual Studio solution/project? Use Nuget to install the latest:

    http://www.nuget.org/packages/AjaxControlToolkit

    Did you add a page directive to include the ajaxToolkit? Here's how (at the top of the page):

    <%@ Register
        Assembly="AjaxControlToolkit"
        Namespace="AjaxControlToolkit"
        TagPrefix="ajaxToolkit"%>

    Wednesday, December 18, 2013 5:28 AM
  • User-223976922 posted

    Thanks Darrell!!

    As I mentioned I already have Ajax downloaded and I am able to use tabcontainer in some other WebPages.

    I had downloaded the ZIP file AjaxControlToolkit-Framework3.5SP1-DllOnly.zip from the ASP.NET AJAX Control Toolkit Releases page of the CodePlex web site

    I have this setting in web.config:

    <pages>

    <controls>

    <add tagPrefix="ajaxtoolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolKit" />

    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

    </controls>

    </pages>

    But any idea on why only chart controls are missing and Should I use Ajax to implement charts, or just <asp:Charts> will do?

    Wednesday, December 18, 2013 8:58 PM
  • User-223976922 posted

    Hi Darrell,

    I just tried to install Ajax using Nuget in my visual studio for testing purpose, and I am glad to see all the chart controls now.

    But coming back to my previous question, which of the below is a better way to implemnet ?

    <asp:Chart runat="server"></asp:Chart>   

    <ajaxToolkit:LineChart ID="LineChart1" runat="server"></ajaxToolkit:LineChart>

    my web.config setting is :

    <pages>

    <controls>

    <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />

     <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

    </controls>

    </pages>

     Thanks!

    Wednesday, December 18, 2013 11:10 PM
  • User-223976922 posted

    Hi All,

    After reading online, I have figured out that MS charts or Ajax Charts can be used to implement Charts in ASP.NET

    Both charts are free, but the AJAX charts are interactive JavaScript charts

    The biggest difference is Image (MS Charts) and Non Image (AJAX Charts)

    So for my project, I am planning to use MS charts!

    Also, incase AJAx Tool Kit is missing the chart controls, Install Ajax using Nuget in  visual studio to install the latest version.

    Thanks!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 23, 2013 9:04 PM