#include <ChartLegend.h>
Public Types | |
enum | DockSide { dsDockRight, dsDockLeft, dsDockTop, dsDockBottom } |
Enumeration specifying on which side of the control the legend is docked. | |
Public Member Functions | |
void | SetFont (int iPointSize, const TChartString &strFaceName) |
Sets the font used to display the series names. | |
void | DockLegend (DockSide dsSide) |
Dock the legend on a specific side of the control. Default is right. | |
void | UndockLegend (int iLeftPos, int iTopPos) |
Undock the legend. | |
void | SetTransparent (bool bTransparent) |
Sets the background of the legend transparent. | |
void | SetHorizontalMode (bool bHorizontal) |
Sets the legend in horizontal/vertical mode. | |
void | SetVisible (bool bVisible) |
Sets the legend visible/invisible. | |
bool | IsVisible () const |
Returns true if the legend is visible. | |
COLORREF | GetBackColor () const |
Returns the back color of the legend. | |
void | SetBackColor (COLORREF NewColor) |
Sets the back color of the legend. | |
COLORREF | GetShadowColor () const |
Returns the shadow color. | |
void | SetShadowColor (COLORREF NewColor) |
Sets the shadow color. | |
void | EnableShadow (bool bEnable) |
Enables/disables the shadow. | |
void | SetShadowDepth (int Depth) |
Sets the shadow depth (in pixels). | |
BOOL | IsPointInside (const CPoint &screenPoint) const |
Returns true if the screen point is on the legend region. |
Series which are named will be displayed in the legend. The legend object is retrieved by calling the GetLegend() function on the CChartCtrl class.
void CChartLegend::SetHorizontalMode | ( | bool | bHorizontal | ) |
Sets the legend in horizontal/vertical mode.
In horizontal mode, the names are drawn next to each other instead of on top of each other.
void CChartLegend::UndockLegend | ( | int | iLeftPos, | |
int | iTopPos | |||
) |
Undock the legend.
When the legend is undocked (floating), it doesn't take any margin size but is drawn on top of the control at the specified location (it can be above the plotting area for instance).
iLeftPos | The left position of the legend, in pixels (from the left of the control) | |
iTopPos | The top position of the legend, in pixels (from the top of the control) |