Şekillerle Çalışma - Aspose.Slides FOSS için Python

Aspose.Slides FOSS for Python provides classes for working with working with charts.


Overview

İlgili önemli sınıflar şunlardır:

  • Chart
  • ChartSeries
  • ChartSeriesCollection
  • ChartSeriesGroup
  • ChartSeriesGroupCollection

Başlatmak için

Aspose.Slides FOSS için Python yükleme:

pip install aspose-slides-foss

Temel Kullanım

import aspose.slides_foss as slides
from aspose.slides_foss.charts import ChartType
from aspose.slides_foss.export import SaveFormat

with slides.Presentation() as prs:
    slide = prs.slides[0]
    chart = slide.shapes.add_chart(ChartType.CLUSTERED_COLUMN, 100, 100, 500, 400)

    # add_chart() seeds the chart with sample series/category data
    series = chart.chart_data.series[0]
    print(f"Series: {series.name.as_literal_string}, {len(series.data_points)} point(s)")

    prs.save("chart.pptx", SaveFormat.PPTX)

İpuçları ve En İyi Uygulamalar

  • Kullanımdan sonra her zaman belge nesneleri çıkarın.
  • Dosya I/O istisnaları okurken veya yazarken işlemek
  • kontrol et API Referansları Son imza için

API Referans Özetleri

ClassDescription
ChartReferans dokunuşları
ChartSeriesReferans dokunuşları
ChartSeriesCollectionReferans dokunuşları
ChartSeriesGroupReferans dokunuşları
ChartSeriesGroupCollectionReferans dokunuşları

Ayrıntılar için bakın, API Referansları.

See Also

 Türkçe