1

I have recently updated RAD Studio Delphi to 10.4 Sydney from 10.3. And I had to upgrade Teechart as well.

With 10.3 version I obtained a bar chart like this (a correct one):

enter image description here

With 10.4, and doing exactly the same code, I obtained this:

enter image description here

I have checked all the properties of both charts, and they are the same in both cases, and the code it is the same.

Form1.Chart1.LeftAxis.Title.Visible := false;
Form1.Chart1.LeftAxis.Automatic := true;
Form1.Chart1.BottomAxis.Visible := false;

form1.Chart1.BottomAxis.Automatic := true; //or false. No difference
//barrasgraf is TBarSeries
Form1.barrasgraf.Marks.Style := TSeriesMarksStyle(4);

//desiguales is the number of bars
for i := 0 to desiguales - 1 do Form1.barrasgraf.Add(cuantas_eti[i], etis_distintas[i]);

// cuantas_eti[] = [50, 50, 50, 0, 0, …]
// etis_distinta[] = [‘”setosa”’, ‘”versicolor”’, ‘”virginica”’,….]

I am going crazy, I cannot find out why the chart is not correct now.

Any suggestion from? Thanks in advance

Francisco
  • 67
  • 2
  • 7
  • 3
    Would be better if you publish a very small program showing exactly the chart you show so that we can examine your issue: without any code, it is difficult to find what is wrong. – fpiette Nov 01 '20 at 10:37
  • As I thought the problem is not in the code, as the code was working before, I did not add code. However, I am editing now to add code. – Francisco Nov 01 '20 at 11:14
  • Francisco, the idea is that you should provide COMPLETE code to people answering questions like me so that those person can quickly take your code, compile it and find what is not working. Here in your case, you should create a very simple code, the most simple possible, which reproduce the issue. Then post the .pas and .dfm (or .fmx) here, or provide a link to download the full project. Doing this way you have better chances that someone - maybe me - will download and test your project. The fundamental problem cause is likely a change in the component or a bug in the version you installed. – fpiette Nov 01 '20 at 13:50
  • @fpiette Please do not suggest to provide a link to some external site for downloading. The questions must be self contained and complete here in the question post, to prevent situations of future non-functioning external links. – Tom Brunberg Nov 01 '20 at 15:13
  • @TomBrunberg OK, but then, how a user is able to post a complete project? AFAIK it is not possible to add a zip file to a question. – fpiette Nov 01 '20 at 16:37
  • @fpiette There's really no need for a zip file. The .dpr and .pas file in one code block and the .dfm (or .fmx) as text in another one. – Tom Brunberg Nov 01 '20 at 16:43
  • Dear colleagues, I think the code that I have just posted is enough to see if something is wrong. The same code with a previous version of Teechart and Embarcadero IDE was doing a perfect chart, and now it is not working properly. Something is different and I cannot find out where it is the difference. The TBarSeries has the same properties and the code it is the same. – Francisco Nov 01 '20 at 16:47
  • You are right, it is enough to see if something is wrong. But you already saw that. So what do you want? You want suggestion? Then read my two first comments. I won't do anything more without a simple reproducible sample application. Maybe others... – fpiette Nov 01 '20 at 16:57
  • I would start with comparing the `.dfm` files of the two projects. But then, OTOH, the code you have shown might be different too, as well as related code you haven't shown. – Tom Brunberg Nov 01 '20 at 17:36
  • maybe I can concentrate of centring the bars. – Francisco Nov 01 '20 at 17:56
  • Just adding that it seems that this new version of Teechart has some bugs. Another bug is that leftaxis title is not visible, in Android or iOS. Visible in Windows. – Francisco Nov 08 '20 at 17:39

0 Answers0