IChart.SaveDecoration

Fore Syntax

SaveDecoration(Xml: IXmlDomElement);

Fore.NET Syntax

SaveDecoration(Xml: Prognoz.Platform.Interop.MsXml2.IXmlDomElemnt);

Parameters

Xml. XML document element.

Description

The SaveDecoration method saves custom style to an XML document.

Comments

The following chart settings are saved to XML documents:

Tag of the XML document Property
Type Type of the style (notional number, numbers 0, 1, 2 are reserved with system styles, a user cannot use them)
Name String name of the style (arbitrary)
CommonChartProperties General settings of the chart
ChartAreaDecoration Style of the chart area
GraphAreaDecoration Style of the chart plot area
LegendDecoration Legend formatting
ChartCaptionDecoration Chart title style
AxisXCaptionDecoration
AxisYCaptionDecoration
AxisYAdditionalCaptionDecoration
Style of a chart axis title (X, Y, YSec respectively)
AxisXUnitCaptionDecoration
AxisYUnitCaptionDecoration
AxisYAdditionalUnitCaptionDecoration
Style of title of measurement units of a chart axis (X, Y, YSec respectively)
AxisXDecoration
AxisYDecoration
AxisYAdditionalDecoration
Axis style (X, Y, YSec respectively)
DefaultSerieDecoration Default style applied to new chart series (newly created series)
AxisLinePen Pen for drawing axis line and axis scale marks
AxisGridPen pen for drawing a grid
NoDataFontColor Color of text of the series name in the legend (if all series values are empty)
FontColor Color of text of the series name in the legend
Background Fill of the element background
Shadow Element shadow
Direction Direction of the element shadow
Tags of chart properties
Smoothing Chart smoothing
RoundJoint Rounding of corners of bars of a bar chart
GridVisible Visibility of gird of the plot area of the chart
Tags of properties of a chart background object
BackgroundType Background type (0 – no background, 1 – solid fill, 2 – gradient, 3 – image, hatching, 4 – glossy fill)
MainColor Basic color for object background
FirstColor Start color of a gradient
LastColor End color of a gradient
GradientAngle Angle of gradient direction
Tags of drawing properties
Color Color (ARGB format, range of values [0 - 255])
Pen Pen
Width Pen width
Alignment Pen line alignment
EndCap, StartCap Shapes at the start and at the end of the line
SolidPen Pen color
Font Font
FontFamilyName Font family
FontSize Font size
FontSizeUnit Font measurement units
FontStyle Font style
Brush Brush
BrushType Brush type (0 – solid, 1 – hatching, 2 – texture, 3 – gradient brush with a complex shape, 4 – linear gradient)
SolidBrushColor Color of the one-colored brush
StartColor Start color of the gradient brush
EndColor End color of the gradient brush
NotImplemented Style preserving is not supported for texture brush (filling element background with an image) and brush of the GDI+ PathGradient type
Tags of properties of styles for new series
SeriePaletteCount Number of unique basic colors (it is recommended to use default value (8))
ColorHuge* Hue, color hue in the HSV model (there is a mistype in the tag, but unfortunately it cannot be corrected, * - color index [0; SeriePaletteCount-1])
ColorSaturation* Color saturation in the HSV model (* - color index [0; SeriePaletteCount-1])
StartBrightColorValue
StartDarkColorValue
Color value in the HSV model used to specify two colors of series background.
BarSerieBackgroundType Background type (see. above) used by default for a new bar series.
SerieBackgroundType Background type (see. above) used by default for a new series of all types except bar type.
SerieBorderWidth Pen width for a frame around a new series
SerieLineWidth Pen width for drawing a new series (linear series)
SerieNoDataLineWidth Pen width for drawing a new series (linear series), sections without data
SerieNoDataLineDash Pen hatching of a new linear series. sections without data

NOTE. When saving a style other parameters are saved for a pen or a brush, corresponding to parameters of GDI+ objects. Please refer to MSDN for detailed information.

Example

This example assumes that there is the Chart object of the IChart type.

Sub UserProc;
Var
    Chart: IChart;
    doc: IXmlDomDocument;
    element: IXmlDomElement;
    str: string = "<?xml version=""1.0"" encoding=""utf-8""?>" + #13 + #10 + "<test/>";
Begin
    doc := New DOMDocument40.Create;
    doc.loadXML(str);
    element := doc.documentElement;
    Chart.SaveDecoration(element);
    doc.save("c:\Temp\test.xml");
End Sub UserProc;

After executing the example custom style of the chart is serialized.

See also:

IChart | Example of changing color style for all chart series