ChartPrinter.SizeMode Property
Specifies the printing size mode for the chart control.
Namespace: DevExpress.XtraCharts.Printing
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
PrintSizeMode | A PrintSizeMode enumeration value, representing the chart’s size mode. |
Available values:
Name | Description |
---|---|
None | A chart is printed with its size identical to that shown on the form. |
Stretch | A chart is stretched or shrunk to fit the page on which it is printed. |
Zoom | A chart is resized proportionally (without clipping), so that it best fits the page on which it is printed. |
Example
This example demonstrates how to specify the printing settings of a chart (to fit its size to the page width), using the ChartPrinter class.
using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
using DevExpress.XtraCharts.Printing;
// ...
ChartPrinter cp;
private void button1_Click(object sender, EventArgs e) {
Link l = new Link(new PrintingSystem());
l.Landscape = true;
l.PaperKind = System.Drawing.Printing.PaperKind.A3;
cp = new ChartPrinter(this.chartControl1);
cp.Initialize(l.PrintingSystem, l);
cp.SizeMode = PrintSizeMode.Stretch;
l.CreateDetailArea += new CreateAreaEventHandler(l_CreateDetailArea);
l.ShowPreviewDialog();
cp.Release();
}
void l_CreateDetailArea(object sender, CreateAreaEventArgs e) {
cp.CreateDetail(e.Graph);
}
See Also