当前位置:网站首页>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
边栏推荐
- Clustering of machine learning
- Difference between shallow copy and deep copy
- 硬件电路设计学习笔记1--温升设计
- 3、 Openvino practice: image classification
- ESXi 7.0 Update 1c中加入的systemMediaSize启动选项
- 1、 Speech synthesis and autoregressive model
- Transformer 自注意力机制 及完整代码实现
- Internet of things interoperability system: classification, standards and future development
- 在win7 上安装 Visual Studio 2019 步骤 及 vs2019离线安装包
- Summary of common WAF interception pages
猜你喜欢

Best practices to ensure successful deployment of Poe devices

EIGamal 密码体制描述

dsp和fpga的通讯

What is the process of building a small program?

AEM testpro K50 and south Guangdong survey

3、 Openvino practice: image classification

关于gcc :multiple definition of

(PHP graduation project) based on PHP student daily behavior management system access

关于Fusion on Apple Silicon的谨慎猜测

MAE 掩码自编码是可扩展的学习
随机推荐
杭州某公司福禄克FLUKE DTX-SFM2单模模块-修复案例
51 single chip microcomputer independent key linkage nixie tube LED buzzer
福禄克DTX-1800其配件DTX-CHA002通道适配器CHANNEL更换RJ45插座小记
Notes on the thinking of software analysis and library acquisition of a Taobao customer
深度学习(一):走进机器学习与深度学习理论部分
生活随机-1
D2sc-gan: low resolution face recognition of classroom scenes based on dual depth and shallow channel generation confrontation network
深度学习数据窃取攻击在数据沙箱模式下的威胁分析与防御方法研究阅读心得
硬件电路设计学习笔记2--降压电源电路
基于直方图修改的可逆数字水印方法
(PHP graduation project) based on PHP Gansu tourism website management system to obtain
ESXi on ARM v1.2 (2020年11月更新)
Model inversion attacks that exploit confidence information on and basic countermeasures
C语言EOF的理解
PLC的选型
The difference and connection between cookies, sessions and tokens
Agilent安捷伦 E5071测试阻抗、衰减均正常,惟独串扰NG?---修复方案
MAE 掩码自编码是可扩展的学习
使用MS图表控件创建基本报表
How does fluke dtx-1800 test cat7 network cable?