AxisScaleType Enumeration |
Specifies the possible scale types for an axis.
Namespace:
Aspose.Words.Drawing.Charts
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum AxisScaleType
Public Enumeration AxisScaleType
public enum class AxisScaleType
Members
| Member name | Value | Description |
---|
| Linear | 0 |
Linear scaling.
|
| Logarithmic | 1 |
Logarithmic scaling.
|
ExamplesShows how to set up logarithmic axis scaling.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape chartShape = builder.InsertChart(ChartType.Scatter, 450, 300);
Chart chart = chartShape.Chart;
chart.Series.Clear();
chart.Series.Add("Series 1", new[] { 1.0, 2.0, 3.0, 4.0, 5.0 }, new[] { 1.0, 20.0, 400.0, 8000.0, 160000.0 });
Assert.AreEqual(AxisScaleType.Linear, chart.AxisX.Scaling.Type);
chart.AxisY.Scaling.Type = AxisScaleType.Logarithmic;
chart.AxisY.Scaling.LogBase = 20.0;
doc.Save(ArtifactsDir + "Charts.AxisScaling.docx");
See Also