Export (0) Print
Expand All

Chart.LoadTemplate Method (String)

Loads a template with the specified filename from the disk.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public void LoadTemplate(
	string name
)

Parameters

name
Type: System.String

The file name of the template to load. You must specify the full path of the template to be loaded from the disk.

The name parameter must use a full path, for example, C:\MyPic.jpg. Note that you must also specify the file extension.

This method loads a template from disk that was saved using the Save method.

Make sure to set the IsTemplateMode property to true before saving the template with the Save method.

If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In other words, the first template series appearance properties are assigned to the first series of the chart, the second template series appearance properties are applied to the second series of the chart, then the first template series is used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections that have appearance properties.

Templates can be used to simulate custom palettes.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft