Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Chart / Setting Values

Set Chart Values:
 
Did you know that you can add Telerik Silverlight Charts to your ASP.NET applications?

RadControls for Silverlight


  • A simple example for setting item values. The Y axis is set to be in autoscale mode in order not to limit the range of entered values. They can be both negative and positive. The line series item values are a percent of the bar series item values and change dynamically when the new values are set.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Inherits="Telerik.ChartExamplesCS.SettingValues.DefaultCS" Language="c#"
        CodeFile="DefaultCS.aspx.cs" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="telerik" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="telerik" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="telerik" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
    <head runat="server">
        <telerik:HeadTag runat="server" ID="Headtag1"></telerik:HeadTag>
        <!-- custom head section -->
    </head>
    <body class="BODY">
        <!-- end of custom head section -->
        <form runat="server" id="mainForm" method="post">
            <telerik:Header ShowSkinChooser="false" runat="server" ID="Header1" NavigationLanguage="C#" AccessibilityLevel="AAA">
            </telerik:Header>
            <asp:ScriptManager ID="ScriptManager" runat="server" />
            <!-- content start -->
            
    <div class="bigModule">
         <div class="bigModuleBottom">
              <div class="title">Set Chart Values:</div>
                <table id="Table2" summary="Set Chart Values">
                    <tr>
                        <td style="width:80px"><asp:Label ID="labelQuarter" AssociatedControlID="dropDownQuarter" runat="server">Quarter:</asp:Label></td>
                        <td>
    <asp:DropDownList ID="dropDownQuarter" runat="server" AutoPostBack="True" Width="80px"
    OnSelectedIndexChanged="dropDownQuarter_SelectedIndexChanged">

                                <asp:ListItem Value="Q1">Q1</asp:ListItem>
                                <asp:ListItem Value="Q2">Q2</asp:ListItem>
                                <asp:ListItem Value="Q3">Q3</asp:ListItem>
                                <asp:ListItem Value="Q4">Q4</asp:ListItem>
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td><asp:Label ID="labelSales" AssociatedControlID="txtBoxSales" runat="server">Sales:</asp:Label></td>
                        <td><asp:TextBox class="textfield" ID="txtBoxSales" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td style="padding-top:1em">
                            <asp:Button class="button" ID="btnSet" runat="server" Text="Set" OnClick="btnSet_Click">
                            </asp:Button>
                            <asp:Button class="button" ID="Button1" runat="server" Text="Reset" OnClick="Button1_Click_1">
                            </asp:Button></td>
                    </tr>
                </table>
         </div>
    </div>
            <telerik:RadChart ID="RadChart1" runat="server" Width="540px" Height="333px">
                <PlotArea>
                    <YAxis Step="20">
                    </YAxis>
                    <YAxis2 MaxValue="7" MinValue="1" Step="1">
                    </YAxis2>
                    <XAxis MaxValue="7" MinValue="1" Step="1">
                    </XAxis>
                </PlotArea>
                <Series>
                    <telerik:ChartSeries Name="Series 1">
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Name="Series 2">
                    </telerik:ChartSeries>
                </Series>
            </telerik:RadChart>
            <!-- content end -->
            <telerik:Footer runat="server" ID="Footer1"></telerik:Footer>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451