Gallery
<%@ Page Language="C#" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dnc" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="dotnetCHARTING.Mapping" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
// Demonstrates the available header cap styles.
Chart.Size = "170x380";
Chart.TempDirectory = "temp";
Chart.Debug = true;
Chart.NoDataLabel.Text = "";
for (int i = 0; i < 11; i++)
{
BoxCapStyle bhs = (BoxCapStyle)i;
Annotation ann = getNewAnnotation("", bhs);
ann.Position = new Point(20 + i * 0, 20 + i * 32);
Chart.Annotations.Add(ann);
}
}
Annotation getNewAnnotation(string content, BoxCapStyle bStyle)
{
Annotation an = new Annotation(content);
an.Size = new Size(130, 0);
an.Header.Label.Text = bStyle.ToString();
an.Header.Label.Font = new Font("Verdana", 10.5f);
an.HeaderLabel.Alignment = StringAlignment.Center;
an.Header.VerticalAlignment = EdgeAlignment.Outside;
an.Header.StartCap = bStyle;
an.Header.EndCap = bStyle;
an.Header.Background.ShadingEffectMode = ShadingEffectMode.Background2;
an.Header.Background.Transparency = 10;
an.Header.Background.ShadingEffectMode = ShadingEffectMode.One;
an.Header.Shadow.Color = Color.FromArgb(20, Color.Black);
an.Header.Shadow.Soft = false;
an.Header.Shadow.Depth = 5;
return an;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.netCHARTING Sample</title>
</head>
<body>
<div align="center">
<dnc:Chart ID="Chart" runat="server" />
</div>
</body>
</html>
<%@ Page Language="vb" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dnc" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="dotnetCHARTING.Mapping" %>
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
' Demonstrates the available header cap styles.
Chart.Size = "170x380"
Chart.TempDirectory = "temp"
Chart.Debug = True
Chart.NoDataLabel.Text = ""
For i As Integer = 0 To 10
Dim bhs As BoxCapStyle = CType(i, BoxCapStyle)
Dim ann As Annotation = getNewAnnotation("", bhs)
ann.Position = New Point(20 + i * 0, 20 + i * 32)
Chart.Annotations.Add(ann)
Next i
End Sub
Function getNewAnnotation(ByVal content As String, ByVal bStyle As BoxCapStyle) As Annotation
Dim an As Annotation = New Annotation(content)
an.Size = New Size(130, 0)
an.Header.Label.Text = bStyle.ToString()
an.Header.Label.Font = New Font("Verdana", 10.5f)
an.HeaderLabel.Alignment = StringAlignment.Center
an.Header.VerticalAlignment = EdgeAlignment.Outside
an.Header.StartCap = bStyle
an.Header.EndCap = bStyle
an.Header.Background.ShadingEffectMode = ShadingEffectMode.Background2
an.Header.Background.Transparency = 10
an.Header.Background.ShadingEffectMode = ShadingEffectMode.One
an.Header.Shadow.Color = Color.FromArgb(20, Color.Black)
an.Header.Shadow.Soft = False
an.Header.Shadow.Depth = 5
Return an
End Function
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.netCHARTING Sample</title>
</head>
<body>
<div align="center">
<dnc:Chart ID="Chart" runat="server" />
</div>
</body>
</html>
- Sample FilenameHeaderCapStyles.aspx
- Version6.1
- Uses DatabaseNo