Hi
Sorry for my english (google traslate)
I would like to point out two bugs encountered when using tdbchart
1) If I create multiple series in the groups and delete one from that moment the series counter displays the references incorrectly
(serial number error.png)
2) A persistent field of a tclientdataset set to currency is reported correctly if used in the label if used as the value of X the format is lost
(currency error.png)
Delphi 12
Windows 10
TeeChartVCLFMXStandard-2023.39
reporting two tdbchart bugs
reporting two tdbchart bugs
- Attachments
-
- problem 2
- currency error.png (216.27 KiB) Viewed 731 times
-
- problem 1
- series number error.png (244.82 KiB) Viewed 731 times
Re: reporting two tdbchart bugs
Hello,
- The
- The
Maybe we should save an internal
In the meanwhile, you could make sure you set a
When you create a series, no
Name
is set to it by default. And when a series doesn't have a Name
set, both the legend and the TChartListBox
(used to draw the series list in the Editor) use the SeriesNameOrIndex
function to calculate a string to draw each item. Then, the issues here are:- The
SeriesNameOrIndex
method gives Series1
always for the first series. If you remove the first series, then the next series will be Series1
.- The
TChartListBox
doesn't refresh when you remove a series. That's why the Editor and the Legend look out of sync. If you close the Editor and reopen it, they should be in sync again.Maybe we should save an internal
Name
when a Series is created, in a similar way as we do with the Series Color
, where we use a internal ISeriesColor
property. I've added it to the public tracker (#2694).In the meanwhile, you could make sure you set a
Name
property in your series. Ie using the GetNewSeriesName
function:
Code: Select all
for i:=0 to nSeries-1 do
with AddSeries(TBarSeries) do
begin
Marks.Hide;
Name:=GetNewSeriesName(Self);
FillSampleValues;
end;
I'll take a look at this asap.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: reporting two tdbchart bugs
Hello,
I'm trying to reproduce the problem in a simple example project without success.
This is the closest I can get to your screenshot with a simple example:
Could you modify the example above, or arrange a simple example we can run as-is, so we can reproduce the problem here?
Thanks in advance.
I'm trying to reproduce the problem in a simple example project without success.
This is the closest I can get to your screenshot with a simple example:
Code: Select all
uses Chart, DBChart, Series, Engine, FireDAC.Comp.Client;
var Chart1: TDBChart;
var MemTable1: TFDMemTable;
procedure TForm1.FormCreate(Sender: TObject);
var val: double;
i: Integer;
begin
MemTable1:=TFDMemTable.Create(Self);
with MemTable1 do
begin
Name:='MemTable1';
FieldDefs.Add('Price', ftCurrency);
with FieldDefs.AddFieldDef do
begin
Name:='Name';
DataType:=ftString;
DisplayName:='Name';
end;
CreateDataSet;
Open;
val:=1000+Random(500);
for i:=1 to 5 do
begin
AppendRecord([val, 'val'+IntToStr(i)]);
val:=val+Round(Random(10)-4.5);
end;
end;
Chart1:=TDBChart.Create(Self);
with Chart1 do
begin
Parent:=Self;
Align:=TAlignLayout.Client;
Color:=TAlphaColors.White;
Gradient.Visible:=False;
Walls.Back.Color:=TAlphaColors.White;
Walls.Back.Gradient.Visible:=False;
View3D:=False;
Legend.TextStyle:=ltsRightPercent;
with AddSeries(TPieSeries) do
begin
Marks.Style:=smsValue;
DataSource:=MemTable1;
YValues.ValueSource:='Price';
XLabelsSource:='Name';
end;
end;
end;
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: reporting two tdbchart bugs
HI
First of all, I'll tell you that I didn't write code but I directly used the tbchart/dataset configuration
I will make sure to give you as many details as possible by writing you step by step what to do
I hope to find some time between today and tomorrow, sorry if I can't immediately
sorry for my English
First of all, I'll tell you that I didn't write code but I directly used the tbchart/dataset configuration
I will make sure to give you as many details as possible by writing you step by step what to do
I hope to find some time between today and tomorrow, sorry if I can't immediately
sorry for my English
Re: reporting two tdbchart bugs
HI
I tried to reproduce the error as best as possible, I will send you the structure and data of the table in csv format
and 2 screenshots explaining how to reproduce the problem.
I didn't write code but just used DBCHART objects and a clientdataset
I remain available to help you
Raffaele
Delphi 12.1
TeeChartVCLFMXStandard-2024.40
I tried to reproduce the error as best as possible, I will send you the structure and data of the table in csv format
and 2 screenshots explaining how to reproduce the problem.
I didn't write code but just used DBCHART objects and a clientdataset
I remain available to help you
Raffaele
Delphi 12.1
TeeChartVCLFMXStandard-2024.40
Code: Select all
/********* TABLE INTERBASE 2020 UPDATE 5*******/
CREATE TABLE TR_MGRUPPO
(
PK_PROGRESSIVO INTEGER DEFAULT 0 NOT NULL,
FK_MG INTEGER DEFAULT 0 NOT NULL,
TOT_ORE DOUBLE PRECISION DEFAULT 0 NOT NULL,
TOT_COSTO DOUBLE PRECISION DEFAULT 0 NOT NULL,
TOT_ORE_ISTITUZIONALI DOUBLE PRECISION DEFAULT 0 NOT NULL,
PRIMARY KEY (PK_PROGRESSIVO)
);
/***** DATA FOR TABLE *****/
PK_PROGRESSIVO;FK_MG;TOT_ORE;TOT_COSTO;TOT_ORE_ISTITUZIONALI
251;1;7540;240008,73;103445,4
252;2;642;29766;2111,22
253;3;0;0;0
254;4;536;40200;2306,26
255;5;1937;145275;12641,48
256;6;91;3353;4565,23
257;7;963;66112,12;3308,36
258;8;314;23550;1552,57
259;9;1321,3;49284,49;14719,08
260;10;1390;52870,9;4062,34
- Attachments
-
- DELPHI 12.1 form FMX
- currency error.png (133.77 KiB) Viewed 559 times
-
- DELPHI 12.1 form FMX
- currency work fine.png (125.17 KiB) Viewed 559 times
Re: reporting two tdbchart bugs
to supplement my report ": reporting two tdbchart bugs" (no response from you about this)
I attach a screenshot of a persistent and annoying label overlap when using the comboboxes for setting a dataset
Ciao
Raffaele Barone
I attach a screenshot of a persistent and annoying label overlap when using the comboboxes for setting a dataset
Ciao
Raffaele Barone
- Attachments
-
- overlap label
- overlap.png (153.65 KiB) Viewed 475 times
Re: reporting two tdbchart bugs
Hello Raffaele,
I've done a simple example in code using your dataset:
And this is how it looks for me here:
Could you please give it a try?
I've done a simple example in code using your dataset:
Code: Select all
uses Editor.Chart, Editor.DBChart, Chart, DBChart, Series, Engine, FireDAC.Comp.Client, Data.DB;
var PieChart, BarChart: TDBChart;
var MemTable1: TFDMemTable;
procedure TForm1.EditPieButtonClick(Sender: TObject);
begin
TChartEditForm.Edit(Self, PieChart);
end;
procedure TForm1.EditBarButtonClick(Sender: TObject);
begin
TChartEditForm.Edit(Self, BarChart);
end;
procedure TForm1.FormCreate(Sender: TObject);
var val: double;
i: Integer;
begin
MemTable1:=TFDMemTable.Create(Self);
with MemTable1 do
begin
Name:='TR_MGRUPPO';
FieldDefs.Add('PK_PROGRESSIVO', ftInteger);
FieldDefs.Add('FK_MG', ftInteger);
FieldDefs.Add('TOT_ORE', ftFloat);
FieldDefs.Add('TOT_COSTO', ftCurrency);
FieldDefs.Add('TOT_ORE_ISTITUZIONALI', ftCurrency);
CreateDataSet;
Open;
AppendRecord([251, 1, 7540, 240008.73, 103445.4]);
AppendRecord([252, 2, 642, 29766, 2111.22]);
AppendRecord([253, 3, 0, 0, 0]);
AppendRecord([254, 4, 536, 40200, 2306.26]);
AppendRecord([255, 5, 1937, 145275, 12641.48]);
AppendRecord([256, 6, 91, 3353, 4565.23]);
AppendRecord([257, 7, 963, 66112.12, 3308.36]);
AppendRecord([258, 8, 314, 23550, 1552.57]);
AppendRecord([259, 9, 1321.3, 49284.49, 14719.08]);
AppendRecord([260, 10, 1390, 52870.9, 4062.34]);
end;
PieChart:=TDBChart.Create(Self);
BarChart:=TDBChart.Create(Self);
with PieChart do
begin
Parent:=Self;
Align:=TAlignLayout.Client;
Color:=TAlphaColors.White;
Gradient.Visible:=False;
Walls.Back.Color:=TAlphaColors.White;
Walls.Back.Gradient.Visible:=False;
Legend.TextStyle:=ltsRightPercent;
Legend.FontSeriesColor:=True;
with AddSeries(TPieSeries) do
begin
Marks.Hide;
DataSource:=MemTable1;
YValues.ValueSource:='TOT_COSTO';
XLabelsSource:='TOT_COSTO';
end;
end;
with BarChart do
begin
Parent:=Self;
Align:=TAlignLayout.Right;
Color:=TAlphaColors.White;
Gradient.Visible:=False;
Walls.Back.Color:=TAlphaColors.White;
Walls.Back.Gradient.Visible:=False;
Width:=Form1.Width div 2;
Legend.TextStyle:=ltsRightPercent;
Legend.FontSeriesColor:=True;
with AddSeries(TBarSeries) do
begin
Marks.Hide;
DataSource:=MemTable1;
YValues.ValueSource:='TOT_COSTO';
XLabelsSource:='TOT_COSTO';
ColorEachPoint:=True;
end;
end;
end;
Could you please give it a try?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: reporting two tdbchart bugs
Hello,
Regarding the problem in the Dataset Editor, where some
Regarding the problem in the Dataset Editor, where some
TLabel
s overlap some TComboEdit
s, I've added it to the public tracker: #2700 and I've already fixed it for the next maintenance release.Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |