Version: 0.6.0

#include <numberaxis.h>

Inheritance diagram for NumberAxis:
Collaboration diagram for NumberAxis:

Public Member Functions

 NumberAxis (AXIS_LOCATION location)
 
virtual void UpdateBounds ()
 
void SetTickFormat (const wxString &tickFormat)
 
void SetLabelCount (size_t labelCount)
 
void IntegerValues (bool intValues=true)
 
double GetMultiplier () const
 
void SetMultiplier (double multiplier)
 
void SetFixedBounds (double minValue, double maxValue)
 
virtual void GetDataBounds (double &minValue, double &maxValue) const
 
size_t GetLabelCount () const
 
- Public Member Functions inherited from LabelAxis
 LabelAxis (AXIS_LOCATION location)
 
void SetTitle (const wxString &title)
 
const wxString & GetTitle ()
 
void SetTitleLocation (int location)
 
int GetTitleLocation ()
 
void SetTitleFont (wxFont &font)
 
const wxFont & GetTitleFont ()
 
void SetTitleColour (wxColour &colour)
 
wxColour GetTitleColour ()
 
void SetLabelPen (wxPen labelPen)
 
void SetLabelTextColour (wxColour labelTextColour)
 
wxColour GetLabelTextColour ()
 
void SetLabelTextFont (wxFont labelTextFont)
 
const wxFont & GetLabelTextFont ()
 
void SetVerticalLabelText (bool verticalLabelText)
 
bool GetVerticalLabelText ()
 
void SetMajorLabelSteps (size_t step)
 
void SetLabelSkip (int blankLabels)
 
int GetLabelSkip ()
 
void SetLabelColourer (LabelColourer *labelColourer)
 
LabelColourerGetLabelColourer ()
 
void SetAxisVisible (bool bVisible)
 
virtual void Draw (wxDC &dc, wxRect rc)
 
virtual void DrawGridLines (wxDC &dc, wxRect rc)
 
virtual wxCoord GetExtent (wxDC &dc)
 
- Public Member Functions inherited from Axis
 Axis (AXIS_LOCATION location)
 
AXIS_LOCATION GetLocation ()
 
bool IsVertical ()
 
bool IsHorizontal ()
 
void SetMargins (wxCoord marginMin, wxCoord marginMax)
 
size_t GetDatasetCount ()
 
DatasetGetDataset (size_t index)
 
void SetZoomPanMode ()
 
void SetWindowWidth (double winWidth)
 
double GetWindowWidth ()
 
void SetWindowPosition (double winPos)
 
double GetWindowPosition ()
 
void SetUseWindow (bool useWin)
 
void SetWindow (double winPos, double winWidth)
 
bool IntersectsWindow (double v0, double v1)
 
void GetWindowBounds (double &winMin, double &winMax)
 
void AddDataset (Dataset *dataset)
 
virtual bool IsVisible (double value)
 
virtual double BoundValue (double value)
 
virtual wxCoord ToGraphics (wxDC &dc, int minCoord, int gRange, double value)
 
virtual double ToData (wxDC &dc, int minCoord, int gRange, wxCoord g)
 
- Public Member Functions inherited from Observable< AxisObserver >
void AddObserver (AxisObserver *_observer)
 
void RemoveObserver (AxisObserver *_observer)
 

Protected Member Functions

virtual bool AcceptDataset (Dataset *dataset)
 
void UpdateTickValues ()
 
virtual double GetValue (size_t step)
 
virtual void GetLabel (size_t step, wxString &label)
 
virtual bool IsEnd (size_t step)
 
virtual bool HasLabels ()
 
virtual wxSize GetLongestLabelExtent (wxDC &dc)
 
- Protected Member Functions inherited from Axis
 FIRE_WITH_THIS (AxisChanged)
 
 FIRE_WITH_THIS (BoundsChanged)
 

Protected Attributes

bool m_fixedBounds
 
bool m_hasLabels
 
double m_minValue
 
double m_maxValue
 
- Protected Attributes inherited from Axis
DatasetArray m_datasets
 
wxPen m_gridLinesPen
 
wxCoord m_marginMin
 
wxCoord m_marginMax
 
double m_winPos
 
double m_winWidth
 
bool m_useWin
 
- Protected Attributes inherited from Observable< AxisObserver >
std::vector< AxisObserver * > observers
 

Additional Inherited Members

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

Detailed Description

An axis for displaying and scaling numerical data.

Member Function Documentation

bool NumberAxis::AcceptDataset ( Dataset dataset)
protectedvirtual

Checks whether dataset can be accepted by this axis. Must be implemented by derivative classes. XXX: maybe remove this method later.

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

Implements Axis.

void NumberAxis::GetDataBounds ( double &  minValue,
double &  maxValue 
) const
virtual

Returns bounds, taken from data, eg. real min-max value.

Parameters
minValueoutput minimal data value
maxValueoutput maximal data value

Implements Axis.

Here is the caller graph for this function:

void NumberAxis::GetLabel ( size_t  step,
wxString &  label 
)
protectedvirtual

Returns label on step.

Parameters
stepstep index
labeloutput label

Implements LabelAxis.

Reimplemented in LogarithmicNumberAxis, and JulianDateAxis.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t NumberAxis::GetLabelCount ( ) const

Returns label count, to be draw on axis.

Returns
label count, to be draw on axis

Here is the caller graph for this function:

double NumberAxis::GetMultiplier ( ) const

Returns multiplier for values.

Returns
multiplier
double NumberAxis::GetValue ( size_t  step)
protectedvirtual

Returns value on step.

Parameters
stepstep index
Returns
value on step

Implements LabelAxis.

Reimplemented in LogarithmicNumberAxis.

Here is the caller graph for this function:

void NumberAxis::IntegerValues ( bool  intValues = true)
inline

Set whether to use integer values instead of doubles.

Parameters
intValuesif true than use integer values, false - double values
bool NumberAxis::IsEnd ( size_t  step)
protectedvirtual

Check whether step is last.

Parameters
stepstep
Returns
true if step is last

Implements LabelAxis.

void NumberAxis::SetFixedBounds ( double  minValue,
double  maxValue 
)

Make data bounds fixed.

Parameters
minValueminimal data value
maxValuemaximal data value
void NumberAxis::SetLabelCount ( size_t  labelCount)
inline

Sets count of labels.

Parameters
labelCountcount of labels
void NumberAxis::SetMultiplier ( double  multiplier)

Sets multiplier for values.

Parameters
multipliermultiplier
void NumberAxis::SetTickFormat ( const wxString &  tickFormat)
inline

Sets format for tick marks.

Parameters
tickFormattick format

Here is the caller graph for this function:

void NumberAxis::UpdateBounds ( )
virtual

Performs axis bounds update after dataset/s change.

Implements Axis.

Reimplemented in LogarithmicNumberAxis.

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/axis/numberaxis.h
  • /home/bishop/work/projects/nextgismanager/src/freechart/axis/numberaxis.cpp