XAxis and YAxis
Chart Axes, which have been used in almost all chart types except pie chart, have two dimensions, XAxis and YAxis. In general, the YAxis is used to represent the data values and the XAxis is mainly for displaying data categories. And in the practical chart applications, a chart may have two YAxis. Axis Elements
Typically, each axis has five elements, which are GridLine, Axis line, Axis label, Axis marks and Item label. And in following text, we will illustrate the settings of above mentioned axis elements one by one. How to Set Gridline
To make the chart be better and easier viewed and understood, we will use some lines to form a grid. And those lines are called gridlines. In general, we can change the gridline style by changing the PenStyle, Color and Width using MajorGridLine and MinorGridLine. Following ASP.NET code will show you how to set the gridline of Axis. <YAxis>
And you can also set the gridline of chart using C# code. Please note, the all grid line is horizontal without overlap.
How to Set Axis Line
The appearance of Axis line can be fully customized by changing its color and width. And axis line has both x and y orientations. <XAxis StyleSet-Color="#FF0066" Appearance-Width="5"> How to Set Axis Label
The axis label, a text string title, can be used to explain the meaning of the units that each axis represents. And users can re-set the Axis Label style by using Appearance and TextBlock properties.
Following ASP.NET codes are used to add a axis label, define its position and customize its rotating degree. Besides, you can also modify the axis title's text value, text font, size, alignment mode, text color, wrap style and so on.
Add a axis label. Sometimes like chart legend, display the axis category name to us. <AxisLabel-TextArea-Text="XAxis Label Value">
Define axis position. You can set the axis to the Bottom or Top.
Customize axis rotating angle.
How to Set Axis Marks
How to Set Item Label
The MinValue and MaxValue properties are offered to help users define the minimum and maximum values that the data can be displayed. Besides, you can also add some rotation to created item label.
You can also make rotation to axis item label.
Unique YAxis and YAxis2 Properties
YAxis and YAxis2 are positioned at each side of the chart plot area. It means you can add double y axis to your web chart control with different categories. And you can set different value to dual axis, each column can be the same data format or not. In general, the scaling, spacing and values of YAxis and YAxis2 are the same. But you are free to set them to have different scale of measurements. Here we mainly talk about two properties that are specified for YAxis. One is AxisMode and the other is ScaleBreak. Look at this online demo to view YAxis and YAxis2 property.
Related Chart Axes Element Articles
If you want to set the axes properties using C#.NET programming code, you can visit Setting axes properties using c#. |
ASP.NET AJAX UI Controls ASP.NET AJAX Chart UI Control OverviewGetting StartedChart Element DiagramSeriesAxes LegendCaptionTickData GridChart Type Bar ChartPoint ChartLine ChartPie ChartArea ChartGantt ChartBubble ChartBezier ChartSpline ChartSpline Area ChartCandle Chart Chart With StackedFull Stacked ChartFeatures Automatic LayoutAutomatic Text-wrappingScrollingEmpty ValuesScale BreakMultiline LabelsWise LabelsMarking AreasMultiple TypesInteractiveDrill DownShadowEdtingData Binding Array DataList DataDatabase DataXML DataChart Style Chart SkinASP.NET AJAX Grid UI Control |