Version: 0.6.0

#include <axisplot.h>

Inheritance diagram for AxisPlot:
Collaboration diagram for AxisPlot:

Public Member Functions

void AddAxis (Axis *axis)
 
void AddDataset (Dataset *dataset)
 
void RemoveDataset (Dataset *dataset)
 
void RemoveDataset (size_t index)
 
void AddObjects (Dataset *dataset, Axis *verticalAxis, Axis *horizontalAxis)
 
size_t GetDatasetCount ()
 
DatasetGetDataset (size_t index)
 
void LinkDataHorizontalAxis (size_t nData, size_t nAxis)
 
void LinkDataVerticalAxis (size_t nData, size_t nAxis)
 
AxisGetDatasetAxis (Dataset *dataset, size_t index, bool vertical)
 
AxisGetDatasetAxis (Dataset *dataset, bool vertical)
 
AxisGetDatasetVerticalAxis (Dataset *dataset)
 
AxisGetDatasetHorizontalAxis (Dataset *dataset)
 
DatasetGetAxisDataset (Axis *axis, size_t index)
 
void SetDrawGrid (bool drawGridVertical, bool drawGridHorizontal)
 
void SetDataBackground (AreaDraw *dataBackground)
 
void SetLegend (Legend *legend)
 
void SetCrosshair (Crosshair *crosshair)
 
bool ToDataCoords (size_t nData, wxDC &dc, wxRect rc, wxCoord gx, wxCoord gy, double *x, double *y)
 
virtual void NeedRedraw (DrawObject *obj)
 
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 (wxDC &dc, wxRect rc)
 
virtual void DrawNoDataMessage (wxDC &dc, wxRect rc)
 
void SetChartPanel (wxChartPanel *chartPanel)
 
wxChartPanelGetChartPanel ()
 
void SetBackground (AreaDraw *background)
 
void SetTextNoData (const wxString &textNoData)
 
- Public Member Functions inherited from Observable< PlotObserver >
void AddObserver (PlotObserver *_observer)
 
void RemoveObserver (PlotObserver *_observer)
 
- Public Member Functions inherited from ChartPanelObserver
virtual void ChartEnterWindow ()
 
virtual void ChartMouseUp (wxPoint &pt, int key)
 
virtual void ChartMouseMove (wxPoint &pt)
 
virtual void ChartMouseDrag (wxPoint &pt)
 
virtual void ChartMouseWheel (int rotation)
 

Protected Member Functions

virtual bool AcceptAxis (Axis *axis)=0
 
virtual bool AcceptDataset (Dataset *dataset)=0
 
virtual void DrawDatasets (wxDC &dc, wxRect rc)=0
 
wxCoord GetAxesExtent (wxDC &dc, AxisArray *axes)
 
- Protected Member Functions inherited from Plot
 FIRE_WITH_THIS (PlotNeedRedraw)
 

Additional Inherited Members

- Public Types inherited from Observable< PlotObserver >
typedef PlotObserver Observer
 
- Public Attributes inherited from Observable< PlotObserver >
std::vector< PlotObserver * >
::iterator 
OIt
 
- Protected Attributes inherited from Observable< PlotObserver >
std::vector< PlotObserver * > observers
 

Detailed Description

Base class for plots that supports axes.

Member Function Documentation

virtual bool AxisPlot::AcceptAxis ( Axis axis)
protectedpure virtual

Checks whether axis is acceptable with this plot.

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

Implemented in XYPlot, OHLCPlot, BarPlot, GanttPlot, and BubblePlot.

Here is the caller graph for this function:

virtual bool AxisPlot::AcceptDataset ( Dataset dataset)
protectedpure virtual

Checks whether dataset is acceptable with this plot.

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

Implemented in XYPlot, OHLCPlot, BarPlot, GanttPlot, and BubblePlot.

Here is the caller graph for this function:

void AxisPlot::AddAxis ( Axis axis)

Adds axis to plot.

Parameters
axisaxis to be added

Here is the call graph for this function:

Here is the caller graph for this function:

void AxisPlot::AddDataset ( Dataset dataset)

Adds dataset to plot.

Parameters
datasetdataset to be added

Here is the call graph for this function:

Here is the caller graph for this function:

void AxisPlot::AddObjects ( Dataset dataset,
Axis verticalAxis,
Axis horizontalAxis 
)

Adds dataset and vertical and horizontal axes to plot. And links it all together.

Parameters
datasetdataset to be added
verticalAxisvertical axis to be added
horizontalAxishorizontal axis to be added

Here is the call graph for this function:

void AxisPlot::AxisChanged ( Axis axis)
virtual

Called when axis is changed.

Parameters
axischanged axis

Implements AxisObserver.

void AxisPlot::BoundsChanged ( Axis axis)
virtual

Called when axis bounds are changed.

Parameters
axisaxis that bounds are changed

Implements AxisObserver.

virtual void AxisPlot::DrawDatasets ( wxDC &  dc,
wxRect  rc 
)
protectedpure virtual

Called to draw all datasets.

Parameters
dcdevice context
rcrectangle where to draw

Implemented in XYPlot, OHLCPlot, BarPlot, GanttPlot, and BubblePlot.

Dataset* AxisPlot::GetAxisDataset ( Axis axis,
size_t  index 
)
inline

Returns dataset, linked with axis at specified index.

Parameters
axisaxis
indexdataset index
Returns
dataset at index

Here is the call graph for this function:

Dataset * AxisPlot::GetDataset ( size_t  index)

Return dataset with index

Parameters
indexindex of dataset
Returns
dataset or NULL if index is out of bounds

Here is the caller graph for this function:

Axis * AxisPlot::GetDatasetAxis ( Dataset dataset,
size_t  index,
bool  vertical 
)

Returns dataset axis.

Parameters
datasetdataset
indexaxis index, 0 - for main axis
verticaltrue if you want to get vertical axis, false - horizontal
Returns
main axis for dataset or NULL if dataset has no main axis

Here is the call graph for this function:

Here is the caller graph for this function:

Axis * AxisPlot::GetDatasetAxis ( Dataset dataset,
bool  vertical 
)

Returns main dataset axis. NOTE: main axis is the first axis linked with dataset. Main axis is used to scale dataset values.

Parameters
datasetdataset
verticaltrue if you want to get vertical axis, false - horizontal
Returns
main axis for dataset or NULL if dataset has no main axis

Here is the call graph for this function:

size_t AxisPlot::GetDatasetCount ( )

Returns dataset count.

Returns
dataset count

Here is the caller graph for this function:

Axis* AxisPlot::GetDatasetHorizontalAxis ( Dataset dataset)
inline

Returns main horizontal dataset axis. NOTE: main axis is the first axis linked with dataset. Main axis is used to scale dataset values.

Parameters
datasetdataset
Returns
main axis for dataset or NULL if dataset has no main axis

Here is the caller graph for this function:

Axis* AxisPlot::GetDatasetVerticalAxis ( Dataset dataset)
inline

Returns main vertical dataset axis. NOTE: main axis is the first axis linked with dataset. Main axis is used to scale dataset values.

Parameters
datasetdataset
Returns
main axis for dataset or NULL if dataset has no main axis

Here is the caller graph for this function:

void AxisPlot::LinkDataHorizontalAxis ( size_t  nData,
size_t  nAxis 
)

Links dataset with horizontal axis

Parameters
nDataindex of dataset
nAxisindex of horizontal axis

Here is the caller graph for this function:

void AxisPlot::LinkDataVerticalAxis ( size_t  nData,
size_t  nAxis 
)

Links dataset with vertical axis

Parameters
nDataindex of dataset
nAxisindex of vertical axis

Here is the caller graph for this function:

void AxisPlot::NeedRedraw ( DrawObject obj)
virtual

Called when object is need to be redrawed.

Parameters
objobject that need to be redrawed

Implements DrawObserver.

void AxisPlot::RemoveDataset ( Dataset dataset)

Removes dataset from plot.

Parameters
datasetdataset to be removed
void AxisPlot::RemoveDataset ( size_t  index)

Removes dataset from plot.

Parameters
datasetdataset index to be removed
void AxisPlot::SetCrosshair ( Crosshair crosshair)

Attaches crosshair to this plot.

Parameters
crosshaircrosshair
void AxisPlot::SetDataBackground ( AreaDraw dataBackground)

Sets background for data area.

Parameters
dataBackgroundbackground for data area
void AxisPlot::SetDrawGrid ( bool  drawGridVertical,
bool  drawGridHorizontal 
)

Set whether to draw grid lines.

Parameters
drawGridVerticalif true - plot will draw vertical grid lines
drawGridHorizontalif true - plot will draw horizontal grid lines
void AxisPlot::SetLegend ( Legend legend)

Sets legend to plot. Plot take ownership of legend.

Parameters
legendnew legend for plot
bool AxisPlot::ToDataCoords ( size_t  nData,
wxDC &  dc,
wxRect  rc,
wxCoord  gx,
wxCoord  gy,
double *  x,
double *  y 
)

Translate coordinate from graphics to data space.

Parameters
nDatanumber of dataset
dcdevice context
rcplot rectangle
gxx coordinate in graphics space
gyy coordinate in graphics space
xoutput for x coordinate in data space
youtput for y coordinate in data space
Returns
true if coordinate was succesfully translated, false - overwise

Here is the call graph for this function:


The documentation for this class was generated from the following files:
  • /home/bishop/work/projects/nextgismanager/include/freechart/wx/axisplot.h
  • /home/bishop/work/projects/nextgismanager/src/freechart/axisplot.cpp