tchart->onclickseries for tpointseries -> no action
tchart->onclickseries for tpointseries -> no action
Hello,
I have installed the teechart pro 4.07 for delphi 2009 and the program of replacing standard-teecart for delphi.
I replaced all the old components by new and tested program. I use the onclick event to select a specific function, Unfortunately at tpointseries the onclick event does not fire. I use tlineseries, then the event also triggered it.
what is the problem? what should I do if my program is running again so as before? Or is this a bug?
I would be grateful if you could help me quickly.
Thanks
I have installed the teechart pro 4.07 for delphi 2009 and the program of replacing standard-teecart for delphi.
I replaced all the old components by new and tested program. I use the onclick event to select a specific function, Unfortunately at tpointseries the onclick event does not fire. I use tlineseries, then the event also triggered it.
what is the problem? what should I do if my program is running again so as before? Or is this a bug?
I would be grateful if you could help me quickly.
Thanks
Re: tchart->onclickseries for tpointseries -> no action
I again, I test very different curve types with the onclickevent. I now use a smooth tlineseries-chart. i need many attempts to trigger the event. too many.......
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tchart->onclickseries for tpointseries -> no action
Hi Michael,
What about using TChart's OnClickSeries event? If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
I guess you mean 8.07 not 4.07 here, is that correct?I have installed the teechart pro 4.07 for delphi 2009 and the program of replacing standard-teecart for delphi.
What about using TChart's OnClickSeries event? If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: tchart->onclickseries for tpointseries -> no action
Hello,
hmmm... the version number of the tchart is called :"TeeChart pro v2010.00.00407 Win32". I downloaded it yesterday.
The problem occurs when 2d series on.
here is a little demo. I hope the errors can be understood within. Please click on the series and if successful, it then appears a window.
And here the "dfm"
hmmm... the version number of the tchart is called :"TeeChart pro v2010.00.00407 Win32". I downloaded it yesterday.
The problem occurs when 2d series on.
here is a little demo. I hope the errors can be understood within. Please click on the series and if successful, it then appears a window.
Code: Select all
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, StdCtrls, ExtCtrls, TeeProcs, Chart;
type
TForm2 = class(TForm)
Chart1: TChart;
Panel1: TPanel;
Button1: TButton;
CheckBox1: TCheckBox;
procedure Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries;
ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
procedure Button1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
var p:Tpointseries;
l: TLineSeries;
begin
p:=Tpointseries.Create(Chart1);
l:=TLineSeries.Create(Chart1);
with chart1 do begin
View3D:=false;
LeftAxis.SetMinMax(0,21);
BottomAxis.Automatic:=true;
BottomAxis.labelsangle:=90;
BottomAxis.LabelsFont.Size:=9;
BottomAxis.LabelsOnAxis:=true;
BottomAxis.Title.Font.size:=14;
BottomAxis.Title.Font.Color:=clblue;
LeftAxis.LabelsAngle:=90;
LeftAxis.Title.Font.Color:=clblue;
LeftAxis.Title.Font.size:=14;
Title.Font.Size:=16;
AddSeries(p);
AddSeries(l);
end;
p.AddXY(1,5);
p.AddXY(2,1);
p.AddXY(3,9);
p.AddXY(4,12);
p.AddXY(5,7);
l.AddXY(1,15);
l.AddXY(2,11);
l.AddXY(3,19);
l.AddXY(4,22);
l.AddXY(5,17);
end;
procedure TForm2.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries;
ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
showmessage('Im a Clickevent');
end;
procedure TForm2.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.State=cbUnchecked then Chart1.View3D:=false else Chart1.View3D:=true;
end;
end.
Code: Select all
object Form2: TForm2
Left = 0
Top = 0
Caption = 'Form2'
ClientHeight = 479
ClientWidth = 692
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Chart1: TChart
Left = 0
Top = 0
Width = 692
Height = 438
BackWall.Brush.Gradient.Direction = gdBottomTop
BackWall.Brush.Gradient.EndColor = clWhite
BackWall.Brush.Gradient.StartColor = 15395562
BackWall.Brush.Gradient.Visible = True
BackWall.Gradient.Direction = gdBottomTop
BackWall.Gradient.EndColor = clWhite
BackWall.Gradient.StartColor = 15395562
BackWall.Gradient.Visible = True
BackWall.Transparent = False
Foot.Font.Name = 'Verdana'
Gradient.Direction = gdBottomTop
Gradient.EndColor = clWhite
Gradient.MidColor = 15395562
Gradient.StartColor = 15395562
Gradient.Visible = True
LeftWall.Color = 14745599
Legend.Font.Name = 'Verdana'
Legend.MaxNumRows = 0
RightWall.Color = 14745599
SubFoot.Font.Name = 'Verdana'
SubTitle.Font.Name = 'Verdana'
Title.Font.Name = 'Verdana'
Title.Text.Strings = (
'TChart')
OnClickSeries = Chart1ClickSeries
BottomAxis.Axis.Color = 4210752
BottomAxis.Grid.Color = 11119017
BottomAxis.LabelsFont.Name = 'Verdana'
BottomAxis.MaximumOffset = 5
BottomAxis.MinimumOffset = 5
BottomAxis.TicksInner.Color = 11119017
BottomAxis.Title.Font.Name = 'Verdana'
DepthAxis.Axis.Color = 4210752
DepthAxis.Grid.Color = 11119017
DepthAxis.LabelsFont.Name = 'Verdana'
DepthAxis.TicksInner.Color = 11119017
DepthAxis.Title.Font.Name = 'Verdana'
DepthTopAxis.Axis.Color = 4210752
DepthTopAxis.Grid.Color = 11119017
DepthTopAxis.LabelsFont.Name = 'Verdana'
DepthTopAxis.TicksInner.Color = 11119017
DepthTopAxis.Title.Font.Name = 'Verdana'
LeftAxis.Axis.Color = 4210752
LeftAxis.Grid.Color = 11119017
LeftAxis.LabelsFont.Name = 'Verdana'
LeftAxis.MaximumOffset = 5
LeftAxis.MinimumOffset = 5
LeftAxis.TicksInner.Color = 11119017
LeftAxis.Title.Font.Name = 'Verdana'
RightAxis.Axis.Color = 4210752
RightAxis.Grid.Color = 11119017
RightAxis.LabelsFont.Name = 'Verdana'
RightAxis.TicksInner.Color = 11119017
RightAxis.Title.Font.Name = 'Verdana'
TopAxis.Axis.Color = 4210752
TopAxis.Grid.Color = 11119017
TopAxis.LabelsFont.Name = 'Verdana'
TopAxis.TicksInner.Color = 11119017
TopAxis.Title.Font.Name = 'Verdana'
Align = alClient
TabOrder = 0
ExplicitTop = 2
ColorPaletteIndex = 13
end
object Panel1: TPanel
Left = 0
Top = 438
Width = 692
Height = 41
Align = alBottom
Caption = 'Panel1'
TabOrder = 1
ExplicitLeft = 508
ExplicitTop = 444
ExplicitWidth = 185
object Button1: TButton
Left = 300
Top = 8
Width = 75
Height = 25
Caption = 'Init'
TabOrder = 0
OnClick = Button1Click
end
object CheckBox1: TCheckBox
Left = 460
Top = 12
Width = 97
Height = 17
Caption = '3D'
TabOrder = 1
OnClick = CheckBox1Click
end
end
end
Re: tchart->onclickseries for tpointseries -> no action
Hello,
they could reproduce the errors with the clickseriesevent already? Or they need more information?
regards
they could reproduce the errors with the clickseriesevent already? Or they need more information?
regards
Re: tchart->onclickseries for tpointseries -> no action
Hi Michael,
You are right. For some reason the Chart event OnClickSeries doesn't seem to work with TPointSeries. I've added it to the defect list to be fixed in future releases (TV52015058).
However, you could try with the OnMouseDown event:
You are right. For some reason the Chart event OnClickSeries doesn't seem to work with TPointSeries. I've added it to the defect list to be fixed in future releases (TV52015058).
However, you could try with the OnMouseDown event:
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var i: Integer;
begin
for i:=0 to Chart1.SeriesCount-1 do
if (Chart1[i].Clicked(X,Y) > -1) then
showmessage('MouseDown event, series clicked: ' + IntToStr(i));
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: tchart->onclickseries for tpointseries -> no action
Hi,
I have also seen a similar problem with TLineSeries when the series is a straight horizontal line. I am using TeeChart Standard V9, 2010.
Sajjad
I have also seen a similar problem with TLineSeries when the series is a straight horizontal line. I am using TeeChart Standard V9, 2010.
Sajjad
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tchart->onclickseries for tpointseries -> no action
Hello Michael and Sajjad,
Both issues works fine for me here using our latest sources and code snippet below. Are you using v2010.01.11004 which is the latest version available at the client area?
Thanks in advance.
Both issues works fine for me here using our latest sources and code snippet below. Are you using v2010.01.11004 which is the latest version available at the client area?
Code: Select all
uses Series;
procedure TForm1.Chart1ClickSeries(Sender: TCustomChart;
Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ShowMessage('Series clicked');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
// Chart1.AddSeries(TPointSeries.Create(Self));
Chart1.AddSeries(TLineSeries.Create(Self));
Chart1[0].Add(10);
Chart1[0].Add(10);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: tchart->onclickseries for tpointseries -> no action
Hi Narcis,
I have been using TeeChart Standard v2010.00.00407 and haven't tried the latest.
Thanks,
Sajjad
I have been using TeeChart Standard v2010.00.00407 and haven't tried the latest.
Thanks,
Sajjad
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tchart->onclickseries for tpointseries -> no action
Hi Sajjad,
Can you please try if latest release solves the issue at your end?
Thanks in advance.
Can you please try if latest release solves the issue at your end?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |