14 #include <wx/axis/axis.h>
16 #include <wx/areadraw.h>
17 #include <wx/legend.h>
18 #include <wx/marker.h>
19 #include <wx/crosshair.h>
20 #include <wx/chartpanel.h>
22 #include <wx/dynarray.h>
39 m_dataset = o.m_dataset;
51 WX_DECLARE_USER_EXPORTED_OBJARRAY(
DataAxisLink, DataAxisLinkArray, WXDLLIMPEXP_FREECHART);
68 void AddAxis(
Axis *axis);
74 void AddDataset(
Dataset *dataset);
80 void RemoveDataset(
Dataset *dataset);
86 void RemoveDataset(
size_t index);
95 void AddObjects(
Dataset *dataset,
Axis *verticalAxis,
Axis *horizontalAxis);
101 size_t GetDatasetCount();
108 Dataset *GetDataset(
size_t index);
115 void LinkDataHorizontalAxis(
size_t nData,
size_t nAxis);
122 void LinkDataVerticalAxis(
size_t nData,
size_t nAxis);
131 Axis *GetDatasetAxis(
Dataset *dataset,
size_t index,
bool vertical);
142 Axis *GetDatasetAxis(
Dataset *dataset,
bool vertical);
153 return GetDatasetAxis(dataset,
true);
165 return GetDatasetAxis(dataset,
false);
184 void SetDrawGrid(
bool drawGridVertical,
bool drawGridHorizontal);
190 void SetDataBackground(
AreaDraw *dataBackground);
196 void SetLegend(
Legend *legend);
215 bool ToDataCoords(
size_t nData, wxDC &dc, wxRect rc, wxCoord gx, wxCoord gy,
double *x,
double *y);
225 virtual void DatasetChanged(
Dataset *dataset);
237 virtual void ChartMouseDown(wxPoint &pt,
int key);
249 virtual bool AcceptAxis(
Axis *axis) = 0;
256 virtual bool AcceptDataset(
Dataset *dataset) = 0;
263 virtual void DrawDatasets(wxDC &dc, wxRect rc) = 0;
265 wxCoord GetAxesExtent(wxDC &dc, AxisArray *axes);
271 virtual void DrawData(wxDC &dc, wxRect rc);
278 void UpdateAxis(
Dataset *dataset = NULL);
291 void CalcDataArea(wxDC &dc, wxRect rc, wxRect &rcData, wxRect &rcLegend);
299 void DrawAxes(wxDC &dc, wxRect &rc, wxRect rcData);
308 void DrawAxesArray(wxDC &dc, wxRect rc, AxisArray *axes,
bool vertical);
316 void DrawGridLines(wxDC &dc, wxRect rcData);
323 void DrawMarkers(wxDC &dc, wxRect rcData);
330 void DrawDataArea(wxDC &dc, wxRect rcData);
337 void DrawLegend(wxDC &dc, wxRect rcLegend);
339 bool m_drawGridVertical;
340 bool m_drawGridHorizontal;
342 AxisArray m_leftAxes;
343 AxisArray m_rightAxes;
345 AxisArray m_bottomAxes;
347 AxisArray m_horizontalAxes;
348 AxisArray m_verticalAxes;
350 DataAxisLinkArray m_links;
355 wxCoord m_legendPlotGap;
Definition: chartpanel.h:51
Axis * GetDatasetHorizontalAxis(Dataset *dataset)
Definition: axisplot.h:163
virtual void DrawData(wxDC &dc, wxRect rc)=0
Definition: axisplot.h:56
Axis * GetDatasetVerticalAxis(Dataset *dataset)
Definition: axisplot.h:151
Definition: areadraw.h:22
Definition: dataset.h:189
Definition: axisplot.h:28
Definition: chartpanel.h:23
Dataset * GetDataset(size_t index)
Definition: axis.cpp:60
Definition: drawobject.h:23
virtual void AxisChanged(Axis *axis)=0
virtual void BoundsChanged(Axis *axis)=0
Definition: drawobject.h:45
virtual void ChartPanelChanged(wxChartPanel *oldPanel, wxChartPanel *newPanel)
Definition: plot.cpp:66
virtual void NeedRedraw(DrawObject *obj)=0
Dataset * GetAxisDataset(Axis *axis, size_t index)
Definition: axisplot.h:174
Definition: crosshair.h:38