📄 defaultcs.aspx
字号:
<%@ Page AutoEventWireup="false" CodeBehind="DefaultCS.aspx.cs" Inherits="Telerik.ChartExamplesCS.Legend.DefaultCS" Language="c#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" Assembly="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" %>
<%@ Register TagPrefix="radc" Namespace="Telerik.WebControls" Assembly="RadChart" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<telerik:HeadTag runat="server" ID="Headtag1"></telerik:HeadTag>
<!-- custom head section -->
<style type="text/css">
table.center {margin-left:auto; margin-right:auto;}
</style>
<!-- end of custom head section -->
</head>
<body class="BODY">
<form runat="server" id="mainForm" method="post" style="WIDTH:100%">
<telerik:Header Tab="Config" runat="server" ID="Header1" NavigationLanguage="C#" NavigationControl="~/Chart/Common/ConfigNavigation.ascx"></telerik:Header>
<!-- content start -->
<table style="WIDTH: 732px; HEIGHT: 541px; margin: 0px; padding: 0px;">
<tr>
<td style="WIDTH: 397px; HEIGHT: 388px; vertical-align: top">
<div style="OVERFLOW: auto; WIDTH: 400px; HEIGHT: 360px"><radc:radchart id="RadChart1" LicenseFile="~\RadControls\LicenseFile.xml" Margins-Right="110px" Margins-Top="35px" Margins-Left="20px" Margins-Bottom="25px" Runat="server" Width="400px" Height="300px">
<Background MainColor="242, 242, 242" GradientFillStyle="Vertical" SecondColor="White" BorderColor="Gray" FillStyle="Gradient"></Background>
<PlotArea MainColor="224, 224, 224" Corners-BottomLeft="Round" Corners-TopRight="Round" Corners-BottomRight="Round" Corners-RoundSize="6" Corners-TopLeft="Round" GradientFillStyle="Vertical" SecondColor="Gray" BorderColor="DimGray" FillStyle="Gradient"></PlotArea>
<Legend ItemMark="Circle" VAlignment="Middle" ItemColor="Brown" ItemFont="Arial, 8.25pt, style=Bold" Location="OutsidePlotArea" HeightRatio="0.5">
<Background MainColor="Linen" Corners-BottomLeft="Round" Corners-TopRight="Round" Corners-BottomRight="Round" Corners-TopLeft="Round" SecondColor="Wheat" FillStyle="Gradient" BorderColor="Sienna" GradientFocus="0.5" GradientFillStyle="ForwardDiagonal"></Background>
</Legend>
<ChartSeriesCollection>
<radc:ChartSeries CenterYOffset="0" CenterXOffset="0" Name="Series 1">
<Items>
<radc:ChartSeriesItem YValue="51">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="81">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="37">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="-43">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="-2">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
</Items>
<Appearance MainColor="Silver" SecondColor="Black" FillStyle="Gradient" BorderColor="DimGray"></Appearance>
<LabelAppearance TextColor="White" RotationAngle="0" TextFont="Arial, 9pt, style=Bold">
<Background MainColor=""></Background>
</LabelAppearance>
</radc:ChartSeries>
<radc:ChartSeries CenterYOffset="0" CenterXOffset="0" Name="Series 2">
<Items>
<radc:ChartSeriesItem YValue="20">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="-69">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="-22">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="-72">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
<radc:ChartSeriesItem YValue="36">
<Appearance MainColor=""></Appearance>
</radc:ChartSeriesItem>
</Items>
<Appearance MainColor="White" SecondColor="Gray" FillStyle="Gradient" BorderColor="DimGray"></Appearance>
<LabelAppearance TextColor="White" RotationAngle="0" TextFont="Arial, 9pt, style=Bold">
<Background MainColor=""></Background>
</LabelAppearance>
</radc:ChartSeries>
</ChartSeriesCollection>
<XAxis>
<Items>
<radc:ChartAxisItem Label="1" Value="0"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="2" Value="0"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="3" Value="0"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="4" Value="0"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="5" Value="0"></radc:ChartAxisItem>
</Items>
<Label VAlignment="Top">
<Background MainColor=""></Background>
</Label>
</XAxis>
<Title1 Text="r.a.d chart title" TextFont="Arial, 13pt, style=Bold" Visible="False" TextColor="White" Location="OutsidePlotArea">
<Background MainColor="LightGray" Corners-BottomLeft="Round" Corners-TopRight="Round" Corners-BottomRight="Round" Corners-TopLeft="Round" BorderColor="64, 64, 64"></Background>
</Title1>
<YAxis Step="20" MarkLength="5" MinValue="-80" Visible="False" MaxItemsCount="15">
<Items>
<radc:ChartAxisItem Label="-80" Value="-80"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="-60" Value="-60"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="-40" Value="-40"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="-20" Value="-20"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="0" Value="0"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="20" Value="20"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="40" Value="40"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="60" Value="60"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="80" Value="80"></radc:ChartAxisItem>
<radc:ChartAxisItem Label="100" Value="100"></radc:ChartAxisItem>
</Items>
<Label TextDirection="Left">
<Background MainColor=""></Background>
</Label>
</YAxis>
<Gridlines PenStyle="Dot" Visible="True" Color="GhostWhite">
<VerticalGridlines PenStyle="Dot" Visible="True" Color="GhostWhite"></VerticalGridlines>
<HorizontalGridlines PenStyle="Dot" Visible="True" Color="GhostWhite"></HorizontalGridlines>
</Gridlines>
</radc:radchart>
</div>
<div class="module" style="WIDTH: 300px">
<table class="center" style="width: 375;">
<tr>
<td colspan="2"><strong>Legend item:</strong></td>
</tr>
<tr>
<td style="WIDTH: 115px"><asp:label id="Label13" runat="server">Item color</asp:label></td>
<td><asp:dropdownlist id="ddlItemColor" Width="155px" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td style="WIDTH: 115px"><asp:label id="Label14" runat="server">Item mark</asp:label></td>
<td><asp:dropdownlist id="ddlItemMark1" Width="155px" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td style="WIDTH: 115px" colspan="2"><strong>ImageMap:</strong></td>
</tr>
<tr>
<td style="WIDTH: 115px"><asp:label id="Label17" runat="server">HRef</asp:label></td>
<td><asp:textbox id="txtBoxHRef" Width="187px" runat="server">http://www.telerik.com</asp:textbox></td>
</tr>
<tr>
<td style="WIDTH: 115px"><asp:label id="Label18" runat="server">ToolTip</asp:label></td>
<td><asp:textbox id="txtBoxToolTip" Width="186px" runat="server">Links to the official telerik site</asp:textbox></td>
</tr>
<tr>
<td style="WIDTH: 115px">Custom attribues
</td>
<td><asp:textbox id="txtBoxAttributes" Width="187px" runat="server">target='_blank'</asp:textbox></td>
</tr>
<tr>
<td style="WIDTH: 115px"></td>
<td>
<asp:button id="Button1" Width="120px" runat="server" Text="Add new item" CssClass="button" style="BORDER-RIGHT: #33cc00 2px solid; BORDER-TOP: #33cc00 2px solid; BORDER-LEFT: #33cc00 2px solid; BORDER-BOTTOM: #33cc00 2px solid"></asp:button>
<asp:button id="Button3" Width="120px" runat="server" Text="Remove last" CssClass="button"></asp:button>
</td>
</tr>
</table>
</div>
</td>
<td style="HEIGHT: 388px; vertical-align: top; text-align: right;"><div class="module" style="WIDTH: 300x; HEIGHT: 350px">
<table class="center">
<tr>
<td colspan="2"><b>Customize the Legend</b></td>
</tr>
<tr>
<td><asp:label id="Label1" runat="server">Item mark:</asp:label></td>
<td><asp:dropdownlist id="ddlItemMark" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label10" runat="server">Items' font:</asp:label></td>
<td><asp:textbox id="txtBoxItemFont" Width="140" runat="server"></asp:textbox></td>
</tr>
<tr>
<td><asp:label id="Label9" runat="server">Items' color:</asp:label></td>
<td><asp:dropdownlist id="ddlItemsColor" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label3" runat="server">Position:</asp:label></td>
<td><asp:dropdownlist id="ddlPosition" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label8" runat="server">Location:</asp:label></td>
<td><asp:dropdownlist id="ddlLocation" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label4" runat="server">Hor. alignment:</asp:label></td>
<td><asp:dropdownlist id="ddlHorAlignment" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label5" runat="server" Width="61px">Ver. alignment:</asp:label></td>
<td><asp:dropdownlist id="ddlVerAlignment" Width="140" runat="server"></asp:dropdownlist></td>
</tr>
<tr>
<td><asp:label id="Label6" runat="server">Hor. spacing:</asp:label></td>
<td><asp:textbox class="textfield" id="txtBoxHorSpacing" runat="server"></asp:textbox></td>
</tr>
<tr>
<td><asp:label id="Label7" runat="server">Ver. spacing:</asp:label></td>
<td><asp:textbox class="textfield" id="txtBoxVerSpacing" runat="server"></asp:textbox></td>
</tr>
<tr>
<td><asp:label id="Label2" runat="server"> AutoScale:</asp:label></td>
<td><asp:checkbox id="cbAutoScale" runat="server"></asp:checkbox></td>
</tr>
<tr>
<td><asp:label id="Label11" runat="server">Width ratio:</asp:label></td>
<td><asp:textbox class="textfield" id="txtBoxWidthRatio" runat="server"></asp:textbox></td>
</tr>
<tr>
<td><asp:label id="Label12" runat="server">Height ratio:</asp:label></td>
<td><asp:textbox class="textfield" id="txtBoxHeightRatio" runat="server"></asp:textbox></td>
</tr>
<tr>
<td align="center" colspan="2"><asp:button id="btnApply" style="BORDER-RIGHT: #33cc00 2px solid; BORDER-TOP: #33cc00 2px solid; BORDER-LEFT: #33cc00 2px solid; BORDER-BOTTOM: #33cc00 2px solid" Width="240px" runat="server" CssClass="button" Text="Apply"></asp:button></td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Label id="lblIncorrectSettings" runat="server" ForeColor="Red" Visible="False">Incorrect value(s)!</asp:Label>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<!-- content end -->
<telerik:Footer runat="server" ID="Footer1"></telerik:Footer>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -