当前位置:网站首页>Create a basic report using MS chart controls
Create a basic report using MS chart controls
2022-07-28 06:20:00 【Haile learning】
Realization effect :

Technical realization :
The front desk code :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ASPNet explore a mystery ._Default" %>
<%@ 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">
<title> Use MS Chart controls create basic reports </title>
</head>
<body>
<form id="form1" runat="server">
<div style="float:left">
<asp:chart id="Chart" runat="server" Height="296px" Width="600px"
Palette="BrightPastel"
BorderDashStyle="Solid" BackSecondaryColor="White"
BackGradientStyle="None" BorderWidth="2" backcolor="#D3DFF0"
BorderColor="26, 59, 105">
<Legends>
<asp:Legend BackColor="Transparent" Docking="Bottom" Alignment="Center" IsTextAutoFit="true" Name="Legend" Font="Trebuchet MS, 8.25pt, style=Bold"/>
</Legends>
<BorderSkin SkinStyle="Emboss" />
<Series>
<asp:Series Name="Column" BorderColor="180, 26, 59, 105" LegendText=" Monthly statistics " ChartType="Column">
<Points>
<asp:DataPoint YValues="60" AxisLabel=" In January, " />
<asp:DataPoint YValues="45" AxisLabel=" February "/>
<asp:DataPoint YValues="78" AxisLabel=" March " />
<asp:DataPoint YValues="56" AxisLabel=" April "/>
<asp:DataPoint YValues="38" AxisLabel=" May " />
<asp:DataPoint YValues="84" AxisLabel=" June "/>
<asp:DataPoint YValues="48" AxisLabel=" July " />
<asp:DataPoint YValues="41" AxisLabel=" August "/>
<asp:DataPoint YValues="65" AxisLabel=" September " />
<asp:DataPoint YValues="75" AxisLabel=" October "/>
<asp:DataPoint YValues="88" AxisLabel=" November " />
<asp:DataPoint YValues="64" AxisLabel=" December "/>
</Points>
</asp:Series>
</Series>
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<axisy linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisy>
<axisx linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
</chartareas>
</asp:chart>
</div>
<div style="float:right">
<asp:chart id="Chart1" runat="server" Height="296px" Width="380px"
Palette="BrightPastel"
BorderDashStyle="Solid" BackSecondaryColor="White"
BackGradientStyle="None" BorderWidth="2" backcolor="#D3DFF0"
BorderColor="26, 59, 105">
<Legends>
<asp:Legend BackColor="Transparent" Docking="Bottom" Alignment="Center" IsTextAutoFit="true" Name="Legend" Font="Trebuchet MS, 8.25pt, style=Bold"/>
</Legends>
<BorderSkin SkinStyle="Emboss" />
<Series>
<asp:Series Name="Column" BorderColor="180, 26, 59, 105" LegendText=" Weekly statistics " ChartType="Pie">
<Points>
<asp:DataPoint YValues="60" AxisLabel="60" LegendText=" The first week " />
<asp:DataPoint YValues="45" AxisLabel="45" LegendText=" In the second week of "/>
<asp:DataPoint YValues="78" AxisLabel="78" LegendText=" The third week "/>
<asp:DataPoint YValues="56" AxisLabel="56" LegendText=" The fourth week "/>
</Points>
</asp:Series>
</Series>
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<axisy linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisy>
<axisx linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
</chartareas>
</asp:chart>
</div>
</form>
</body>
</html>Background code :
using System;
using System.Web.UI.DataVisualization.Charting;
namespace ASPNet explore a mystery
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// Background dynamic loading data
Series series = new Series("LineSeries");
series.ChartType = SeriesChartType.Spline;
series.LegendText = " Polyline data ";
series.BorderWidth = 3;
series.ShadowOffset = 2;
series.Points.AddY(30);
series.Points.AddY(42);
series.Points.AddY(36);
series.Points.AddY(78);
series.Points.AddY(46);
series.Points.AddY(65);
series.Points.AddY(41);
series.Points.AddY(35);
series.Points.AddY(87);
series.Points.AddY(75);
series.Points.AddY(36);
series.Points.AddY(52);
series.Points.AddY(74);
this.Chart.Series.Add(series);
}
}
}
}notes : This article is reproduced to White clothes Pavilion
边栏推荐
- 浅谈FLUKE光缆认证?何为CFP?何为OFP?
- (PHP graduation project) based on PHP online travel website management system to obtain
- Common CTF encryption methods JS
- frameset 用法示例
- 基于差值扩展的可逆水印方法
- Fluke fluke aircheck WiFi tester cannot configure file--- Ultimate solution experience
- PLC的选型
- The difference between router and switch
- Differences between processes and threads
- AEM线上产品推介会---线缆认证测仪
猜你喜欢

光伏发电系统——mppt最大功率点追踪

Tensorflow2.1 basic concepts and common functions

Model inversion attacks that exploit confidence information on and basic countermeasures

二、OpenVINO简述与构建流程

2、 Openvino brief introduction and construction process

When to replace jack socket for dsx-pc6 jumper module?

Summary of common WAF interception pages

Classification of iris based on Neural Network

Reading experience of protecting against DNN model steaming attacks

PLC的整体认识
随机推荐
ASP.NET 读数据库绑定到 TreeView 递归方式
vSphere ESXi 7.0 Update 3 发行说明
CString转char[]函数
Web滚动字幕(MARQUEE示例)
TCL和ELTCL?CDNEXT和CMRL?
DSX2-8000如何校准?校准流程?
Fluke fluke aircheck WiFi tester cannot configure file--- Ultimate solution experience
Common CTF encryption methods JS
Neural network optimization
Never leave its origin - bluecms1.6 vulnerability of the controller's shooting range
Summary of Intranet Information Collection
使用MS图表控件创建基本报表
Deep learning (II) into machine learning and deep learning programming
D2sc-gan: low resolution face recognition of classroom scenes based on dual depth and shallow channel generation confrontation network
(PHP graduation project) based on PHP student daily behavior management system access
The short jumper dsx-8000 test is normal, but the dsx-5000 test has no length display?
二、OpenVINO简述与构建流程
Nsctf web Title writeup
短跳线DSX-8000测试正常,但是DSX-5000测试无长度显示?
Addition and multiplication calculation of GF (2^8)