Skip to content

CGraphic

CGraphic

CGraphic is a base class for creating custom charts.

Description

The CGraphic class provides numerous aspects of working with custom charts.

The class stores the main chart elements, sets their parameters and performs plotting.

Also, the class stores the curves for the chart and provides various display options.

Declaration

class CGraphic

Title

#include <Graphics\Graphic.mqh>

Class methods

MethodDescription
CreateCreate a graphical resource bound to a chart object
DestroyRemove a chart and destroy a graphical resource
UpdateDisplay implemented changes
ChartObjectNameGet the name of an object bound to a chart
ResourceNameGet the graphical resource name
XAxisGet the pointer to the X axis
YAxisGet the pointer to the Y axis
GapSizeGet/set the size of indents between the chart elements
BackgroundColorGet/set a background color
BackgroundMainGet/set a chart header
BackgroundMainSizeGet/set a sub-header font size
BackgroundMainColorGet/set a chart header color
BackgroundSubGet/set a sub-header
BackgroundSubSizeGet/set a sub-header font size
BackgroundSubColorGet/set a chart sub-header color
GridLineColorGet/set a grid line color
GridBackgroundColorGet/set a grid background color
GridCircleRadiusGet/set the dot radius in the grid nodes
GridCircleColorGet/set the dot color in the grid nodes
GridHasCircleGet/set the dot plotting flag in the grid nodes
GridAxisLineColorGet the value of a real chart axes color.
HistoryNameWidthGet/set the maximum allowed length for displaying a curve name
HistoryNameSizeGet/set the font size of a curve name
HistorySymbolSizeGet/set a size of notational convention symbols
TextAddAdd a text to the chart
LineAddAdd a line to the chart
CurveAddCreate and add a curve to the chart
CurvePlotPlot a previously created curve by index
CurvePlotAllPlot all previously created curves
CurveGetByIndexGet a curve by a specified index
CurveGetByNameGet a curve by a specified name
CurveRemoveByIndexRemove a curve by a specified index.
CurveRemoveByNameRemove a curve by a specified name.
CurvesTotalGet the number of curves for the given chart.
MarksToAxisAddAdd a scale mark to the chart axis
MajorMarkSizeGet/set the size of the scale’s ticks on the chart axis
FontSetSet the current font parameters
FontGetGet the current font parameters
AttachGet/set a graphical resource and bind it to the CGraphic class instance
CalculateMaxMinValuesCalculate (re-calculate) minimum and maximum chart values on both axes.
HeightGet a chart height in pixels.
IndentDownGet/set a chart indent from the lower border.
IndentLeftGet/set a chart indent from the left border.
IndentRightGet/set a chart indent from the right border.
IndentUpGet/set a chart indent from the upper border.
RedrawRedraw the chart.
ResetParametersReset the chart redrawing parameters.
ScaleXScale the value by X axis.
ScaleYScale the value by Y axis.
SetDefaultParametersSet the chart parameters to default values.
WidthGet the chart width in pixels.
Last updated on