1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 //----------------------------------------------------------------
28 #pragma implementation "chart.h"
35 //-------------------------------------------------------------------
36 #include "wx/wxprec.h"
45 //----------------------------------------------------------------
46 // DataSet : Constructor & Destructor
47 //-------------------------------------------------------------------
48 wxDataSet::wxDataSet(wxPen *lStyle, wxBrush *dStyle, int dWidth,
49 int lWidth, int dGap, int pMark, int disValues)
56 m_displayValues = disValues;
62 wxDataSet::wxDataSet(wxPen *lStyle, wxBrush *dStyle,
63 wxString *lText, bool lDisplay)
78 wxDataSet::wxDataSet()
92 wxDataSet::~wxDataSet()
100 //-----------------------------------------------------------------
102 //-------------------------------------------------------------------
103 BEGIN_EVENT_TABLE(wxChart, wxWindow)
104 EVT_PAINT(wxChart::OnPaint)
107 //---------------------------------------------------------------------
108 // Constructor & Destructor
109 wxChart::wxChart(wxFrame *parent, wxWindowID id,
110 const wxPoint& pos, const wxSize& size,
111 long style, const wxString& name)
112 : wxWindow(parent, id, pos, size, style, name)
115 SetMaxWidthHeight(size.GetWidth(), size.GetHeight());
116 SetCenterChart(pos.x + (GetLargeur()/2), pos.y + (GetHauteur()/2));
132 void wxChart::InitChart()
134 SetShowPer(false); //not display line % per default
136 for(int i=0; i<m_NumDataSet ; i++)
137 ShowDataSet(false, i);
145 //--------------------------------------------------------------
146 static double st_difference(double val, int multi, bool sens=true)
151 result = div(int(val), multi);
157 if ( result.rem == 0 )
159 if (val - (int)val > 0 )
160 retour = (multi - result.rem) - (val - int(val));
164 retour = (multi - result.rem) - (val - int(val));
170 retour = result.rem + (val - (int)val);
175 static double st_decalage(double IncX, double MinX)
177 double retour = 0.00;
182 result = div(MinX, IncX);
183 if ( result.rem == 0 )
185 if (MinX - (int)MinX > 0 )
186 retour = ((result.quot + 1) * IncX) - MinX;
190 retour = ((result.quot+1) * IncX) - MinX;
197 static double st_origine(double IncX, double MinX)
199 double retour = MinX;
204 result = div(MinX, IncX);
207 if (MinX - (int)MinX > 0 )
208 retour = (result.quot + 1) * IncX;
212 retour = (result.quot + 1) * IncX;
219 static void st_InverseCol(double *l_MinCol, double *l_MaxCol)
221 if (*l_MinCol > *l_MaxCol)
223 int tempo = *l_MaxCol;
224 *l_MaxCol = *l_MinCol;
231 //--------------------------------------------------------------
232 void wxChart::SetInfX(double inf)
237 void wxChart::SetSupX(double sup)
243 void wxChart::SetSupY(double sup)
250 void wxChart::SetIncAxisX(double minor, double major)
256 void wxChart::SetIncAxisY(double minor, double major)
263 void wxChart::SetInitEdge()
273 void wxChart::SetChartBounds()
275 m_Top = m_CenterY - (m_MaxHauteur/2) + m_EdgeTop;
276 m_Bottom = m_CenterY + (m_MaxHauteur/2) - m_EdgeBottom;
277 m_Left = m_CenterX - (m_MaxLargeur/2) + m_EdgeLeft;
278 m_Right = m_CenterX + (m_MaxLargeur/2) - m_EdgeRight;
282 void wxChart::SetChartBoundsLegend()
284 m_TopLegend = m_CenterY - (m_MaxHauteur/2) + m_EdgeTopLegend;
285 m_BottomLegend = m_CenterY + (m_MaxHauteur/2) - m_EdgeBottomLegend;
286 m_LeftLegend = m_CenterX - (m_MaxLargeur/2) + m_EdgeLeftLegend;
287 m_RightLegend = m_CenterX + (m_MaxLargeur/2) - m_EdgeRightLegend;
291 void wxChart::SetCadreLegend(int nbr, int *bottom)
293 int val=GetEdgeBottom();
294 div_t result = div(nbr, 2);
297 val+= (nbr * 10) + 5;
299 val+= (( nbr + 1 ) * 10) + 5;
303 SetEdgeTopLegend(m_CenterY + (m_MaxHauteur/2) - val + 33);
304 SetEdgeBottomLegend(8);
306 int l_left = GetEdgeLeft();
307 int l_right = GetEdgeRight();
309 // more small for only 1 line
312 l_left+=m_CenterX - (m_MaxLargeur/3);
313 l_right+=m_CenterX - (m_MaxLargeur/3);
316 SetEdgeLeftLegend(l_left);
317 SetEdgeRightLegend(l_right);
322 void wxChart::SetShowPer(bool per)
329 void wxChart::SetMaxValue(double max)
338 double wxChart::MaxValue()
340 double data, val = 1.00;
341 int maxdata = GetNumDataSet()-1;
342 int maxitem = GetNumItem();
344 // Exclure Stenosis for calcul MaxValue
345 for(int a=0; a < maxdata; a++)
347 if (GetShowDataSet(a))
349 for(int j=0; j<=maxitem; j++)
351 if ( IsEmpty(a,j) == false )
353 data = GetDataY(a,j);
365 double wxChart::MinCol(double min)
367 double retour = 0.00;
368 int maxdata = GetNumDataSet()-1;
370 // Exclure Stenosis for calcul MaxValue
371 for(int a=0; a < maxdata; a++)
373 if (GetShowDataSet(a))
385 double wxChart::MaxCol(double max)
387 double retour = 1.00;
388 int maxdata = GetNumDataSet()-1;
390 // Exclure Stenosis for calcul MaxValue
391 for(int a=0; a < maxdata; a++)
393 if (GetShowDataSet(a))
406 void wxChart::SetStepSizeX(double stepX)
411 void wxChart::SetStepSizeY(double stepY)
417 void wxChart::SetStepSizePer(double stepPer)
419 m_StepSizePer = stepPer;
423 void wxChart::SetCenterChart(int x, int y)
429 void wxChart::SetMaxWidthHeight(int x,int y)
436 void wxChart::SetMinX(double MinX)
442 void wxChart::SetMaxX(double MaxX)
449 void wxChart::SetEdgeTop(int top)
454 void wxChart::SetEdgeBottom(int bottom)
456 m_EdgeBottom = bottom;
459 void wxChart::SetEdgeLeft(int left)
464 void wxChart::SetEdgeRight(int right)
470 void wxChart::SetEdgeTopLegend(int top)
472 m_EdgeTopLegend = top;
475 void wxChart::SetEdgeBottomLegend(int bottom)
477 m_EdgeBottomLegend = bottom;
480 void wxChart::SetEdgeLeftLegend(int left)
482 m_EdgeLeftLegend = left;
486 void wxChart::SetEdgeRightLegend(int right)
488 m_EdgeRightLegend = right;
493 void wxChart::SetNumDataSet(int num)
498 void wxChart::SetNumItem(int num)
504 int wxChart::GetShow()
508 for(int i=0; i < m_NumDataSet ; i++)
510 if (GetShowDataSet(i))
517 void wxChart::InitDataSet()
522 for(int i=0; i<MAX_DATASET ; i++)
523 m_dataSetArray[i]=NULL;
526 wxColour *BlueColour = new wxColour(0,0,255);
527 wxColour *GreyColour = new wxColour(192,192,192);
528 wxColour *YellowColour = new wxColour(255,255,0);
529 wxColour *VioletColour = new wxColour(255,0,255);
530 wxColour *CyanColour = new wxColour(0,255,255);
533 // Create All DataSet
534 // Per default : Show(false)
535 m_dataSetArray[wxArea] =
536 new wxDataSet(wxRED_PEN, wxRED_BRUSH, (wxString*)"Area");
538 m_dataSetArray[wxPerimeter] =
539 new wxDataSet(new wxPen(*BlueColour, 1, wxSOLID),
540 new wxBrush(*BlueColour, wxSOLID),
541 (wxString*)"Perimeter");
543 m_dataSetArray[wxDiameterArea] =
544 new wxDataSet(new wxPen(*GreyColour, 1, wxSOLID),
545 new wxBrush(*GreyColour, wxSOLID),
546 (wxString*)"Diameter from area");
548 m_dataSetArray[wxDiameterPerimeter] =
549 new wxDataSet(new wxPen(*YellowColour, 1, wxSOLID),
550 new wxBrush(*YellowColour, wxSOLID),
551 (wxString*)"Diameter from perimeter");
553 m_dataSetArray[wxMinimumDiameter] =
554 new wxDataSet(new wxPen(*VioletColour, 1, wxSOLID),
555 new wxBrush(*VioletColour, wxSOLID),
556 (wxString*)"Minimum diameter");
558 m_dataSetArray[wxMaximumDiameter] =
559 new wxDataSet(new wxPen(*CyanColour, 1, wxSOLID),
560 new wxBrush(*CyanColour, wxSOLID),
561 (wxString*)"Maximum diameter");
563 m_dataSetArray[wxAverageDiameter] =
564 new wxDataSet(wxBLACK_PEN, wxBLACK_BRUSH, (wxString*)"Average diameter");
566 m_dataSetArray[wxStenosis] =
567 new wxDataSet(wxGREEN_PEN, wxGREEN_BRUSH, (wxString*)"Stenosis");
573 //---------------------------------------------------------------------
574 void wxChart::OnPaint(wxPaintEvent& event)
582 void wxChart::Draw(wxDC& dc)
587 //----------------------------------------------------------------------------
593 //----------------------------------------------------------------------------
594 // Font : one for all chart
595 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxLIGHT)));
597 //----------------------------------------------------------------------------
599 wxSize size = GetClientSize();
600 SetMaxWidthHeight(size.GetWidth(), size.GetHeight());
601 SetCenterChart((GetLargeur()/2), (GetHauteur()/2));
604 //-----------------------------------------------------------------------------
606 ShowDataSet(true,wxArea);
607 ShowDataSet(true,wxPerimeter);
608 ShowDataSet(true,wxDiameterArea);
609 ShowDataSet(false,wxDiameterPerimeter);
610 ShowDataSet(false,wxMinimumDiameter);
611 ShowDataSet(false,wxMaximumDiameter);
612 ShowDataSet(false,wxAverageDiameter);
613 ShowDataSet(false,wxStenosis);
621 ShowDataSet(true,wxStenosis);
625 //--------------------------------------------------------------------
630 SetCadreLegend(nbr, &m_EdgeBottom);
631 SetChartBoundsLegend();
635 //-------------------------------------------------------------------
636 // Valeur Min et Max des abscisses
639 SetInfX(st_difference(m_MinX,10,false));
640 SetSupX(st_difference(m_MaxX,10,true));
642 //------------------------------------------------------------------
646 SetData(wxStenosis, 0, 0, -45);
647 SetData(wxStenosis, 1, 0.4, 0);
648 SetData(wxStenosis, 2, 0.6, -15);
649 SetData(wxStenosis, 3, 0.8, 0);
650 SetData(wxStenosis, 4, 0.9, 100);
651 SetData(wxStenosis, 5, 1, 0);
654 SetData(wxArea,0, 0, 0.8);
655 SetData(wxArea,1, 0.2, 0.6);
656 SetData(wxArea,2, 0.3, 0.8);
657 SetData(wxArea,3, 0.4, 1);
658 SetData(wxArea,4, 0.8, 0.4);
659 SetData(wxArea,5, 1, 0.2);
661 //-----------------------------------------------------------------
662 // Valeur Max du chart
663 SetMaxValue(MaxValue());
664 SetSupY(st_difference(m_MaxValue, 10, true));
666 //-------------------------------------------------------------------------------
668 SetIncAxisX((m_MaxX + m_SupX - (m_MinX - m_InfX)) / (double)MINOR_STEP,
669 (m_MaxX + m_SupX - (m_MinX - m_InfX)) / (double)MAJOR_STEP);
670 SetIncAxisY((m_MaxValue + m_SupY) / (double)MINOR_STEP,
671 (m_MaxValue + m_SupY) / (double)MAJOR_STEP);
673 SetStepSizeX(( m_MaxLargeur - (m_EdgeLeft + m_EdgeRight + m_SupX + m_InfX)) /
675 SetStepSizeY(( m_MaxHauteur - (m_EdgeBottom + m_EdgeTop + m_SupY )) /
677 SetStepSizePer(( m_MaxHauteur - (m_EdgeBottom + m_EdgeTop)) /
681 //-----------------------------------------------------------------------------
683 //---------------------------------------------------------------------------
690 //-----------------------------------------------------------------------------
692 //---------------------------------------------------------------------------
693 dc.DestroyClippingRegion();
694 dc.SetClippingRegion(m_Left , m_Top ,
695 GetLargeur() - (m_EdgeRight + m_EdgeLeft ),
696 GetHauteur() - (m_EdgeTop + m_EdgeBottom ));
698 //---------------------------------------------------------------------------
700 //---------------------------------------------------------------------------
701 int maxdataset = GetNumDataSet();
702 for(int a=0; a < maxdataset; a++)
704 if(m_dataSetArray[a] && m_dataSetArray[a]->GetShow())
706 dataBrush = m_dataSetArray[a]->GetDataStyle();
707 dataPen = m_dataSetArray[a]->GetLineStyle();
708 dc.SetBrush(*dataBrush);
714 //---------------------------------------
716 dc.DestroyClippingRegion();
722 void wxChart::DrawAxe(wxDC& dc)
729 double minorIncStepY= m_MinorIncY * m_StepSizeY;
730 double majorIncStepY= m_MajorIncY * m_StepSizeY;
732 double minorIncStepX= m_MinorIncX * m_StepSizeX;
733 double majorIncStepX= m_MajorIncX * m_StepSizeX;
735 dc.SetPen(*wxBLACK_PEN);
736 dc.SetBrush(*wxBLACK_BRUSH);
739 dc.DrawLine(m_Left, m_Bottom+(7*MARGE/4), m_Right, m_Bottom+(7*MARGE/4));
741 dc.DrawLine(m_Left-(7*MARGE/4), m_Bottom, m_Left-(7*MARGE/4), m_Top);
744 // Major Tick Marks with values
746 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=majorIncStepY, val+=m_MajorIncY)
748 dc.DrawLine(m_Left-7-(7*MARGE/4),y,m_Left-(7*MARGE/4),y);
749 sprintf(text,"%g", val);
750 dc.GetTextExtent(text,&widthx,&heighty);
751 dc.DrawText(text,m_Left-10-widthx-(7*MARGE/4),y-(heighty/2));
756 dc.DrawLine(m_Left-7-(7*MARGE/4),m_Top,m_Left-(7*MARGE/4),m_Top);
757 sprintf(text,"%g", val);
758 dc.GetTextExtent(text,&widthx,&heighty);
759 dc.DrawText(text,m_Left-10-widthx-(7*MARGE/4),m_Top-(heighty/2));
763 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=minorIncStepY)
765 dc.DrawLine(m_Left-3-(7*MARGE/4),y,m_Left-(7*MARGE/4),y);
769 // Major Tick Marks with values
770 supx = st_decalage(m_MajorIncX, m_MinX) * m_StepSizeX;
771 val = st_origine(m_MajorIncX, m_MinX);
772 for(y=m_Bottom,x=m_Left + supx; x <= m_Right; x+=majorIncStepX, val+=m_MajorIncX)
774 dc.DrawLine(x,m_Bottom+7+(7*MARGE/4),x,m_Bottom+(7*MARGE/4));
775 sprintf(text,"%g", val);
776 dc.GetTextExtent(text,&widthx,&heighty);
777 dc.DrawText(text,x-(widthx/2),y+3+heighty);
782 dc.DrawLine(m_Right,m_Bottom+7+(7*MARGE/4),m_Right,m_Bottom+(7*MARGE/4));
783 sprintf(text,"%g", val);
784 dc.GetTextExtent(text,&widthx,&heighty);
785 dc.DrawText(text,m_Right-(widthx/2),m_Right+3+heighty);
788 supx = st_decalage(m_MinorIncX, m_MinX) * m_StepSizeX;
790 for(y=m_Bottom,x=m_Left + supx; x <= m_Right; x+=minorIncStepX)
792 dc.DrawLine(x,m_Bottom+3+(7*MARGE/4),x,m_Bottom+(7*MARGE/4));
797 void wxChart::DrawAxePer(wxDC& dc)
804 double minorIncStepPer= MINOR_PER * m_StepSizePer;
805 double majorIncStepPer= MAJOR_PER * m_StepSizePer;
807 dc.SetPen(*wxBLACK_PEN);
808 dc.SetBrush(*wxBLACK_BRUSH);
811 dc.DrawLine(m_Right+(7*MARGE/4), m_Bottom, m_Right+(7*MARGE/4), m_Top);
813 // Major Tick Marks with values
815 for(x=m_Right,y=m_Bottom; y >= m_Top; y-=majorIncStepPer, val+=MAJOR_PER)
817 dc.DrawLine(m_Right+(7*MARGE/4),y,m_Right+7+(7*MARGE/4),y);
818 sprintf(text,"%g",(val-(MAX_PER/2)));
819 dc.GetTextExtent(text,&widthx,&heighty);
820 dc.DrawText(text,m_Right+10+(7*MARGE/4),y-(heighty/2));
822 dc.DrawLine(m_Right+(7*MARGE/4),m_Top,m_Right+7+(7*MARGE/4),m_Top);
823 sprintf(text,"%g",(val-(MAX_PER/2)));
824 dc.GetTextExtent(text,&widthx,&heighty);
825 dc.DrawText(text,m_Right+10+(7*MARGE/4),m_Top-(heighty/2));
828 for(x=m_Right,y=m_Bottom; y >= m_Top; y-=minorIncStepPer)
830 dc.DrawLine(m_Right+(7*MARGE/4),y,m_Right+3+(7*MARGE/4),y);
836 void wxChart::DrawGrille(wxDC& dc)
840 double minorIncStepY = m_MinorIncY * m_StepSizeY;
841 double minorIncStepX = m_MinorIncX * m_StepSizeX;
843 dc.SetBrush(*wxLIGHT_GREY_BRUSH);
846 wxPen *Pen = new wxPen(*wxLIGHT_GREY, 1, wxDOT);
849 // quadrillage en point
851 for(x=m_Left,y=m_Bottom; y >= m_Top; y-=minorIncStepY)
852 dc.DrawLine(m_Left-MARGE,y,m_Right+MARGE,y);
854 dc.DrawLine(m_Left-MARGE,m_Top,m_Right+MARGE,m_Top);
857 val = st_decalage(m_MinorIncX, m_MinX) * m_StepSizeX;
858 for(y=m_Bottom, x=m_Left + val ; x <= m_Right; x+=minorIncStepX)
859 dc.DrawLine(x,m_Bottom+MARGE,x,m_Top-MARGE);
861 dc.DrawLine(m_Right,m_Bottom+MARGE,m_Right,m_Top-MARGE);
864 Pen->SetStyle(wxSOLID);
866 dc.DrawLine(m_Left-MARGE, m_Top-MARGE, m_Right+MARGE, m_Top-MARGE);
867 dc.DrawLine(m_Right+MARGE, m_Top-MARGE, m_Right+MARGE, m_Bottom+MARGE);
868 dc.DrawLine(m_Right+MARGE, m_Bottom+MARGE, m_Left-MARGE, m_Bottom+MARGE);
869 dc.DrawLine(m_Left-MARGE, m_Bottom+MARGE, m_Left-MARGE, m_Top-MARGE);
874 void wxChart::DrawLegend(wxDC& dc, int nbre)
880 int widthx, heighty, l_posx, l_posy;
882 int haut_ligne, compt = 0;
883 int l_haut = m_BottomLegend - m_TopLegend;
884 int l_larg = m_RightLegend - m_LeftLegend;
885 div_t result = div(nbre,2);
887 int l_debut = 30, l_trait = 15, l_space = 10;
890 haut_ligne = l_haut / result.quot;
892 haut_ligne = l_haut / (result.quot+1);
895 dc.SetPen(*wxBLACK_PEN);
896 dc.SetBrush(*wxBLACK_BRUSH);
897 dc.DrawLine(m_LeftLegend, m_TopLegend, m_RightLegend, m_TopLegend);
898 dc.DrawLine(m_RightLegend, m_TopLegend, m_RightLegend, m_BottomLegend);
899 dc.DrawLine(m_RightLegend, m_BottomLegend, m_LeftLegend, m_BottomLegend);
900 dc.DrawLine(m_LeftLegend, m_BottomLegend, m_LeftLegend, m_TopLegend);
903 int maxdataset = GetNumDataSet();
904 for (int a=0; a < maxdataset; a++)
906 if (m_dataSetArray[a] && m_dataSetArray[a]->GetShow())
910 string = m_dataSetArray[a]->GetText();
911 sprintf(text,"%s",string);
912 dc.GetTextExtent(text,&widthx,&heighty);
914 resulta = div(compt, 2);
915 l_posx = m_LeftLegend;
916 l_posy = m_TopLegend;
917 if (resulta.rem == 0)
920 l_posy+= (haut_ligne * resulta.quot);
923 l_posy+= (haut_ligne * (resulta.quot+1));
925 l_posy-= (haut_ligne/2);
929 l_posx = m_LeftLegend + ((l_larg - l_trait - l_space - widthx)/2) - l_debut;
932 dataBrush = m_dataSetArray[a]->GetDataStyle();
933 dataPen = m_dataSetArray[a]->GetLineStyle();
934 dataPen->SetWidth(2);
935 dc.SetBrush(*dataBrush);
937 dc.DrawLine(l_posx + l_debut, l_posy, l_posx + l_debut + 15, l_posy);
938 dataPen->SetWidth(1);
940 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxBOLD)));
941 dc.SetPen(*wxBLACK_PEN);
942 dc.SetBrush(*wxBLACK_BRUSH);
943 dc.DrawText(text,l_posx + l_debut + l_trait + l_space ,l_posy - (heighty/2));
944 dc.SetFont(*(new wxFont(1, wxDEFAULT, wxNORMAL, wxLIGHT)));
951 void wxChart::DrawLine(wxDC &dc, int a)
955 double mid = m_Bottom - ((m_Bottom-m_Top)/2);
956 int maxitem = GetNumItem();
961 for(int j=0; j < maxitem; j++)
963 if ( IsEmpty(a,j) == false )
966 xsuiv = m_Left + ((GetDataX(a,j) - m_MinX ) * m_StepSizeX);
968 if ( a == wxStenosis)
969 // Axe Per for Stenosis
970 ysuiv = mid - (val * m_StepSizePer);
973 ysuiv = m_Bottom - (val * m_StepSizeY);
976 dc.DrawLine(xprec, yprec, xsuiv, ysuiv);
987 //-----------------------------------------------------------------
988 void wxChart::OnLeftClick(wxDC &dc, double x, double y, int keys)
993 void wxChart::OnRightClick(wxDC &dc, double x, double y, int keys)
1000 //--------------------------------------------------------------------
1001 void wxChart::InitData()
1004 for(int a=0; a<MAX_DATASET; a++)
1006 for(int j=0; j<MAX_ITEM; j++)
1008 m_table[a][j].x=0.00;
1009 m_table[a][j].y=0.00;
1010 m_table[a][j].empty = true;
1015 bool wxChart::IsEmpty(int a, int j)
1017 return m_table[a][j].empty;
1021 double wxChart::GetDataX(int a, int j)
1024 return m_table[a][j].x;
1027 double wxChart::GetDataY(int a, int j)
1030 return m_table[a][j].y;
1034 void wxChart::SetData(int a, int j, double x, double y)
1036 m_table[a][j].x = x;
1037 m_table[a][j].y = y;
1038 m_table[a][j].empty = false;
1042 void wxChart::ShowDataSet(bool show,int dataset)
1044 if(m_dataSetArray[dataset])
1045 m_dataSetArray[dataset]->Show(show);
1048 bool wxChart::GetShowDataSet(int dataset)
1051 if(m_dataSetArray[dataset])
1052 return m_dataSetArray[dataset]->GetShow();