Board index » delphi » TeeChart

TeeChart


2004-08-20 10:25:18 PM
delphi195
I'm having a problem with TeeChart. I have a lot of series that look
like square waves. The problem is, that the tops and bottoms of the
wave are obscured by the chart "border". I can not find any sort of option
to extend the space around my graph. I have to print these charts in
monochrome, so i can not have lines over chart boarders.
- Dirk
 
 

Re:TeeChart

Hi Dirk
You can either disable clipping :
Chart1.ClipPoints := False; // allow lines "overflow" chart rectangle space
or (if you have version 7) define the space you don't want the lines to cover:
Chart1.Axes.Left.MaximumOffset := 3; // 3 pixels distance to max (top)
Chart1.Axes.Left.MinimumOffset := 3; // 3 pixels distance to min (bottom)
With versions prior to 6, you can set a manual axis range plus some offset in axis scale units, for example:
Chart1.LeftAxis.SetMinMax( Series1.YValues.Minimum -0.5, Series1.YValues.Maximum + 0.5 );
regards
david berneda
www.teechart.com
TeeChart Blog: teechart.blogspot.com
"Dirk Vandenberg" <XXXX@XXXXX.COM>writes news:XXXX@XXXXX.COM...
Quote
I'm having a problem with TeeChart. I have a lot of series that look
like square waves. The problem is, that the tops and bottoms of the
wave are obscured by the chart "border". I can not find any sort of option
to extend the space around my graph. I have to print these charts in
monochrome, so i can not have lines over chart boarders.

- Dirk
 

Re:TeeChart

Hi all,
I'm currently modifying a program using delphi 6 TeeChart and met up with some problems.
1)Under Edit chart/axis/scales, is it possible to fix a permanent number of increments for the Y-axis regardless of the values of the series being drawn? Or otherwise is it possible to change the desired increment during run time?
2)Is it possible to display the value at the particular point on the series when we move the cursor over it? Sort of like a showhint.
3)Lastly, I need to modify the program such that I have to label the various series titles all at the same time. Currently, only one title can be displayed at a time using the code shown below:
procedure TFormDisplayGraph.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
LabelSeriesTitle.Top := y-10;
LabelSeriesTitle.Left:= x;
LabelSeriesTitle.Caption:= ' '+ Series.Title + ' ';
LabelSeriesTitle.Visible:= true;
end;
Is there a way to display all at the same time? Or should I display the titles as the code is drawing the series? the code is shown below:
//show the series and assign the title if TableGraph.FindField(ListSeries[k])<>nil then
begin
Chart1.Series[i*ListSeries.Count+k].Active := True;
if ListMulti[k] = '1' then Chart1.Series[i*ListSeries.Count+k].Title := ListSeries[k] + ' ' +ListYear[i]
Else Chart1.Series[i*ListSeries.Count+k].Title := ListSeries[k]+'('+ ListMulti[k] +') ' + ListYear[i];
if QueryDraw.fieldByName(ListSeries[k]).isNull=true then Chart1.Series[i*ListSeries.Count+k].AddY(0, QueryDraw.FieldByName('DayType').value, clNone)
else Chart1.Series[i*ListSeries.Count+k].AddY(QueryDraw.FieldByName(ListSeries[k]).value * StrToFloat(ListMulti[k]), QueryDraw.FieldByName('DayType').value);
QueryDraw.Next;
end;
end;
Many thanks in advance.
John
 

Re:TeeChart

In article <41abddec$XXXX@XXXXX.COM>, John writes:
Quote
I'm currently modifying a program using delphi 6 TeeChart
and met up with some problems.
Questions related to TChart are best asked in the b.p.delphi.reporting-charting
group or on Teemachs own support groups:
TeeChart support groups
www.teechart.net/support/modules.php
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re:TeeChart

Hello:
Is it possible to change color and width of rectangle shown while zooming?
Or change color of the rectangle area?
(Teechart 3.0)
Thanks,
Sudesh
 

Re:TeeChart

ok i have done it. so pl. ignore.
thanks
 

Re:TeeChart

Hi
We added these properties in version 5 if I remember well.
Chart1->Zoom->Pen->Width = 2;
Chart1->Zoom->Brush->Style = bsSolid;
...
etc
regards
david
www.teechart.com
"Sudesh" <XXXX@XXXXX.COM>writes news:XXXX@XXXXX.COM...
Quote
Hello:
Is it possible to change color and width of rectangle shown while zooming?
Or change color of the rectangle area?
(Teechart 3.0)
Thanks,
Sudesh



 

Re:TeeChart

In my program I need to click on TeeChart shapes to do something with
parameters represented by this shape. Up to DELPHI 4 all was fine and worked
well. Since then, including DELPHI 7, clicking a shape responds only if the
shape is NOT a rectangular. Triangles, diamonds etc ok, but any rectangle is
irresponsive to clicking. I still hang on to DELPHI 4 only for that reason.
What has happened since? Where do I go wrong?
Thanks for any suggestion,
Helmut
 

Re:TeeChart

"Helmut Wiedemann" <XXXX@XXXXX.COM>writes
Quote
In my program I need to click on TeeChart shapes to do something with
parameters represented by this shape. Up to DELPHI 4 all was fine and
worked
well. Since then, including DELPHI 7, clicking a shape responds only if
the
shape is NOT a rectangular. Triangles, diamonds etc ok, but any rectangle
is
irresponsive to clicking. I still hang on to DELPHI 4 only for that
reason.
What has happened since? Where do I go wrong?
Hi Helmut,
Yes, this is a known bug that appeared between versions. However it was
fixed with TeeChart Pro v6.01 VCL and all following versions. Please notice
that current versions are TeeChart v7 Professional and Standard.
--
Best Regards,
Narcís Calvet
support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
support.steema.com for a prompter reply."
Quote
Thanks for any suggestion,
Helmut


 

Re:TeeChart

Hello,
I use BCB5 Pro. The component TeeChart is included.
First question, in project options, it appears "Component TeeChart
5.0". When I put this component on a form, the context menu displays
"TeeChart Pro 4.02" !
What is the real version I have ?
I want to use the EditChart method to display the property page at
runtime and the help of the component says this method is only
available in pro version.
To use this, include files EditChar.hpp and call the EditChart method.
But when I compiled, the compiler says it does not found IEditCha.hpp
file included in the EditChart.hpp.
I am looking for this file on my harddisk but it is not present :
EditChart.hpp is present but not IEditCha.hpp.
Do you have some explanations about this problem ?
Thanks,
PurL
 

Re:TeeChart

Hi,
I'm not sure this is the right place to ask for help, but I cannot find
any solution anywhere else, I hope you could help me.
I m adding points to the chart with the code below and it works.
for (i = 0;i<1 ;i++)
{
for (j = 1;j<=range ;j++)
{
temp = this->ListBox1->Items->Strings[j];
pos = temp.Pos(' ');
Form73->Chart1->Series[i]->Add(StrToFloat(temp.SubString(pos+1,7)),"",Form73->Chart1->Series[i]->SeriesColor);
}
}
But after i closed the chart, i want to clear the points and after some
calculations another points will be added with the code above again. But the
problem is,
whichever code below i tried, cleared the points.
Chart1->SeriesList->Clear(); or Chart1->Series[0]->Delete(0);
But when i again started to add points with the code top, i got those "list
index out of bounds"
errors. Would you please help me?
 

Re:TeeChart

"Cenk" <XXXX@XXXXX.COM>writes
Quote
Hi,
I'm not sure this is the right place to ask for help, but I cannot find
any solution anywhere else, I hope you could help me.

I m adding points to the chart with the code below and it works.

for (i = 0;i<1 ;i++)
{
for (j = 1;j<=range ;j++)
{
temp = this->ListBox1->Items->Strings[j];
pos = temp.Pos(' ');

Form73->Chart1->Series[i]->Add(StrToFloat(temp.SubString(pos+1,7)),"",Form73->Chart1->Series[i]->SeriesColor);

}


}
But after i closed the chart, i want to clear the points and after some
calculations another points will be added with the code above again. But
the problem is,
whichever code below i tried, cleared the points.

Chart1->SeriesList->Clear(); or Chart1->Series[0]->Delete(0);

But when i again started to add points with the code top, i got those
"list index out of bounds"
errors. Would you please help me?
Just a guess but shouldn't it be:-
Form73->Chart1->Series[i]->Clear();
Simon
 

Re:TeeChart

Quote
Form73->Chart1->Series[i]->Clear();

Simon
Unfortunately it did not worked.
 

Re:TeeChart

"Cenk" <XXXX@XXXXX.COM>writes
Quote

>Form73->Chart1->Series[i]->Clear();
>
>Simon

Unfortunately it did not worked.
I presume you swapped the 'i' for a '0' as in:-
Form73->Chart1->Series[0]->Clear();
Also your code doesn't quite make sense, why have the 'i' loop? And should
the j loop run from '0' to range-1?
As in :-
for (j = 0;j<range ;j++)
{
temp = this->ListBox1->Items->Strings[j];
pos = temp.Pos(' ');
Form73->Chart1->Series[0]->Add(StrToFloat(temp.SubString(pos+1,7)),"",Form73->Chart1->Series[0]->SeriesColor);
}
Which line does the de{*word*81} stop on with the exception?
Simon
 

Re:TeeChart

Quote
I presume you swapped the 'i' for a '0' as in:-

Form73->Chart1->Series[0]->Clear();

Yeap i swapped...but as i told you did not worked
Quote
Also your code doesn't quite make sense, why have the 'i' loop? And should
the j loop run from '0' to range-1?

As in :-

for (j = 0;j<range ;j++)
{
temp = this->ListBox1->Items->Strings[j];
pos = temp.Pos(' ');

Form73->Chart1->Series[0]->Add(StrToFloat(temp.SubString(pos+1,7)),"",Form73->Chart1->Series[0]->SeriesColor);
}
i loop is not necessary rite now but i might add more series thats why its
there. And the j loop starts from 1 because, temp gets the appropriate datas
from listbox1 and if j starts from 0 than the first element of listbox1
whihch is 0, is not suitable for variable temp.
Quote

Which line does the de{*word*81} stop on with the exception?
de{*word*81} gives the list out of bounds error at line below:
Form73->Chart1->Series[0]->Add(StrToFloat(temp.SubString(pos+1,7)),"",Form73->Chart1->Series[0]->SeriesColor);
thanks for helping