$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
How to Set up Chart Ticks of ASP.NET AJAX Using C#
Home > How to > Chart Tick

KT.UI C# ASP.NET AJAX Chart Element Control allows users to put up and define chart ticks within well designed C# project. There are two ticks types within a chart: vertical ticks and horizontal ticks. The horizontal ticks are labeled and displayed on y axis and the secondary y aixs, which can be both minor ticks and major ticks; and the vertical ticks are only labeled on x axis and are all major ticks.
To create a simple chart tick application and have better post-modifications, please do as the step by step instructions demonstrated below.

Ticks Properties Within C#.NET Application

Before we begin to make and specify chart ticks with provided C# sample codes, we list ticks mproperties in this section. KT.UI ASP.NET AJAX Chart component offers rich chart ticks creation and customization tools just like other elements. To be specific, we provide the ticks visibility C# control to allow users to display or hide ticks; the ticks cap tools for setting ticks start and end caps; color item for adjusting ticks’ lines and caps; length tool for setting ticks in pixels and PenStyle for ticks values as well as ticks width in pixels.
Major and minor tick objects include following properties:
  • Cap: ticks caps include StartCap and EndCap. Both ticks caps can be in these shapes: Flat, Square, Round, Triangle, NoAnchor, SquareAnchor, DiamondAnchor, ArrowAnchor, AnchorMask or Custom.
  • Length: the unit for ticks' length is pixels. We can reverse the direction of ticks and let them show negative value for length.
  • Width: the ticks' width is also in pixels unit.
  • PenStyle: this object can decide the ticks' filled color mode and the values can be Solid, Dash, Dot, DashDot, DashDotDot and Custom.
  • Color: use this property to set the ticks' lines and caps color based on your own needs.
Please check out following C# sample codes for setting all the ticks properties. Users are allowed to directly copy and paste them into your C# chart project to realize the ticks customizations. Using the advantage programming code, you can add a range of ticks to the web chart control, and make the chart appearacen better and can be easier to read and analysis the data.

KaxChart1.Diagram.AxisY.StyleSet.MajorTick.Visible = true;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.StartCap = System.Drawing.Drawing2D.LineCap.Round;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.EndCap = System.Drawing.Drawing2D.LineCap.Triangle;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.Length = 3;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.PenStyle = System.Drawing.Drawing2D.DashStyle.Solid;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.Color = System.Drawing.Color.Red;
KaxChart1.Diagram.AxisY.StyleSet.MajorTick.Width = 2;

KaxChart1.Diagram.AxisY.StyleSet.MinorTick.Visible = true;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.StartCap = System.Drawing.Drawing2D.LineCap.Flat;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.EndCap = System.Drawing.Drawing2D.LineCap.Flat;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.Length = 2;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.PenStyle = System.Drawing.Drawing2D.DashStyle.Dot;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.Color = System.Drawing.Color.OrangeRed;
KaxChart1.Diagram.AxisY.StyleSet.MinorTick.Width = 1;

Layout Within C#.NET Application

The layout modes tools of chart can be used to change the chart appearance while the underlying data remains the same. The supportable LayoutMode values are Normal, Inside and Between. The reason why you need modify these features is it can bring a better view chart to you.
C# example codes below demonstrate how to set chart layout mode in between form within C#.NET application.

KaxChart1.Diagram.AxisX.MaxValue = 5;
KaxChart1.Diagram.AxisX.MinValue = 1;
KaxChart1.Diagram.AxisX.Step = 1;
KaxChart1.Diagram.AxisX.LayoutMode = ChartAxisLayoutMode.Between;
ASP.NET AJAX UI Controls