Class ChartGraphicBlock
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
stringBlock Name.
Properties
BackImage
Sets the background image to the graphic.
public string BackImage { get; set; }
Property Value
Examples
myGraphic.BackImage = ".\Img\Backgrounds\lightpurplemarble.gif";
BarWidthPercent
Bar Width in percent(0-100).
public int BarWidthPercent { get; set; }
Property Value
DateTimeFormat
Sets the formart for DateTime.
public string DateTimeFormat { get; set; }
Property Value
Examples
myGraphic.DateTimeFormat = "dd/mm/yyyy";
DifferentColors
public bool DifferentColors { get; set; }
Property Value
LableX
Label for Axis X.
public string LableX { get; set; }
Property Value
LableY
Label for Axis Y.
public string LableY { get; set; }
Property Value
LegendOnly
Show only the legend.
public bool LegendOnly { get; set; }
Property Value
MaxX
Set or Get the max value for the X Axis.
public int MaxX { get; set; }
Property Value
MaxY
Set or Get the max value for the Y Axis.
public int MaxY { get; set; }
Property Value
MinX
Set or Get the minimal value for the X Axis.
public int MinX { get; set; }
Property Value
MinY
Set or Get the minimal value for the Y Axis.
public int MinY { get; set; }
Property Value
SqlText
SQL query used to create the chart.
public string SqlText { get; set; }
Property Value
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
Examples
myGraphic.StyleName = Sage.Graphics.ChartStyleNames.Bar;
XLProp
public string XLProp { get; set; }
Property Value
XProp
public string XProp { set; }
Property Value
YProp
public string YProp { get; set; }
Property Value
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
stringChart 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
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
stringTitle 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
Make3d()
Set the chart to 3D.
public bool Make3d()
Returns
Make3d(int)
Set the chart to 3D.
public bool Make3d(int percentage)
Parameters
percentage
intPercentage value (1-100).
Returns
ManualChartEntry(string, bool)
public bool ManualChartEntry(string values, bool makeNull)
Parameters
Returns
MoveLegend(string)
Set the legend position.
public bool MoveLegend(string text)
Parameters
text
stringLegend 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
boolTrue to show the Axis.
Returns
ShowLegend(bool)
Show/hid the Legend.
public bool ShowLegend(bool onoff)
Parameters
onoff
boolTrue to show the Legend.
Returns
ShowMarks(bool)
Show/hide the marks.
public bool ShowMarks(bool onoff)
Parameters
onoff
boolTrue to show the marks.