wxFreeChart
Protected Member Functions | List of all members
XYPlot Class Reference

An plot for displaying XY data values. More...

#include <xyplot.h>

Inheritance diagram for XYPlot:
Inheritance graph
[legend]
Collaboration diagram for XYPlot:
Collaboration graph
[legend]

Protected Member Functions

virtual bool AcceptAxis (Axis *axis)
 Checks whether axis is acceptable with this plot. More...
 
virtual bool AcceptDataset (Dataset *dataset)
 Checks whether dataset is acceptable with this plot. More...
 
virtual void DrawDatasets (wxDC &dc, wxRect rc)
 Called to draw all datasets. More...
 
void DrawXYDataset (wxDC &dc, wxRect rc, XYDataset *dataset)
 Draw single XY dataset. More...
 
- Protected Member Functions inherited from AxisPlot
wxCoord GetAxesExtent (wxDC &dc, AxisArray *axes)
 

Additional Inherited Members

- Public Member Functions inherited from AxisPlot
void AddAxis (Axis *axis)
 Adds axis to plot. More...
 
void AddDataset (Dataset *dataset)
 Adds dataset to plot. More...
 
void RemoveDataset (Dataset *dataset)
 Removes dataset from plot. More...
 
void RemoveDataset (size_t index)
 Removes dataset from plot. More...
 
void AddObjects (Dataset *dataset, Axis *verticalAxis, Axis *horizontalAxis)
 Adds dataset and vertical and horizontal axes to plot. More...
 
size_t GetDatasetCount ()
 Returns dataset count. More...
 
DatasetGetDataset (size_t index)
 Return dataset with index. More...
 
void LinkDataHorizontalAxis (size_t nData, size_t nAxis)
 Links dataset with horizontal axis. More...
 
void LinkDataVerticalAxis (size_t nData, size_t nAxis)
 Links dataset with vertical axis. More...
 
AxisGetDatasetAxis (Dataset *dataset, size_t index, bool vertical)
 Returns dataset axis. More...
 
AxisGetDatasetAxis (Dataset *dataset, bool vertical)
 Returns main dataset axis. More...
 
AxisGetDatasetVerticalAxis (Dataset *dataset)
 Returns main vertical dataset axis. More...
 
AxisGetDatasetHorizontalAxis (Dataset *dataset)
 Returns main horizontal dataset axis. More...
 
DatasetGetAxisDataset (Axis *axis, size_t index)
 Returns dataset, linked with axis at specified index. More...
 
void SetDrawGrid (bool drawGridVertical, bool drawGridHorizontal)
 Set whether to draw grid lines. More...
 
 wxDEPRECATED_MSG ("SetDataBackground is deprecated, use SetBackground instead") void SetDataBackground(AreaDraw *dataBackground)
 Sets background for data area. More...
 
void SetLegend (Legend *legend)
 Sets legend to plot. More...
 
void SetCrosshair (Crosshair *crosshair)
 Attaches crosshair to this plot. More...
 
bool ToDataCoords (size_t nData, wxDC &dc, wxRect rc, wxCoord gx, wxCoord gy, double *x, double *y)
 Translate coordinate from graphics to data space. More...
 
virtual void NeedRedraw (DrawObject *obj)
 
virtual void DataChanged (wxCommandEvent &event)
 
virtual void DatasetChanged (Dataset *dataset)
 
virtual void AxisChanged (Axis *axis)
 
virtual void BoundsChanged (Axis *axis)
 
virtual void ChartMouseDown (wxPoint &pt, int key)
 
- Public Member Functions inherited from Plot
virtual void Draw (ChartDC &cdc, wxRect rc, PlotDrawMode mode=PLOT_DRAW_ALL)
 Draws plot. More...
 
virtual void DrawNoDataMessage (wxDC &dc, wxRect rc)
 Draws "no data" message. More...
 
void SetChartPanel (wxChartPanel *chartPanel)
 
wxChartPanelGetChartPanel ()
 Returns chart panel (GUI component, at top level) if it.
 
void SetBackground (AreaDraw *background)
 Sets plot background. More...
 
void SetTextNoData (const wxString &textNoData)
 Sets text message drawn, when plot has no data to draw. More...
 
- Protected Attributes inherited from AxisPlot
bool m_drawGridVertical
 
bool m_drawGridHorizontal
 
- Protected Attributes inherited from Plot
AreaDrawm_background
 

Detailed Description

An plot for displaying XY data values.

Definition at line 22 of file xyplot.h.

Member Function Documentation

virtual bool XYPlot::AcceptAxis ( Axis axis)
protectedvirtual

Checks whether axis is acceptable with this plot.

Parameters
axisaxis to be checked
Returns
true if axis can be accepted, false overwise

Implements AxisPlot.

Reimplemented in OHLCPlot, and BarPlot.

virtual bool XYPlot::AcceptDataset ( Dataset dataset)
protectedvirtual

Checks whether dataset is acceptable with this plot.

Parameters
datasetdataset to be checked
Returns
true if dataset can be accepted, false overwise

Implements AxisPlot.

Reimplemented in OHLCPlot, and BarPlot.

virtual void XYPlot::DrawDatasets ( wxDC &  dc,
wxRect  rc 
)
protectedvirtual

Called to draw all datasets.

Parameters
dcdevice context
rcrectangle where to draw

Implements AxisPlot.

Reimplemented in OHLCPlot, and BarPlot.

void XYPlot::DrawXYDataset ( wxDC &  dc,
wxRect  rc,
XYDataset dataset 
)
protected

Draw single XY dataset.

Parameters
dcdevice context
rcrectangle where to draw
datasetXY dataset to draw

The documentation for this class was generated from the following file: