Table of Contents

Class ChartGraphicBlock

Namespace
Sage.CRM.Blocks
Assembly
SageCRMNet.dll

This block inherits all the capabilities of the Graphics Block and adds to it the ability to generate a variety of different charts. These charts may depend on data retrieved via SQL or added through ASP for their values. In this way, they can be fully dynamic and represent data at a specific moment in time.

public class ChartGraphicBlock : GraphicBlock
Inheritance
ChartGraphicBlock
Inherited Members

Constructors

ChartGraphicBlock()

Initializes a new instance of ChartGraphicBlock.

public ChartGraphicBlock()

ChartGraphicBlock(string)

Initializes a new instance of ChartGraphicBlock.

public ChartGraphicBlock(string blockName)

Parameters

blockName string

Block Name.

Properties

BackImage

Sets the background image to the graphic.

public string BackImage { get; set; }

Property Value

string

Examples

myGraphic.BackImage = ".\Img\Backgrounds\lightpurplemarble.gif";

BarWidthPercent

Bar Width in percent(0-100).

public int BarWidthPercent { get; set; }

Property Value

int

DateTimeFormat

Sets the formart for DateTime.

public string DateTimeFormat { get; set; }

Property Value

string

Examples

myGraphic.DateTimeFormat = "dd/mm/yyyy";

DifferentColors

public bool DifferentColors { get; set; }

Property Value

bool

LableX

Label for Axis X.

public string LableX { get; set; }

Property Value

string

LableY

Label for Axis Y.

public string LableY { get; set; }

Property Value

string

LegendOnly

Show only the legend.

public bool LegendOnly { get; set; }

Property Value

bool

MaxX

Set or Get the max value for the X Axis.

public int MaxX { get; set; }

Property Value

int

MaxY

Set or Get the max value for the Y Axis.

public int MaxY { get; set; }

Property Value

int

MinX

Set or Get the minimal value for the X Axis.

public int MinX { get; set; }

Property Value

int

MinY

Set or Get the minimal value for the Y Axis.

public int MinY { get; set; }

Property Value

int

SqlText

SQL query used to create the chart.

public string SqlText { get; set; }

Property Value

string

Remarks

Should be the last property set before calling the method Execute().

StyleName

Define the styles that will be applied to the Chart.

public ChartStyleNames StyleName { get; set; }

Property Value

ChartStyleNames

Examples

myGraphic.StyleName = Sage.Graphics.ChartStyleNames.Bar;

XLProp

public string XLProp { get; set; }

Property Value

string

XProp

public string XProp { set; }

Property Value

string

YProp

public string YProp { get; set; }

Property Value

string

Methods

ApplyBarStyle(string)

Sets the style of the bars used in bar and horizontal bar graphs. This does not apply to styles other than 'Bar' and 'Hbar'. The default is RectGradient where JPEG (16m color) is used or Rectangle for GIFs (256 colors). Gets values from Sage.CRM.ChartBarStyles.

public bool ApplyBarStyle(string command)

Parameters

command string

Chart bar style

Returns

bool

True if the style was applied without error.

Examples

myGraphic.ApplyBarStyle(Sage.Graphics.ChartBarStyles.Arrow);

BackGradient(bool, string, string)

Sets a gradient background to the chart.

public bool BackGradient(bool isVisible, string startColor, string endColor)

Parameters

isVisible bool

True to show the gradient.

startColor string

Start color.

endColor string

End color.

Returns

bool

True if the gradient background was set successfully.

Examples

myGraphic.BackGradient(false, "blue", "white");

ChartTitle(string)

Set the chart title.

public bool ChartTitle(string text)

Parameters

text string

Title string.

Returns

bool

True if the title was set successfully.

~ChartGraphicBlock()

Destructor class for ChartGraphicBlock.

protected ~ChartGraphicBlock()

Make2d()

Set the chart to 2D.

public bool Make2d()

Returns

bool

Make3d()

Set the chart to 3D.

public bool Make3d()

Returns

bool

Make3d(int)

Set the chart to 3D.

public bool Make3d(int percentage)

Parameters

percentage int

Percentage value (1-100).

Returns

bool

ManualChartEntry(string, bool)

public bool ManualChartEntry(string values, bool makeNull)

Parameters

values string
makeNull bool

Returns

bool

MoveLegend(string)

Set the legend position.

public bool MoveLegend(string text)

Parameters

text string

Legend position. Top Left Right Bottom

Returns

bool

True if the legend position was set successfully.

ShowAxis(bool)

Show/hid the Axis.

public bool ShowAxis(bool onoff)

Parameters

onoff bool

True to show the Axis.

Returns

bool

ShowLegend(bool)

Show/hid the Legend.

public bool ShowLegend(bool onoff)

Parameters

onoff bool

True to show the Legend.

Returns

bool

ShowMarks(bool)

Show/hide the marks.

public bool ShowMarks(bool onoff)

Parameters

onoff bool

True to show the marks.

Returns

bool