Specifies the possible positions for tick marks.
Namespace:
Aspose.Words.Drawing.Charts
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
SyntaxPublic Enumeration AxisTickMark
public enum class AxisTickMark
Members
| Member name | Value | Description |
---|
| Cross | 0 |
Specifies that the tick marks shall cross the axis.
|
| Inside | 1 |
Specifies that the tick marks shall be inside the plot area.
|
| Outside | 2 |
Specifies that the tick marks shall be outside the plot area.
|
| None | 3 |
Specifies that there shall be no tick marks.
|
ExamplesShows how to insert chart with date/time values.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;
chart.Series.Clear();
chart.Series.Add("Aspose Test Series",
new[]
{
new DateTime(2017, 11, 06), new DateTime(2017, 11, 09), new DateTime(2017, 11, 15),
new DateTime(2017, 11, 21), new DateTime(2017, 11, 25), new DateTime(2017, 11, 29)
},
new[] { 1.2, 0.3, 2.1, 2.9, 4.2, 5.3 });
ChartAxis xAxis = chart.AxisX;
ChartAxis yAxis = chart.AxisY;
xAxis.Scaling.Minimum = new AxisBound(new DateTime(2017, 11, 05).ToOADate());
xAxis.Scaling.Maximum = new AxisBound(new DateTime(2017, 12, 03));
xAxis.BaseTimeUnit = AxisTimeUnit.Days;
xAxis.MajorUnit = 7;
xAxis.MinorUnit = 1;
xAxis.MajorTickMark = AxisTickMark.Cross;
xAxis.MinorTickMark = AxisTickMark.Outside;
yAxis.TickLabelPosition = AxisTickLabelPosition.High;
yAxis.MajorUnit = 100;
yAxis.MinorUnit = 50;
yAxis.DisplayUnit.Unit = AxisBuiltInUnit.Hundreds;
yAxis.Scaling.Minimum = new AxisBound(100);
yAxis.Scaling.Maximum = new AxisBound(700);
doc.Save(ArtifactsDir + "Charts.DateTimeValues.docx");
See Also