PdfContents.DrawChart Method (PdfChart, Double, Double, Boolean, Boolean)

PDF File Writer

PdfContentsDrawChart Method (PdfChart, Double, Double, Boolean, Boolean)

Draw chart

Namespace:  PdfFileWriter
Assembly:  PdfFileWriter (in PdfFileWriter.dll) Version: 1.1.24.0 (1.1.24.0)
Syntax
C#
public void DrawChart(
	PdfChart PdfChart,
	double OriginX,
	double OriginY,
	bool DisposeChart = true,
	bool GCCollect = true
)

Parameters

PdfChart
Type: PdfFileWriterPdfChart
PdfChart resource
OriginX
Type: SystemDouble
Origin X
OriginY
Type: SystemDouble
Origin Y
DisposeChart (Optional)
Type: SystemBoolean
Dispose chart
GCCollect (Optional)
Type: SystemBoolean
Run the garbage collector
Remarks

The chart is saved in the PDF document as an image.

The PdfChart resource contains a .NET Chart class. The .NET Chart defines width and height in pixels and image resolution in pixels per inch. This method calculates the chart's display width and height based on these values.

The .NET Chart member is defined by the user. It must be disposed in order to free unmanaged resources. If DisposeChart is true the DrawChart will call the Chart.Dispose() method. If the DisposeChart is false it is the responsibility of the calling method to dispose of the chart.

See Also