asp.net 2.0 Chart画图

本文展示了一个使用ASP.NET和System.Web.DataVisualization库进行图表绘制的例子。该示例中包括了不同类型的系列设置、轴配置等细节,适用于希望了解如何在ASP.NET Web应用程序中集成动态图表的开发者。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="StatusGraph.aspx.vb" Inherits="K2N.StatusGraph" %>

<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<!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" >
<head runat="server">
    <link href="../Css/CommonK2N.css" rel="stylesheet" type="text/css" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <!--Title     -->
    <table border="0" cellpadding="0" cellspacing="0" width="980px">
    <col width="40px" />
    <col width="400px" />
    <col width="110px" />
    <col width="400px" />
    <col width="30px" />
    <tr>
        <td></td>
        <td class="css_label">
            <table width="400px">
            <col width="40px" />
            <col width="210px" />
            <col width="40px" />
            <col width="50px" />
            <col width="60px" />
            <tr>
                <td>1120</td>
                <td>第一高周波工業</td>
                <td>規模</td>
                <td>567,900</td>
                <td>Step</td>
            </tr>
            </table>
        </td>
        <td></td>
        <td class="css_label">
            <table width="400px">
            <col width="40px" />
            <col width="210px" />
            <col width="40px" />
            <col width="50px" />
            <col width="60px" />
            <tr>
                <td>1120</td>
                <td>第一高周波工業</td>
                <td>規模</td>
                <td>567,900</td>
                <td>Step</td>
            </tr>
            </table>
        </td>
        <td></td>
    </tr>
    </table>
    <!--画像     -->
    <table border="0" cellpadding="0" cellspacing="0" width="980px">
    <col width="40px" />
    <col width="350px" />
    <col width="110px" />
    <col width="100px" />
    <col width="100px" />
    <tr>
        <td></td>
        <td>
         <asp:Chart ID="Chart1" runat="server" Width="350px">
                <Series>
                    <asp:Series BorderColor="Black" ChartType="Bar" Color="White" Name="Series1"
                        IsValueShownAsLabel="True" LabelFormat="###,##0">
                    </asp:Series>
                    <asp:Series ChartArea="ChartArea1" ChartType="StackedBar" Color="0, 192, 0"
                        Name="Series2">
                    </asp:Series>
                    <asp:Series ChartArea="ChartArea2" Name="Series3" Palette="BrightPastel"
                        IsValueShownAsLabel="True">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1">
                        <AxisY Enabled="False">
                            <MajorGrid Enabled="False" />
                        </AxisY>
                        <AxisX Enabled="False">
                        </AxisX>
                        <Position Height="15" Width="90" X="9" />
                    </asp:ChartArea>
                    <asp:ChartArea Name="ChartArea2">
                        <AxisY>
                            <MajorTickMark Enabled="False" />
                        </AxisY>
                        <AxisX IsLabelAutoFit="False">
                            <MajorGrid Enabled="False" />
                            <MajorTickMark Enabled="False" />
                        </AxisX>
                        <Position Height="85" Width="95" X="1" Y="12" />
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
        </td>
        <td>
        </td>
        <td>
        </td>
    </tr>
    </table>

    </form>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值