1 /*=========================================================================
4 Module: $RCSfile: wxChart.cxx,v $
6 Date: $Date: 2009/05/14 13:54:57 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
22 //----------------------------------------------------------------
23 // DataSet : Constructor & Destructor
24 //-------------------------------------------------------------------
25 wxDataSet::wxDataSet(wxPen *lStyle, wxBrush *dStyle, int dWidth,
26 int lWidth, int dGap, int pMark, int disValues)
33 m_displayValues = disValues;
39 wxDataSet::wxDataSet(wxPen *lStyle, wxBrush *dStyle,
40 wxString *lText, bool lDisplay)
55 wxDataSet::wxDataSet()
69 wxDataSet::~wxDataSet()
77 //-----------------------------------------------------------------
79 //-------------------------------------------------------------------
80 BEGIN_EVENT_TABLE(wxChart, wxPanel)
81 EVT_PAINT(wxChart::OnPaint)
84 //---------------------------------------------------------------------
85 // Constructor & Destructor
86 wxChart::wxChart(wxWindow *parent, wxWindowID id,
87 const wxPoint& pos, const wxSize& size,
88 long style, const wxString& name)
89 : wxPanel(parent, id, pos, size, style, name)
91 SetMaxWidthHeight(size.GetWidth(), size.GetHeight());
92 SetCenterChart(pos.x + (GetLargeur()/2), pos.y + (GetHauteur()/2));
101 for(int i=0; i<m_NumDataSet ; i++)
102 delete(m_dataSetArray[i]);
107 void wxChart::InitChart()
109 SetShowPer(false); //not display line % per default
110 for(int i=0; i<m_NumDataSet ; i++)
111 ShowDataSet(false, i);
116 //--------------------------------------------------------------
117 static double st_difference(double val, int multi, bool sens=true)
121 result = div(int(val), multi);
126 if ( result.rem == 0 ) {
127 if (val - (int)val > 0 )
128 retour = (multi - result.rem) - (val - int(val));
131 retour = (multi - result.rem) - (val - int(val));
137 retour = result.rem + (val - (int)val);
141 static double st_decalage(double IncX, double MinX)
143 double retour = 0.00;
147 result = div((int)MinX, (int)IncX);
148 if ( result.rem == 0 ) {
149 if (MinX - (int)MinX > 0 )
150 retour = ((result.quot + 1) * IncX) - MinX;
153 retour = ((result.quot+1) * IncX) - MinX;
159 static double st_origine(double IncX, double MinX)
161 double retour = MinX;
165 result = div((int)MinX, (int)IncX);
166 if (result.rem == 0) {
167 if (MinX - (int)MinX > 0 )
168 retour = (result.quot + 1) * IncX;
171 retour = (result.quot + 1) * IncX;
178 static void st_Inverse(double *l_MinCol, double *l_MaxCol)
180 if (*l_MinCol > *l_MaxCol) {
181 int tempo = (int)(*l_MaxCol);
182 *l_MaxCol = *l_MinCol;
188 //--------------------------------------------------------------
189 void wxChart::SetInfX(double inf)
194 void wxChart::SetSupX(double sup)
200 void wxChart::SetSupY(double sup)
206 void wxChart::SetIncAxisX(double minor, double major)
212 void wxChart::SetIncAxisY(double minor, double major)
219 void wxChart::SetInitEdge()
230 void wxChart::SetChartBounds()
232 m_Top = m_CenterY - (m_MaxHauteur/2) + m_EdgeTop;
233 m_Bottom = m_CenterY + (m_MaxHauteur/2) - m_EdgeBottom;
234 m_Left = m_CenterX - (m_MaxLargeur/2) + m_EdgeLeft;
235 m_Right = m_CenterX + (m_MaxLargeur/2) - m_EdgeRight;
238 void wxChart::SetChartBoundsLegend()
240 m_TopLegend = m_CenterY - (m_MaxHauteur/2) + m_EdgeTopLegend;
241 m_BottomLegend = m_CenterY + (m_MaxHauteur/2) - m_EdgeBottomLegend;
242 m_LeftLegend = m_CenterX - (m_MaxLargeur/2) + m_EdgeLeftLegend;
243 m_RightLegend = m_CenterX + (m_MaxLargeur/2) - m_EdgeRightLegend;
247 void wxChart::SetCadreLegend(int nbr, int *bottom)
249 int val=GetEdgeBottom();
250 div_t result = div(nbr, 2);
252 val+= (nbr * 10) + 5;
254 val+= (( nbr + 1 ) * 10) + 5;
257 SetEdgeTopLegend(m_CenterY + (m_MaxHauteur/2) - val + 33);
258 SetEdgeBottomLegend(8);
260 int l_left = GetEdgeLeft();
261 int l_right = GetEdgeRight();
263 // more small for only 1 line
265 l_left+=m_CenterX - (m_MaxLargeur/3);
266 l_right+=m_CenterX - (m_MaxLargeur/3);
269 SetEdgeLeftLegend(l_left);
270 SetEdgeRightLegend(l_right);
274 void wxChart::SetShowPer(bool per)
280 void wxChart::SetMaxValue(double max)
286 double wxChart::MaxValue()
288 double data, val = 1.00;
289 int maxdata = GetNumDataSet()-1;
290 int maxitem = GetNumItem();
292 // Exclure Stenosis for calcul MaxValue
293 for(int a=0; a < maxdata; a++) {
294 if (GetShowDataSet(a)) {
295 for(int j=0; j<=maxitem; j++) {
296 if ( IsEmpty(a,j) == false ) {
297 data = GetDataY(a,j);
309 double wxChart::MinCol(double min)
311 double retour = 0.00;
312 int maxdata = GetNumDataSet()-1;
314 // Exclure Stenosis for calcul MaxValue
315 for(int a=0; a < maxdata; a++) {
316 if (GetShowDataSet(a)) {
327 double wxChart::MaxCol(double max)
329 double retour = 1.00;
330 int maxdata = GetNumDataSet()-1;
332 // Exclure Stenosis for calcul MaxValue
333 for(int a=0; a < maxdata; a++) {
334 if (GetShowDataSet(a)) {
344 void wxChart::SetStepSizeX(double stepX)
349 void wxChart::SetStepSizeY(double stepY)
355 void wxChart::SetStepSizePer(double stepPer)
357 m_StepSizePer = stepPer;
361 void wxChart::SetCenterChart(int x, int y)
367 void wxChart::SetMaxWidthHeight(int x,int y)
374 void wxChart::SetMinX(double MinX)
380 void wxChart::SetMaxX(double MaxX)
387 void wxChart::SetEdgeTop(int top)
392 void wxChart::SetEdgeBottom(int bottom)
394 m_EdgeBottom = bottom;
397 void wxChart::SetEdgeLeft(int left)
402 void wxChart::SetEdgeRight(int right)
408 void wxChart::SetEdgeTopLegend(int top)
410 m_EdgeTopLegend = top;
413 void wxChart::SetEdgeBottomLegend(int bottom)
415 m_EdgeBottomLegend = bottom;
418 void wxChart::SetEdgeLeftLegend(int left)
420 m_EdgeLeftLegend = left;
424 void wxChart::SetEdgeRightLegend(int right)
426 m_EdgeRightLegend = right;
431 void wxChart::SetNumDataSet(int num)
436 void wxChart::SetNumItem(int num)
442 int wxChart::GetShow()
446 for(int i=0; i < m_NumDataSet ; i++) {
447 if (GetShowDataSet(i))
454 void wxChart::InitDataSet()
459 for(int i=0; i<MAX_DATASET ; i++)
460 m_dataSetArray[i]=NULL;
463 wxColour *BlueColour = new wxColour(0,0,255);
464 wxColour *GreyColour = new wxColour(192,192,192);
465 wxColour *YellowColour = new wxColour(255,255,0);
466 wxColour *VioletColour = new wxColour(255,0,255);
467 wxColour *CyanColour = new wxColour(0,255,255);
469 // Create All DataSet
470 // Per default : Show(false)
471 m_dataSetArray[wxArea] = new wxDataSet(wxRED_PEN, wxRED_BRUSH, (wxString*)"Area");
472 m_dataSetArray[wxPerimeter] = new wxDataSet(new wxPen(*BlueColour, 1, wxSOLID),
473 new wxBrush(*BlueColour, wxSOLID),
474 (wxString*)"Perimeter");
476 m_dataSetArray[wxDiameterArea] = new wxDataSet(new wxPen(*GreyColour, 1, wxSOLID),
477 new wxBrush(*GreyColour, wxSOLID),
478 (wxString*)"Diameter from area");
480 m_dataSetArray[wxDiameterPerimeter] = new wxDataSet(new wxPen(*YellowColour, 1, wxSOLID),
481 new wxBrush(*YellowColour, wxSOLID),
482 (wxString*)"Diameter from perimeter");
484 m_dataSetArray[wxMinimumDiameter] = new wxDataSet(new wxPen(*VioletColour, 1, wxSOLID),
485 new wxBrush(*VioletColour, wxSOLID),
486 (wxString*)"Minimum diameter");
488 m_dataSetArray[wxMaximumDiameter] = new wxDataSet(new wxPen(*CyanColour, 1, wxSOLID),
489 new wxBrush(*CyanColour, wxSOLID),
490 (wxString*)"Maximum diameter");
492 m_dataSetArray[wxAverageDiameter] = new wxDataSet(wxBLACK_PEN, wxBLACK_BRUSH, (wxString*)"Average diameter");
494 m_dataSetArray[wxStenosis] = new wxDataSet(wxGREEN_PEN, wxGREEN_BRUSH, (wxString*)"Stenosis");
500 //---------------------------------------------------------------------
501 void wxChart::OnPaint(wxPaintEvent& event)
508 void wxChart::Draw(wxDC& dc)
513 //----------------------------------------------------------------------------
518 //----------------------------------------------------------------------------
519 // Font : one for all chart
520 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxLIGHT)));
522 //----------------------------------------------------------------------------
524 wxSize size = GetClientSize();
525 SetMaxWidthHeight(size.GetWidth(), size.GetHeight());
526 SetCenterChart((GetLargeur()/2), (GetHauteur()/2));
529 //-----------------------------------------------------------------------------
531 ShowDataSet(true,wxArea);
532 ShowDataSet(true,wxPerimeter);
533 ShowDataSet(true,wxDiameterArea);
534 ShowDataSet(true,wxDiameterPerimeter);
535 ShowDataSet(true,wxMinimumDiameter);
536 ShowDataSet(true,wxMaximumDiameter);
537 ShowDataSet(true,wxAverageDiameter);
538 ShowDataSet(true,wxStenosis);
545 ShowDataSet(true,wxStenosis);
548 //--------------------------------------------------------------------
552 SetCadreLegend(nbr, &m_EdgeBottom);
553 SetChartBoundsLegend();
557 //-------------------------------------------------------------------
558 // Valeur Min et Max des abscisses
561 SetInfX(st_difference(m_MinX,10,false));
562 SetSupX(st_difference(m_MaxX,10,true));
564 //------------------------------------------------------------------
568 SetData(wxStenosis, 0, 0, -45);
569 SetData(wxStenosis, 1, 0.4, 0);
570 SetData(wxStenosis, 2, 0.6, -15);
571 SetData(wxStenosis, 3, 0.8, 0);
572 SetData(wxStenosis, 4, 0.9, 100);
573 SetData(wxStenosis, 5, 1, 0);
576 SetData(wxArea,0, 0, 0.8);
577 SetData(wxArea,1, 0.2, 0.6);
578 SetData(wxArea,2, 0.3, 0.8);
579 SetData(wxArea,3, 0.4, 1);
580 SetData(wxArea,4, 0.8, 0.4);
581 SetData(wxArea,5, 1, 0.2);
583 //-----------------------------------------------------------------
584 // Valeur Max du chart
585 SetMaxValue(MaxValue());
586 SetSupY(st_difference(m_MaxValue, 10, true));
588 //-------------------------------------------------------------------------------
590 SetIncAxisX((m_MaxX + m_SupX - (m_MinX - m_InfX)) / (double)MINOR_STEP,
591 (m_MaxX + m_SupX - (m_MinX - m_InfX)) / (double)MAJOR_STEP);
592 SetIncAxisY((m_MaxValue + m_SupY) / (double)MINOR_STEP,
593 (m_MaxValue + m_SupY) / (double)MAJOR_STEP);
594 SetStepSizeX(( m_MaxLargeur - (m_EdgeLeft + m_EdgeRight + m_SupX + m_InfX)) /
596 SetStepSizeY(( m_MaxHauteur - (m_EdgeBottom + m_EdgeTop + m_SupY )) /
598 SetStepSizePer(( m_MaxHauteur - (m_EdgeBottom + m_EdgeTop)) /
601 //-----------------------------------------------------------------------------
603 //---------------------------------------------------------------------------
610 //-----------------------------------------------------------------------------
612 //---------------------------------------------------------------------------
613 dc.DestroyClippingRegion();
614 dc.SetClippingRegion(m_Left , m_Top ,
615 GetLargeur() - (m_EdgeRight + m_EdgeLeft ),
616 GetHauteur() - (m_EdgeTop + m_EdgeBottom ));
618 //---------------------------------------------------------------------------
620 //---------------------------------------------------------------------------
621 int maxdataset = GetNumDataSet();
622 for(int a=0; a < maxdataset; a++) {
623 if(m_dataSetArray[a] && m_dataSetArray[a]->GetShow()) {
624 dataBrush = m_dataSetArray[a]->GetDataStyle();
625 dataPen = m_dataSetArray[a]->GetLineStyle();
626 dc.SetBrush(*dataBrush);
632 //---------------------------------------
634 dc.DestroyClippingRegion();
639 void wxChart::DrawAxe(wxDC& dc)
646 double minorIncStepY= m_MinorIncY * m_StepSizeY;
647 double majorIncStepY= m_MajorIncY * m_StepSizeY;
648 double minorIncStepX= m_MinorIncX * m_StepSizeX;
649 double majorIncStepX= m_MajorIncX * m_StepSizeX;
651 dc.SetPen(*wxBLACK_PEN);
652 dc.SetBrush(*wxBLACK_BRUSH);
655 dc.DrawLine(m_Left, m_Bottom+(7*MARGE/4), m_Right, m_Bottom+(7*MARGE/4));
657 dc.DrawLine(m_Left-(7*MARGE/4), m_Bottom, m_Left-(7*MARGE/4), m_Top);
660 // Major Tick Marks with values
662 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=majorIncStepY, val+=m_MajorIncY) {
663 dc.DrawLine( (int)(m_Left-7-(7*MARGE/4)) , (int)(y) , (int)(m_Left-(7*MARGE/4)) , (int)(y) );
664 sprintf(text,"%g", val);
665 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
666 dc.DrawText(wxString(text, wxConvUTF8), (int)(m_Left-10-widthx-(7*MARGE/4)) , (int)(y-(heighty/2)) );
670 dc.DrawLine(m_Left-7-(7*MARGE/4),m_Top,m_Left-(7*MARGE/4),m_Top);
671 sprintf(text,"%g", val);
672 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
673 dc.DrawText( wxString(text, wxConvUTF8),m_Left-10-widthx-(7*MARGE/4),m_Top-(heighty/2));
677 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=minorIncStepY) {
678 dc.DrawLine((int)(m_Left-3-(7*MARGE/4)) , (int)(y) , (int)(m_Left-(7*MARGE/4)) , (int)(y) );
682 // Major Tick Marks with values
683 supx = st_decalage(m_MajorIncX, m_MinX) * m_StepSizeX;
684 val = st_origine(m_MajorIncX, m_MinX);
685 for(y=m_Bottom,x=m_Left + supx; x <= m_Right; x+=majorIncStepX, val+=m_MajorIncX) {
686 dc.DrawLine((int)x,(int)(m_Bottom+7+(7*MARGE/4)),(int)(x),(int)(m_Bottom+(7*MARGE/4)));
687 sprintf(text,"%g", val);
688 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
689 dc.DrawText(wxString(text, wxConvUTF8), (int)(x-(widthx/2)) , (int)(y+3+heighty) );
694 dc.DrawLine(m_Right,m_Bottom+7+(7*MARGE/4),m_Right,m_Bottom+(7*MARGE/4));
695 sprintf(text,"%g", val);
696 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
697 dc.DrawText(wxString(text, wxConvUTF8), (int)(m_Right-(widthx/2)), (int)(m_Right+3+heighty));
700 supx = st_decalage(m_MinorIncX, m_MinX) * m_StepSizeX;
702 for(y=m_Bottom,x=m_Left + supx; x <= m_Right; x+=minorIncStepX) {
703 dc.DrawLine((int)(x),(int)(m_Bottom+3+(7*MARGE/4)),(int)(x),(int)(m_Bottom+(7*MARGE/4)));
708 void wxChart::DrawAxePer(wxDC& dc)
715 double minorIncStepPer= MINOR_PER * m_StepSizePer;
716 double majorIncStepPer= MAJOR_PER * m_StepSizePer;
718 dc.SetPen(*wxBLACK_PEN);
719 dc.SetBrush(*wxBLACK_BRUSH);
722 dc.DrawLine((int)(m_Right+(7*MARGE/4)) , m_Bottom, (int)(m_Right+(7*MARGE/4)), m_Top);
724 // Major Tick Marks with values
726 for(x=m_Right,y=m_Bottom; y >= m_Top; y-=majorIncStepPer, val+=MAJOR_PER) {
727 dc.DrawLine( (int)(m_Right+(7*MARGE/4)) , (int)y , (int)(m_Right+7+(7*MARGE/4)) , (int)(y) );
728 sprintf(text,"%g",(val-(MAX_PER/2)));
729 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
730 dc.DrawText(wxString(text, wxConvUTF8) , (int)(m_Right+10+(7*MARGE/4)) , (int)(y-(heighty/2)) );
732 dc.DrawLine(m_Right+(7*MARGE/4),m_Top,m_Right+7+(7*MARGE/4),m_Top);
733 sprintf(text,"%g",(val-(MAX_PER/2)));
734 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
735 dc.DrawText(wxString(text, wxConvUTF8),(int) (m_Right+10+(7*MARGE/4) ), (int) (m_Top-(heighty/2) ));
738 for(x=m_Right,y=m_Bottom; y >= m_Top; y-=minorIncStepPer) {
739 dc.DrawLine((int)(m_Right+(7*MARGE/4)),(int)y,(int)(m_Right+3+(7*MARGE/4)),(int)(y) );
744 void wxChart::DrawGrille(wxDC& dc)
748 double minorIncStepY = m_MinorIncY * m_StepSizeY;
749 double minorIncStepX = m_MinorIncX * m_StepSizeX;
751 dc.SetBrush(*wxLIGHT_GREY_BRUSH);
754 wxPen *Pen = new wxPen(*wxLIGHT_GREY, 1, wxDOT);
757 // quadrillage en point
759 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=minorIncStepY)
760 dc.DrawLine((int)(m_Left-MARGE),(int)y,(int)(m_Right+MARGE),(int)y);
762 dc.DrawLine(m_Left-MARGE,m_Top,m_Right+MARGE,m_Top);
765 val = st_decalage(m_MinorIncX, m_MinX) * m_StepSizeX;
766 for(y=m_Bottom, x=m_Left + val ; x <= m_Right; x+=minorIncStepX)
767 dc.DrawLine((int)x,(int)(m_Bottom+MARGE),(int)x,(int)(m_Top-MARGE));
769 dc.DrawLine(m_Right,m_Bottom+MARGE,m_Right,m_Top-MARGE);
772 Pen->SetStyle(wxSOLID);
774 dc.DrawLine(m_Left-MARGE, m_Top-MARGE, m_Right+MARGE, m_Top-MARGE);
775 dc.DrawLine(m_Right+MARGE, m_Top-MARGE, m_Right+MARGE, m_Bottom+MARGE);
776 dc.DrawLine(m_Right+MARGE, m_Bottom+MARGE, m_Left-MARGE, m_Bottom+MARGE);
777 dc.DrawLine(m_Left-MARGE, m_Bottom+MARGE, m_Left-MARGE, m_Top-MARGE);
781 void wxChart::DrawLegend(wxDC& dc, int nbre)
787 int widthx, heighty, l_posx, l_posy;
789 int haut_ligne, compt = 0;
790 int l_haut = m_BottomLegend - m_TopLegend;
791 int l_larg = m_RightLegend - m_LeftLegend;
793 div_t result = div(nbre,2);
795 int l_debut = 30, l_trait = 15, l_space = 10;
798 haut_ligne = l_haut / result.quot;
800 haut_ligne = l_haut / (result.quot+1);
803 dc.SetPen(*wxBLACK_PEN);
804 dc.SetBrush(*wxBLACK_BRUSH);
805 dc.DrawLine(m_LeftLegend, m_TopLegend, m_RightLegend, m_TopLegend);
806 dc.DrawLine(m_RightLegend, m_TopLegend, m_RightLegend, m_BottomLegend);
807 dc.DrawLine(m_RightLegend, m_BottomLegend, m_LeftLegend, m_BottomLegend);
808 dc.DrawLine(m_LeftLegend, m_BottomLegend, m_LeftLegend, m_TopLegend);
811 int maxdataset = GetNumDataSet();
812 for (int a=0; a < maxdataset; a++) {
813 if (m_dataSetArray[a] && m_dataSetArray[a]->GetShow()) {
816 string = m_dataSetArray[a]->GetText();
817 sprintf(text,"%s",string);
818 dc.GetTextExtent(wxString(text, wxConvUTF8),&widthx,&heighty);
819 resulta = div(compt, 2);
820 l_posx = m_LeftLegend;
821 l_posy = m_TopLegend;
822 if (resulta.rem == 0) {
824 l_posy+= (haut_ligne * resulta.quot);
827 l_posy+= (haut_ligne * (resulta.quot+1));
828 l_posy-= (haut_ligne/2);
832 l_posx = m_LeftLegend + ((l_larg - l_trait - l_space - widthx)/2) - l_debut;
835 dataBrush = m_dataSetArray[a]->GetDataStyle();
836 dataPen = m_dataSetArray[a]->GetLineStyle();
837 dataPen->SetWidth(2);
838 dc.SetBrush(*dataBrush);
840 dc.DrawLine(l_posx + l_debut, l_posy, l_posx + l_debut + 15, l_posy);
841 dataPen->SetWidth(1);
844 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxBOLD)));
845 dc.SetPen(*wxBLACK_PEN);
846 dc.SetBrush(*wxBLACK_BRUSH);
847 dc.DrawText(wxString(text, wxConvUTF8),l_posx + l_debut + l_trait + l_space ,l_posy - (heighty/2));
848 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxLIGHT)));
854 void wxChart::DrawLine(wxDC &dc, int a)
858 double mid = m_Bottom - ((m_Bottom-m_Top)/2);
859 int maxitem = GetNumItem();
864 for(int j=0; j < maxitem; j++) {
865 if ( IsEmpty(a,j) == false ) {
867 xsuiv = m_Left + ((GetDataX(a,j) - m_MinX ) * m_StepSizeX);
869 if ( a == wxStenosis)
870 // Axe Per for Stenosis
871 ysuiv = mid - (val * m_StepSizePer);
874 ysuiv = m_Bottom - (val * m_StepSizeY);
878 dc.DrawLine((int)xprec, (int)yprec, (int)xsuiv, (int)ysuiv);
889 //-----------------------------------------------------------------
890 void wxChart::OnLeftClick(wxDC &dc, double x, double y, int keys)
895 void wxChart::OnRightClick(wxDC &dc, double x, double y, int keys)
902 //--------------------------------------------------------------------
903 void wxChart::InitData()
906 for(int a=0; a<MAX_DATASET; a++) {
907 for(int j=0; j<MAX_ITEM; j++) {
908 m_table[a][j].x=0.00;
909 m_table[a][j].y=0.00;
910 m_table[a][j].empty = true;
915 bool wxChart::IsEmpty(int a, int j)
917 return m_table[a][j].empty;
921 double wxChart::GetDataX(int a, int j)
923 return m_table[a][j].x;
926 double wxChart::GetDataY(int a, int j)
928 return m_table[a][j].y;
932 void wxChart::SetData(int a, int j, double x, double y)
936 m_table[a][j].empty = false;
940 void wxChart::ShowDataSet(bool show,int dataset)
942 if(m_dataSetArray[dataset])
943 m_dataSetArray[dataset]->Show(show);
946 bool wxChart::GetShowDataSet(int dataset)
948 if(m_dataSetArray[dataset])
949 return m_dataSetArray[dataset]->GetShow();