Hello everybody,
I've got a big problem. I use TeeChart Pro v.6.01 with C++ Builder 6. I create a chart with DBChart component and create series for this chart like this:
for(int i=0; i<iSeriesCount; i++)
{
NewSeries = new TLineSeries (CView);
NewSeries->ParentChart = CView;
}
Then I associate data for this series like this:
for(int i=0; i<iSeriesCount; i++)
{
CView->SeriesList->Items->XLabelsSource = ClientDataSet->Fields->FieldByName(myName)->FieldName;
CView->SeriesList->Items->YValues->ValueSource = ClientDataSet->Fields->FieldByName(myName1)->FieldName;
CView->SeriesList->Items->DataSource = ClientDataSet;
CView->SeriesList->Items->CheckDataSource();
if(myName.FieldType == ftString)
CView->SeriesList->Items->SortByLabels(mySort);
else
{
CView->SeriesList->Items->XValues->Order = mySsort;
CView->SeriesList->Items->XValues->Sort();
CView->SeriesList->Items->Repaint();
}
}
CView->Repaint();
Unfortunatelly the sorting which I'm using doesn't work correctly. Data that are visible on Data Tab in Chart Editor are sorted, but on my chart they aren't. What I'm doing wrong?
Data sorting
Hi,
Try calling Series.CheckDataSource after you change the order.
Try calling Series.CheckDataSource after you change the order.
Pep Jorge
http://support.steema.com
http://support.steema.com