dotnetCHARTING Send comments on this topic.
Axis.TimeScaleLabelInfo Class
See Also  Members   Example 
dotnetCHARTING Namespace : Axis.TimeScaleLabelInfo Class


Encapsulates time scale label behavior options in addition to axis ticks and format strings used instead of the main axis ticks when they represent particular instances in time.

Object Model











Syntax

Visual Basic (Declaration)  
Public Class Axis.TimeScaleLabelInfo 
Visual Basic (Usage) Copy Code
Dim instance As Axis.TimeScaleLabelInfo
C#  
public class Axis.TimeScaleLabelInfo 

Example

C# Copy Code
<%@ Page Language="C#" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix=
"dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace=
"System.Drawing" %>
<HTML>
   <HEAD>
       <TITLE>.netCHARTING Sample</TITLE>
       <script runat=
"server">


void Page_Load(Object sender,EventArgs e)
{

   Chart.Type = ChartType.Combo;
//Horizontal;
   
Chart.Width = 600;
   Chart.Height = 350;
   Chart.TempDirectory =
"temp";
   Chart.Debug = true;
   Chart.Title =
"Smart time labels.";
   Chart.DefaultSeries.Type = SeriesType.AreaLine;

   
   Chart.XAxis.Label.Text =
"Smart time labels that describe instance in time.";
       
   
// This sample will demonstrate using smart time labels.
   
Chart.XAxis.TimeScaleLabels.Mode = TimeScaleLabelMode.Smart;
   
   
   
// *DYNAMIC DATA NOTE*
   
// This sample uses random data to populate the chart. To populate
   
// a chart with database data see the following resources:
   
// - Classic samples folder
   
// - Help File > Data Tutorials
   
// - Sample: features/DataEngine.aspx

   
// Add the random data.
   
Chart.SeriesCollection.Add(getRandomData());
   
   
}

SeriesCollection getRandomData()
{
   SeriesCollection SC =
new SeriesCollection();
   Random myR =
new Random(1);
   DateTime dt =
new DateTime(2004,8,30);
   
for(int a = 0; a < 1; a++)
   {
       Series s =
new Series();
       s.Name =
"Series " + a;
       
for(int b = 0; b < 20; b++)
       {
           Element e =
new Element();
           e.YValue = myR.Next(100);
           e.XDateTime = dt = dt.AddDays(10);
           s.Elements.Add(e);
       }
       SC.Add(s);
   }
   
return SC;
}
       </script>
   </HEAD>
   <BODY>
       <DIV align=
"center">
           <dotnet:Chart id=
"Chart" runat="server" Width="568px" Height="344px">
           </dotnet:Chart>
       </DIV>
   </BODY>
</HTML>
Visual Basic Copy Code
<%@ Page Language="VB" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<HTML>
    <HEAD>
        <TITLE>.netCHARTING Sample</TITLE>
        <script runat="server">
Sub Page_Load(sender As [Object], e As EventArgs)

   Chart.Type = ChartType.Combo
   Chart.Width = Unit.Parse(600)
   Chart.Height = Unit.Parse(350)
   Chart.TempDirectory = "temp"
   Chart.Debug = True
   Chart.Title = "Smart time labels."
   Chart.DefaultSeries.Type = SeriesType.AreaLine


   Chart.XAxis.Label.Text = "Smart time labels that describe instance in time."

   ' This sample will demonstrate using smart time labels.
   Chart.XAxis.TimeScaleLabels.Mode = TimeScaleLabelMode.Smart


   ' *DYNAMIC DATA NOTE*
   ' This sample uses random data to populate the chart. To populate
   ' a chart with database data see the following resources:
   ' - Classic samples folder
   ' - Help File > Data Tutorials
   ' - Sample: features/DataEngine.aspx
   ' Add the random data.
   Chart.SeriesCollection.Add(getRandomData())
End Sub 'Page_Load



Function getRandomData() As SeriesCollection
   Dim SC As New SeriesCollection()
   Dim myR As New Random(1)
   Dim dt As New DateTime(2004, 8, 30)
   Dim a As Integer
   For a = 0 To 0
      Dim s As New Series()
      s.Name = "Series " + Convert.ToString(a)
      Dim b As Integer
      For b = 0 To 19
         Dim e As New Element()
         e.YValue = myR.Next(100)
         e.XDateTime = dt.AddDays(10)
         dt=dt.AddDays(10)
         s.Elements.Add(e)
      Next b
      SC.Add(s)
   Next a
   Return SC
End Function 'getRandomData

</script>
    </HEAD>
    <BODY>
        <DIV align="center">
            <dotnet:Chart id="Chart" runat="server" Width="568px" Height="344px">
            </dotnet:Chart>
        </DIV>
    </BODY>
</HTML>

Inheritance Hierarchy

System.Object
   dotnetCHARTING.Axis.TimeScaleLabelInfo

See Also