Page 1 of 1

Borland Builder 4 with v8

Posted: Thu May 28, 2009 6:54 pm
by 10052635
Earlier this year, early March, I had several discussions about using v8 with Builder 4. The defect was given a number (TV52013962). Have these issues now been corrected? If so, what version should I download?

Posted: Fri May 29, 2009 8:02 am
by narcis
Hi Roy,

I'm sorry but we still haven't found a solution to this issue. When it's fixed it will be included in following releases and documented on corresponding release notes. For TeeChart version release announcements and what's fixed on them I recommend you to be aware at this forums or subscribe to our RSS news feed.

Borland Builder 4 with v8

Posted: Fri May 29, 2009 11:48 am
by 10052635
Since it is the logarithmic scaling in v8 that we want, would it be possible to make a special version of v6 with the new logarithmic scaling?

Borland Builder 4 with v8

Posted: Fri May 29, 2009 12:37 pm
by 10052635
As a second alternative, does anyone have sample code to modify the scaling at runtime to true logarithmic, that is decade steps instead of limear steps.

Posted: Fri May 29, 2009 2:40 pm
by narcis
Hi Roy,

That's default behavior if logarithmic if logarithmic base is 10, which is default base too. Which base are you using?

Borland Builder 4 with v8

Posted: Fri May 29, 2009 2:48 pm
by 10052635
It is logarithmic base 10 that we are using. The problem is that the labels are not in logarithmic increments, they are instead in linear increments. This causes the graph to look very weird if the data crosses several decades. The data that we have, when in logarithmic will usually cross 3-5 decades from 10E-6 through 10E-1 typically.

Posted: Fri May 29, 2009 3:27 pm
by narcis
Hello Roy,

Using v6's Tee6New.exe demo included with TeeChart Pro v6 VCL for BCB 4 and following the steps below I get logarithmic scale:

1. Go to All Features\Welcome!\Chart Styles\Standard\Bar example.
2. Double click on the yellowish memo to run the chart editor.
3. Go to the Chart->3D tab and disable "3 Dimensions" checkbox.
4. Go to Chart->Axis->Axes->Left Axis and enable "Logarithmic" checkbox.
5. At the same tab go to Maximum tab, press the "Change" button and set the value to 1000000.
6. Finally close the edito and maximise the application window.

Following those steps I get logarithmic scale for the left axis. Does this work fine at your end?

Thanks in advance.

Borland Builder 4 with v8

Posted: Fri May 29, 2009 3:28 pm
by 10052635
Would the code below (which I found on another post) work?

Series1.FillSampleValues(100);

With Chart1.Axes.Bottom, Chart1.Axes.Bottom.Items do
begin
// Step 1: setup axis
Grid.Style := psSolid;
LabelsAngle := 90;
MinorTickCount := 0;
Logarithmic := True;
SetMinMax(1,100);
// Step 2: setup labels
Clear;
Add(1.0,FormatFloat('0.0',1.0));
Add(2,' '); // only grid, no label
Add(3,' '); // only grid, no label
Add(5,FormatFloat('0.0',5));
Add(7,' '); // only grid, no label
Add(10,FormatFloat('0.0',10));
Add(20,' '); // only grid, no label
Add(30,' '); // only grid, no label
Add(50,FormatFloat('0.0',50));
Add(70,' '); // only grid, no label
Add(100,FormatFloat('0.0',100));
end;

Posted: Fri May 29, 2009 3:29 pm
by narcis
Hi Roy,

No, this code is explicitly removing standard labels and adding custom labels to the axis.

I think we have crossed posts. Can you please check what I told you in my previous reply?

Thanks in advance.

Borland Builder 4 with v8

Posted: Fri May 29, 2009 4:13 pm
by 10052635
I tried what you said and if I set up the axis as described it looks correct. However, when I try to do the same thing at run time it goes back to linear increments. In my code the axis is linear sometimes and logarithmic sometimes so I have to be able to change at run time.

Posted: Mon Jun 01, 2009 8:41 am
by yeray
Hi Roy,

Could you please try the following example code (Only a chart, three bar series and a check box added at design time)?

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Chart1->SeriesList->FillSampleValues(6);
  Series1->MultiBar = mbStacked;
  Chart1->View3D = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
  if (CheckBox1->Checked)
  {
		Chart1->Axes->Left->Logarithmic = true;
		Chart1->Axes->Left->AutomaticMaximum = false;
		Chart1->Axes->Left->Maximum = 1000000;
  }
  else
  {
		Chart1->Axes->Left->Logarithmic = false;
		Chart1->Axes->Left->AutomaticMaximum = true;
  }
}

Borland Builder 4 with v8

Posted: Tue Jun 02, 2009 12:30 pm
by 10052635
Thanks. I think I understand now. Will let you know once I get it all running.

Borland Builder 4 with v8

Posted: Tue Jun 02, 2009 4:29 pm
by 10052635
Yeray:
Thanks for the code. That was the ticket. We are now up and running with very good looking charts. The switch between linear and logarithmic is very good. Very pleased.