wxFreeChart
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Plot Class Referenceabstract

Base class for all plots. More...

#include <plot.h>

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

Public Member Functions

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 Member Functions

virtual bool HasData ()=0
 Checks whether plot has data. More...
 
virtual void DrawData (ChartDC &cdc, wxRect rc)=0
 Draw the plot data, i.e. More...
 
virtual void DrawBackground (ChartDC &cdc, wxRect rc)=0
 Draw the plot's static items (e.g. More...
 
virtual void ChartPanelChanged (wxChartPanel *oldPanel, wxChartPanel *newPanel)
 Called when chart panel is changed. More...
 

Protected Attributes

AreaDrawm_background
 

Detailed Description

Base class for all plots.

Definition at line 31 of file plot.h.

Member Function Documentation

virtual void Plot::ChartPanelChanged ( wxChartPanel oldPanel,
wxChartPanel newPanel 
)
protectedvirtual

Called when chart panel is changed.

Parameters
oldPanelold chart panel
newPanelnew chart panel

Referenced by AxisPlot::GetAxisDataset().

virtual void Plot::Draw ( ChartDC cdc,
wxRect  rc,
PlotDrawMode  mode = PLOT_DRAW_ALL 
)
virtual

Draws plot.

Parameters
dcdevice context
rcrectangle where to draw
virtual void Plot::DrawBackground ( ChartDC cdc,
wxRect  rc 
)
protectedpure virtual

Draw the plot's static items (e.g.

axis, gridlines, legend etc.). Must be overriden by derivative classes.

Parameters
dcdevice context
rcrectangle where to draw

Implemented in PiePlot, and MultiPlot.

Referenced by AxisPlot::GetAxisDataset().

virtual void Plot::DrawData ( ChartDC cdc,
wxRect  rc 
)
protectedpure virtual

Draw the plot data, i.e.

the lines, bars etc. on top of the background. Must be overriden by derivative classes.

Parameters
dcdevice context
rcrectangle where to draw

Implemented in PiePlot, and MultiPlot.

Referenced by MultiPlot::AddPlot(), and AxisPlot::GetAxisDataset().

virtual void Plot::DrawNoDataMessage ( wxDC &  dc,
wxRect  rc 
)
virtual

Draws "no data" message.

Can be overriden by derivative classes.

Parameters
dcdevice context
rcrectangle where to draw
virtual bool Plot::HasData ( )
protectedpure virtual

Checks whether plot has data.

Must be overriden by derivative classes.

Returns
true if plot has data, false overwise

Implemented in PiePlot, and MultiPlot.

Referenced by MultiPlot::AddPlot(), and AxisPlot::GetAxisDataset().

void Plot::SetBackground ( AreaDraw background)
inline

Sets plot background.

Parameters
backgroundnew background for plot

Definition at line 65 of file plot.h.

void Plot::SetTextNoData ( const wxString &  textNoData)
inline

Sets text message drawn, when plot has no data to draw.

Parameters
textNoDatatext message drawn, when plot has no data to draw

Definition at line 74 of file plot.h.


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