Tùy chỉnh trục biểu đồ trong bản trình chiếu .NET
Tổng quan
Bài viết này giải thích cách tùy chỉnh trục biểu đồ với Aspose.Slides for .NET. Nó bao gồm các giá trị trục đã tính, chuyển đổi hàng và cột biểu đồ, hiển thị trục, khoảng cách nhãn danh mục và dấu tick, danh mục ngày và định dạng, xoay tiêu đề, vị trí trục, đơn vị hiển thị và tỷ lệ logarit.
Lấy Giá Trị Tối Đa Trên Trục Dọc Trong Biểu Đồ
Tạo một Presentation và thêm một biểu đồ khu vực với dữ liệu mặc định. Gọi ValidateChartLayout trước khi đọc các giá trị trục đã tính để bố cục biểu đồ được cập nhật.
Đọc ActualMaxValue và ActualMinValue để lấy giới hạn trục, và ActualMajorUnit và ActualMinorUnit để lấy khoảng cách dấu tick. ActualMajorUnitScale và ActualMinorUnitScale cung cấp tỉ lệ đơn vị thời gian, có liên quan đến trục ngày. Ví dụ lưu các giá trị này vào các biến cục bộ và lưu biểu đồ.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.Area, 100, 100, 500, 350);
chart.ValidateChartLayout();
var maxValue = chart.Axes.VerticalAxis.ActualMaxValue;
var minValue = chart.Axes.VerticalAxis.ActualMinValue;
var majorUnit = chart.Axes.VerticalAxis.ActualMajorUnit;
var minorUnit = chart.Axes.VerticalAxis.ActualMinorUnit;
var majorUnitScale = chart.Axes.VerticalAxis.ActualMajorUnitScale;
var minorUnitScale = chart.Axes.VerticalAxis.ActualMinorUnitScale;
presentation.Save("AxisValues_out.pptx", SaveFormat.Pptx);
Hoán Đổi Dữ Liệu Giữa Các Trục
Use SwitchRowColumn to exchange the roles of series and categories in chart data. Each former category becomes a series, and each former series becomes a category. This changes how the data is grouped; it does not exchange the horizontal and vertical axes. The example uses SetRange to bind the default data to Sheet1!A1:D5, including the header row and category column, before switching rows and columns. It saves a chart with four series and three categories.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 100, 100, 400, 300);
chart.ChartData.SetRange("Sheet1!A1:D5");
chart.ChartData.SwitchRowColumn();
presentation.Save("SwitchChartRowColumns_out.pptx", SaveFormat.Pptx);
Đảo Ngược Thứ Tự Vẽ Của Một Trục
Use IsPlotOrderReversed to reverse a category or value axis. For example, a horizontal bar chart can show project stages from top to bottom in the same order as the worksheet: Planning, Development, Testing. Reversing an axis changes the plotting direction; it does not sort or rearrange the workbook data. By comparison, SwitchRowColumn exchanges the roles of series and categories.
The following example creates a horizontal bar chart with three stages and one series. It saves a presentation with three slides: normal order, reversed categories, and reversed values. Each copy uses the same dataset, and only one axis is reversed on each copy.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredBar, 50, 40, 620, 320);
chart.HasLegend = false;
chart.ChartData.Categories.Clear();
chart.ChartData.Series.Clear();
var workbook = chart.ChartData.ChartDataWorkbook;
workbook.Clear(0);
var series = chart.ChartData.Series.Add(ChartType.ClusteredBar);
var stages = new[] { "Planning", "Development", "Testing" };
var values = new[] { 10, 30, 20 };
for (var i = 0; i < stages.Length; i++)
{
var categoryCell = workbook.GetCell(0, i + 1, 0, stages[i]);
chart.ChartData.Categories.Add(categoryCell);
var valueCell = workbook.GetCell(0, i + 1, 1, values[i]);
series.DataPoints.AddDataPointForBarSeries(valueCell);
}
// Slide 2: hiển thị danh mục đầu tiên ở trên cùng.
var categorySlide = presentation.Slides.AddClone(slide);
var categoryChart = (IChart)categorySlide.Shapes[0];
categoryChart.Axes.VerticalAxis.IsPlotOrderReversed = true;
// Giữ trục giá trị ngang ở phía dưới.
categoryChart.Axes.VerticalAxis.CrossType = CrossesType.Maximum;
// Slide 3: đảo ngược chỉ thang số ngang.
var valueSlide = presentation.Slides.AddClone(slide);
var valueChart = (IChart)valueSlide.Shapes[0];
valueChart.Axes.HorizontalAxis.IsPlotOrderReversed = true;
presentation.Save("ReversedAxes.pptx", SaveFormat.Pptx);
Reversing an axis can also move the perpendicular axis to the opposite side of the plot. CrossType controls where the other axis crosses the axis being configured. In slide 2, setting it to Maximum on the reversed category axis keeps the horizontal value axis at the bottom. For a specific crossing point, use CrossAt. Check the crossing settings when changing direction, especially if the chart already has a custom crossing point. Set IsPlotOrderReversed back to false to restore the normal plotting direction; crossing settings are separate.
| Normal order (slide 1) | Reversed categories (slide 2) | Reversed values (slide 3) |
|---|---|---|
![]() |
![]() |
![]() |
| Danh mục chạy từ dưới lên trên; giá trị tăng từ trái sang phải. | Lập kế hoạch, Phát triển và Kiểm thử chạy từ trên xuống dưới. Giá trị và thứ tự hàng trong workbook không thay đổi. | Danh mục giữ nguyên thứ tự bình thường; giá trị tăng từ phải sang trái. Trục danh mục cắt tại số 0 ở bên phải. |
Vô Hiệu Hóa Trục Dọc Cho Biểu Đồ Đường
Set IsVisible to false on the vertical axis to hide it. The example creates a line chart with default data and saves it with the vertical axis hidden.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.Line, 100, 100, 400, 300);
chart.Axes.VerticalAxis.IsVisible = false;
presentation.Save("HiddenVerticalAxis.pptx", SaveFormat.Pptx);
Vô Hiệu Hóa Trục Ngang Cho Biểu Đồ Đường
Set IsVisible to false on the horizontal axis to hide it. The example creates a line chart with default data and saves it with the horizontal axis hidden.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.Line, 100, 100, 400, 300);
chart.Axes.HorizontalAxis.IsVisible = false;
presentation.Save("HiddenHorizontalAxis.pptx", SaveFormat.Pptx);
Hiển Thị Hoặc Ẩn Lưới Biểu Đồ
Read ShowMajorGridLines and ShowMinorGridLines to check which gridlines an axis displays. Both properties are read-only. Use the line fill of MinorGridLinesFormat to show or hide minor gridlines. Set a solid fill with a visible color to show them, or use FillType.NoFill to hide them. The corresponding setting for major gridlines is MajorGridLinesFormat.Line.FillFormat. Changing a gridline fill preserves the axis visibility and tick marks.
The vertical axis of this clustered column chart starts with major gridlines visible and minor gridlines hidden. The example shows the minor gridlines in orange, then hides them again before saving the presentation.
using System;
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 30, 30, 660, 230);
var axis = chart.Axes.VerticalAxis;
Console.WriteLine($"Initial: major={axis.ShowMajorGridLines}, minor={axis.ShowMinorGridLines}");
var minorFill = axis.MinorGridLinesFormat.Line.FillFormat;
minorFill.FillType = FillType.Solid;
minorFill.SolidFillColor.Color = Color.DarkOrange;
Console.WriteLine($"Enabled: minor={axis.ShowMinorGridLines}");
minorFill.FillType = FillType.NoFill;
Console.WriteLine($"Hidden: major={axis.ShowMajorGridLines}, minor={axis.ShowMinorGridLines}");
presentation.Save("ChartGridlines.pptx", SaveFormat.Pptx);
| Lưới phụ được bật | Lưới phụ ẩn |
|---|---|
![]() |
![]() |
Thay Đổi Trục Danh Mục
Set CategoryAxisType to choose a date or text category axis. This example requires ExistingChart.pptx, with a chart as the first shape on the first slide and category cells containing numeric Excel date values. It changes the horizontal axis to a date axis. Setting IsAutomaticMajorUnit to false, MajorUnit to 1, and MajorUnitScale to months places major ticks at one-month intervals.
using System;
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation("ExistingChart.pptx");
var slide = presentation.Slides[0];
var chart = (IChart) slide.Shapes[0];
chart.Axes.HorizontalAxis.CategoryAxisType = CategoryAxisType.Date;
chart.Axes.HorizontalAxis.IsAutomaticMajorUnit = false;
chart.Axes.HorizontalAxis.MajorUnit = 1;
chart.Axes.HorizontalAxis.MajorUnitScale = TimeUnitType.Months;
presentation.Save("ChangeChartCategoryAxis_out.pptx", SaveFormat.Pptx);
Xác Định Kiểu Trục Danh Mục Từ Dữ Liệu
Call SetCategoryAxisTypeAutomatically after populating the categories, then read CategoryAxisType to inspect the selection. This is useful when the same chart receives either text labels or numeric date values. The method determines the type when called; it does not enable a persistent mode that reevaluates later data changes. Call it again after replacing the categories.
The following example creates a chart with text categories and prints Text. It then replaces the category cell values with dates and calls the method again, which prints Date. Dates are stored as numeric OLE Automation values returned by DateTime.ToOADate, rather than date strings. CustomNumberFormat controls how those values are displayed; it does not convert text into numeric dates. For more on category cells, see Sổ làm việc Biểu Đồ.
Use automatic determination when the input is known to contain text categories or numeric dates, as in this example. For ordinary numeric labels, mixed categories, or empty data, explicitly set CategoryAxisType to match the intended meaning. Numeric values alone do not establish that the categories represent dates.
using System;
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 30, 40, 660, 320);
chart.ChartData.Categories.Clear();
chart.ChartData.Series.Clear();
var workbook = chart.ChartData.ChartDataWorkbook;
workbook.Clear(0);
var seriesName = workbook.GetCell(0, 0, 1, "Sales");
var series = chart.ChartData.Series.Add(seriesName, chart.Type);
var labels = new[] { "First", "Second", "Third" };
for (var i = 0; i < labels.Length; i++)
{
var categoryCell = workbook.GetCell(0, i + 1, 0, labels[i]);
chart.ChartData.Categories.Add(categoryCell);
var valueCell = workbook.GetCell(0, i + 1, 1, (i + 1) * 10);
series.DataPoints.AddDataPointForBarSeries(valueCell);
}
var axis = chart.Axes.HorizontalAxis;
axis.SetCategoryAxisTypeAutomatically();
Console.WriteLine(axis.CategoryAxisType); // Văn bản
var dates = new[] { new DateTime(2026, 1, 1), new DateTime(2026, 1, 2), new DateTime(2026, 2, 1) };
for (var i = 0; i < dates.Length; i++)
{
var categoryCell = workbook.GetCell(0, i + 1, 0);
categoryCell.Value = dates[i].ToOADate();
categoryCell.CustomNumberFormat = "yyyy-mm-dd";
}
axis.SetCategoryAxisTypeAutomatically();
Console.WriteLine(axis.CategoryAxisType); // Ngày
presentation.Save("AutomaticCategoryAxis.pptx", SaveFormat.Pptx);
Kiểm Soát Khoảng Cách Nhãn Trục Danh Mục
When a chart has many categories, reduce the number of visible axis labels without removing categories or data points. Set IsAutomaticTickLabelSpacing to false, then set TickLabelSpacing to the desired category interval. For text categories in their normal order, counting starts at the first category:
| Khoảng | Nhãn hiển thị trong ví dụ |
|---|---|
1 |
Danh mục 1, Danh mục 2, Danh mục 3, … Danh mục 24 |
2 |
Danh mục 1, Danh mục 3, Danh mục 5, … Danh mục 23 |
3 |
Danh mục 1, Danh mục 4, Danh mục 7, … Danh mục 22 |
An interval of 3 displays every third label, leaving two labels hidden between displayed labels. It does not remove the corresponding columns. Automatic spacing chooses an interval based on the available space; it does not necessarily display every label.
Tick marks have separate controls. Set IsAutomaticTickMarksSpacing to false and use TickMarksSpacing to set their interval. For example, 1 keeps a tick mark at every category interval while labels appear only every third category. Set MajorTickMark to a visible style so you can see the result. Setting either automatic-spacing property back to true lets the chart choose that interval again.
The following self-contained example creates 24 categories and one series, then saves three slides in CategoryAxisIntervals.pptx: automatic spacing, manual label spacing with independent tick marks, and restored automatic spacing. The two copies retain the original chart data. No input presentation is required. Horizontal label text makes the difference in density easy to see.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 30, 40, 660, 320);
chart.HasLegend = false;
chart.ChartData.Categories.Clear();
chart.ChartData.Series.Clear();
var workbook = chart.ChartData.ChartDataWorkbook;
workbook.Clear(0);
var series = chart.ChartData.Series.Add(ChartType.ClusteredColumn);
for (var i = 0; i < 24; i++)
{
var categoryCell = workbook.GetCell(0, i + 1, 0, $"Category {i + 1}");
chart.ChartData.Categories.Add(categoryCell);
var valueCell = workbook.GetCell(0, i + 1, 1, 10 + i % 6 * 5);
series.DataPoints.AddDataPointForBarSeries(valueCell);
}
var axis = chart.Axes.HorizontalAxis;
axis.CategoryAxisType = CategoryAxisType.Text;
axis.TextFormat.TextBlockFormat.RotationAngle = 0;
axis.TextFormat.PortionFormat.FontHeight = 12;
axis.MajorTickMark = TickMarkType.Outside;
axis.IsAutomaticTickLabelSpacing = true;
axis.IsAutomaticTickMarksSpacing = true;
// Slide 2: hiển thị mỗi nhãn thứ ba, nhưng giữ dấu tick cho mỗi danh mục.
var manualSlide = presentation.Slides.AddClone(slide);
var manualChart = (IChart)manualSlide.Shapes[0];
var manualAxis = manualChart.Axes.HorizontalAxis;
manualAxis.IsAutomaticTickLabelSpacing = false;
manualAxis.TickLabelSpacing = 3;
manualAxis.IsAutomaticTickMarksSpacing = false;
manualAxis.TickMarksSpacing = 1;
// Slide 3: cho phép biểu đồ chọn lại cả hai khoảng cách.
var restoredSlide = presentation.Slides.AddClone(manualSlide);
var restoredChart = (IChart)restoredSlide.Shapes[0];
restoredChart.Axes.HorizontalAxis.IsAutomaticTickLabelSpacing = true;
restoredChart.Axes.HorizontalAxis.IsAutomaticTickMarksSpacing = true;
presentation.Save("CategoryAxisIntervals.pptx", SaveFormat.Pptx);
Automatic spacing (slide 1): Trong bản render này, mỗi nhãn danh mục thứ hai được hiển thị và xuống dòng thành hai dòng. Kết quả tự động có thể thay đổi tùy theo kích thước biểu đồ, phông chữ và bộ render.

Manual spacing (slide 2): Mỗi nhãn thứ ba được hiển thị trên một dòng, trong khi dấu tick vẫn ở mỗi khoảng danh mục. Tất cả 24 cột, kể cả những cột không có nhãn, vẫn hiển thị với các giá trị giống nhau. Slide 3 khôi phục lại giao diện tự động như trên.

Chọn Trục và Khoảng Cách Phù Hợp
Use this category-count interval for a text category axis, such as the category axis of a column, line, area, or bar chart. In a column chart, it is the horizontal axis. In a horizontal bar chart, the category axis is vertical, so apply these settings to VerticalAxis. Tick-mark spacing also applies to a series axis in charts that have one.
Do not use category label spacing to set the numeric scale of a value axis. On a value axis, MajorUnit specifies a difference in values: for example, a major unit of 10 produces ticks at 0, 10, 20, and so on when the axis starts at zero. A category label interval of 3 instead counts category positions, regardless of their data values. Scatter and bubble charts use value axes rather than a text category axis. For a date axis, use time-based major units and scales as described in Change a Category Axis.
Đặt Định Dạng Ngày Cho Giá Trị Trục Danh Mục
The example replaces the default chart data with four annual values. Dates are stored as OLE Automation serial numbers in the first worksheet (index 0). Set CategoryAxisType to a date axis, disable IsNumberFormatLinkedToSource, and assign yyyy to NumberFormat so the category labels display four-digit years independently of the cell formatting.
using System;
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.Line, 50, 50, 450, 300);
chart.ChartData.Categories.Clear();
chart.ChartData.Series.Clear();
var workbook = chart.ChartData.ChartDataWorkbook;
workbook.Clear(0);
var series = chart.ChartData.Series.Add(ChartType.Line);
for (var i = 0; i < 4; i++)
{
var date = new DateTime(2015 + i, 1, 1);
var categoryCell = workbook.GetCell(0, i + 1, 0, date.ToOADate());
chart.ChartData.Categories.Add(categoryCell);
var valueCell = workbook.GetCell(0, i + 1, 1, i + 1);
series.DataPoints.AddDataPointForLineSeries(valueCell);
}
chart.Axes.HorizontalAxis.CategoryAxisType = CategoryAxisType.Date;
chart.Axes.HorizontalAxis.IsNumberFormatLinkedToSource = false;
chart.Axes.HorizontalAxis.NumberFormat = "yyyy";
presentation.Save("DateAxisFormat.pptx", SaveFormat.Pptx);
Đặt Góc Xoay Cho Tiêu Đề Trục Biểu Đồ
Enable HasTitle on the vertical axis, provide title text, and set RotationAngle to rotate the title. The angle is measured in degrees; this example saves a column chart with its value-axis title rotated by 90 degrees.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 450, 300);
chart.Axes.VerticalAxis.HasTitle = true;
chart.Axes.VerticalAxis.Title.AddTextFrameForOverriding("Value");
chart.Axes.VerticalAxis.Title.TextFormat.TextBlockFormat.RotationAngle = 90;
presentation.Save("RotatedAxisTitle.pptx", SaveFormat.Pptx);
Đặt Vị Trí Trục Trên Trục Danh Mục Hoặc Trục Giá Trị
Use AxisBetweenCategories to control whether the value axis crosses the category axis between categories or at category tick marks. This property applies to category axes. The example sets it to true on the horizontal category axis of a column chart and saves the result.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 450, 300);
chart.Axes.HorizontalAxis.AxisBetweenCategories = true;
presentation.Save("AxisBetweenCategories.pptx", SaveFormat.Pptx);
Đặt Đơn Vị Hiển Thị Trên Trục Giá Trị Biểu Đồ
Set DisplayUnit to scale the labels on a value axis without changing the underlying data. With DisplayUnitType set to Millions, a value of 60,000,000 is displayed as 60. The example creates a column chart and applies the millions display unit to its vertical axis.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 450, 300);
chart.Axes.VerticalAxis.DisplayUnit = DisplayUnitType.Millions;
presentation.Save("Result.pptx", SaveFormat.Pptx);
Cấu Hình Trục Giá Trị Logarit
A logarithmic value axis is useful when positive values span several orders of magnitude. For example, a service might receive 10, 100, 1,000, 10,000, and 100,000 requests over five periods. On a linear scale, the smaller values appear close together near zero. A logarithmic scale makes their relative growth easier to compare: equal distances represent equal ratios rather than equal differences.
Set IsLogarithmic to true on the value axis and use LogBase to choose the base. This changes how the existing values are displayed; it does not change the data or add a logarithmic trend line. A trend line represents a fitted relationship in the data and is a separate feature.
Chọn Trục Giá Trị và Cơ Số
For a line or column chart, the value axis is VerticalAxis. For a horizontal bar chart, it is HorizontalAxis. Scatter and bubble charts have two value axes, so choose the horizontal axis for X values, the vertical axis for Y values, or both. Do not apply logarithmic scaling to a category axis.
The default logarithmic base is 10. For PPTX charts, use a base from 2 through 1000, inclusive; fractional bases such as 2.5 are also supported. With base 10, successive powers such as 10, 100, 1,000, and 10,000 are equally spaced.
So Sánh Thang Độ Tuyến Tính và Logarit
The following self-contained example creates a line chart with the five request counts on the first slide, then clones that slide and enables a base-10 logarithmic value axis on the second. Both slides retain the same data.
using Aspose.Slides;
using Aspose.Slides.Charts;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var chart = slide.Shapes.AddChart(ChartType.Line, 30, 40, 660, 200);
chart.HasLegend = false;
chart.ChartData.Categories.Clear();
chart.ChartData.Series.Clear();
var workbook = chart.ChartData.ChartDataWorkbook;
workbook.Clear(0);
var series = chart.ChartData.Series.Add(ChartType.Line);
var values = new double[] { 10, 100, 1000, 10000, 100000 };
for (var i = 0; i < values.Length; i++)
{
var categoryCell = workbook.GetCell(0, i + 1, 0, $"Period {i + 1}");
chart.ChartData.Categories.Add(categoryCell);
var valueCell = workbook.GetCell(0, i + 1, 1, values[i]);
series.DataPoints.AddDataPointForLineSeries(valueCell);
}
// Giữ slide đầu tiên ở dạng tuyến tính và chỉ thay đổi thang đo trục giá trị của bản sao.
var logarithmicSlide = presentation.Slides.AddClone(slide);
var logarithmicChart = (IChart)logarithmicSlide.Shapes[0];
var valueAxis = logarithmicChart.Axes.VerticalAxis;
valueAxis.IsLogarithmic = true;
valueAxis.LogBase = 10;
presentation.Save("LogarithmicAxis.pptx", SaveFormat.Pptx);
Linear scale (slide 1): Equal vertical distances represent equal differences in request counts. The largest value dominates the chart, making the smaller values difficult to distinguish.

Logarithmic scale (slide 2): Equal vertical distances represent equal ratios. Each period has ten times as many requests as the previous one, so the points form a straight rising line on the base-10 scale. The axis labels still show the original request counts.

Xử Lý Giá Trị Zero và Âm
A logarithmic scale can display only strictly positive values. Check the data before enabling it. If zero or negative values are meaningful, keep a linear scale or show them separately. If excluding those values is appropriate for the analysis, explain the omission. Do not silently replace them with small positive numbers, as this changes the meaning of the data. Any manually configured minimum or maximum for a logarithmic axis must also be positive.
Câu Hỏi Thường Gặp
Làm thế nào để đặt giá trị mà một trục cắt trục còn lại (giao điểm trục)?
Use CrossType to select the crossing behavior. To specify a numeric crossing value, set CrossAt. These settings let you move the axis crossing to a suitable baseline.
Làm sao tôi có thể định vị nhãn dấu tick tương đối với trục?
Set TickLabelPosition using TickLabelPositionType: Low, High, NextTo, or None. To control the tick marks themselves, use MajorTickMark or MinorTickMark; these are separate from label positioning.




