Gallery
<%@ Page Language="C#" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
//Enable AJAX zoom / scroll with a single property
Chart.Zoomer.Enabled = true;
Chart.ChartArea.InteriorLine.Color = Color.Empty;
//Chart.ChartArea.Line.Width = 1;
//Chart.ChartArea.Line.Color = Color.Red;
// Add the random data.
Chart.SeriesCollection.Add(getRandomData(1));
}
SeriesCollection getRandomData(int seed)
{
SeriesCollection SC = new SeriesCollection();
Random myR = new Random();
for(int a = 1; a < 5; a++)
{
Series s = new Series();
s.Name = "Series " + a;
for(int b = 1; b < 6; b++)
{
Element e = new Element();
e.XValue = 5 + myR.Next(10);
e.YValue = myR.Next(50);
s.Elements.Add(e);
}
s.Type = SeriesType.Line;
SC.Add(s);
}
return SC;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>.netCHARTING Sample</title></head>
<body>
<center>
<dotnet:Chart id="Chart" Title="Chart with zooming, right click on the chart to access zooming" runat="server"/>
</center>
</body>
</html>
<%@ Page Language="vb" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
'Enable AJAX zoom / scroll with a single property
Chart.Zoomer.Enabled = True
Chart.ChartArea.InteriorLine.Color = Color.Empty
'Chart.ChartArea.Line.Width = 1;
'Chart.ChartArea.Line.Color = Color.Red;
' Add the random data.
Chart.SeriesCollection.Add(getRandomData(1))
End Sub
Function getRandomData(ByVal seed As Integer) As SeriesCollection
Dim SC As SeriesCollection = New SeriesCollection()
Dim myR As Random = New Random()
For a As Integer = 1 To 4
Dim s As Series = New Series()
s.Name = "Series " & a
For b As Integer = 1 To 5
Dim e As Element = New Element()
e.XValue = 5 + myR.Next(10)
e.YValue = myR.Next(50)
s.Elements.Add(e)
Next b
s.Type = SeriesType.Line
SC.Add(s)
Next a
Return SC
End Function
</script>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>.netCHARTING Sample</title></head>
<body>
<center>
<dotnet:Chart id="Chart" Title="Chart with zooming, right click on the chart to access zooming" runat="server"/>
</center>
</body>
</html>
- Sample FilenameImageZoomerSimple.aspx
- Version5.0
- Uses DatabaseNo