TXLSXCharts is the embedded-chart collection exposed by Consultați și.Charts and TXLSXChart owns the chart placement, axes and series
Declarații
function TXLSXCharts.Add: TXLSXChart; overload;
function TXLSXCharts.Add(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart; overload;
function TXLSXChart.AddSeries(const AName, ACategories, AValues: WideString): TXLSXChartSeries;
procedure TXLSXChart.ClearSeries;
property TXLSXChart.ChartType: TXLSXChartType;
property TXLSXChart.CategoryAxis, ValueAxis: TXLSXChartAxis;
property TXLSXChart.Series[Index: Integer]: TXLSXChartSeries;
Membrii diagramei
| Title, CategoryAxisTitle and ValueAxisTitle | Chart and axis caption text |
| FromRow, FromCol, ToRow and ToCol | One-based worksheet anchor rectangle |
| CategoryAxis and ValueAxis | Axis formatting and scaling objects |
| ShowDataTable and ShowDataTableKeys | Data-table display controls |
| HasUpDownBars, UpDownGapWidth and HasHiLowLines | Line and stock chart display controls |
| Rotation3DX, Rotation3DY, Elevation3D, Perspective3D and RightAngleAxes3D | Three-dimensional chart view controls |
Serii, linii de tendință și bare de eroare
function TXLSXChartSeries.AddTrendline(AType: TXLSXChartTrendlineType): TXLSXChartTrendline;
function TXLSXChartSeries.AddErrorBar(ADir: TXLSXChartErrDir): TXLSXChartErrBar;
property TXLSXChartSeries.Trendlines[Index: Integer]: TXLSXChartTrendline;
property TXLSXChartSeries.ErrBarX, ErrBarY: TXLSXChartErrBar;
property TXLSXChartTrendline.TrendlineType: TXLSXChartTrendlineType;
property TXLSXChartTrendline.DispEq, DispRSqr: Boolean;
property TXLSXChartTrendline.Order, Period: Integer;
property TXLSXChartErrBar.ValueType: TXLSXChartErrValType;
property TXLSXChartErrBar.Value, PlusValue, MinusValue: Double;
| TrendlineType | Linear, exponential, logarithmic, polynomial, power or moving-average trendline |
| DispEq and DispRSqr | Shows the equation and R-squared value on the chart |
| Order and Period | Polynomial order or moving-average period for the corresponding trendline type |
| ValueType | Fixed, percentage, standard-deviation, standard-error or custom error magnitude |
| NoEndCap | Hides the cap at either end of an error bar |
Membrii axelor și etichetelor de date
| LogBase and Orientation | Logarithmic scale base and normal or reversed axis ordering |
| MajorGridlines and MinorGridlines | Gridline visibility controls |
| MinValue, MaxValue, MajorUnit and MinorUnit | Explicit scaling bounds and tick spacing where supported |
| CrossesAt, TickLblPos and DispUnits | Axis crossing position, label placement and display units |
ShowValue, ShowCategoryName, ShowSeriesName, ShowLegendKey, ShowPercent and ShowBubbleSize | ShowValue, ShowCategoryName, ShowSeriesName, ShowLegendKey, ShowPercent and ShowBubbleSize |
| Per-series data-label components | Per-series data-label components |
Text used between multiple displayed data-label components
var Chart: TXLSXChart;
begin
Chart := Sheet.Charts.Add(xlsxChartColumn, 'Monthly sales', 2, 5, 18, 12);
Chart.AddSeries('Sales', 'Sheet1!$A$2:$A$13', 'Sheet1!$B$2:$B$13');
Chart.ValueAxisTitle := 'Amount';
Chart.Series[0].AddTrendline(xlsxTrendLinear).DispRSqr := True;
Chart.Series[0].ShowValue := True;
end;Exemplu