Page 1 of 1

Marks Show Wrong Values

Posted: Wed Oct 02, 2019 8:29 pm
by 16585021
TChart 2019.27.190530, Delphi 10.3.2

I am having a problem where the marts contain the wrong values. Here is my code:

Code: Select all

  srsValues.Clear;
  srsValues.Add(FCalcs.DistByLifeExpect, 'Divided'#13'by Life'#13'Expectancy', clTeeColor);
  srsValues.Add(FCalcs.DistAmortized, 'Amortized', clTeeColor);
  srsValues.Add(FCalcs.DistAnnuitized, 'Annuitized', clTeeColor);
And here is what the chart looks like (see that the values displayed in the marks are not consistent with where the bars line up on the axis):

Image

So I checked the DFM and I am seeing this:

Code: Select all

  object srsValues: THorizBarSeries
    HoverElement = []
    BarBrush.Gradient.Direction = gdLeftRight
    BarPen.Visible = False
    ConePercent = 100
    Marks.Font.Height = -13
    Marks.Font.Name = 'Calibri'
    Marks.Transparent = True
    Marks.Style = smsValue
    Marks.Items = {
      06000000010C456D626F73732E436F6C6F720706636C477261790B466F6E742E
      48656967687402F309466F6E742E4E616D65060743616D627269610C53686164
      6F772E436F6C6F720706636C477261790A53686170655374796C650711666F73
      ...
I don't know what the Marks.Items are ( didn't try to propagate the data there), but surely this should be cleared when srsValues.Clear is called?

If this is by design, I am concerned about what I am doing wrong.

Thanks,

Ed Dressel

Re: Marks Show Wrong Values

Posted: Mon Oct 07, 2019 2:47 pm
by 16585021
Anyone?

Re: Marks Show Wrong Values

Posted: Tue Oct 08, 2019 11:44 am
by yeray
Hello,

Sorry for the delay.

I believe this was fixed with #2206.

Re: Marks Show Wrong Values

Posted: Tue Oct 08, 2019 2:35 pm
by 16585021
I am not sure if the bug what the version means--the version the bug is in or the version it is fixed in, but I am using version 2019.27.190530 and it is still in that version.

Re: Marks Show Wrong Values

Posted: Thu Oct 10, 2019 8:28 am
by yeray
Hello,
EdDressel wrote:
Tue Oct 08, 2019 2:35 pm
I am not sure if the bug what the version means
That means the version that was used to reproduce the problem.
To know what version includes a fix, check the date when the ticked was set as fixed (in this case 2019-10-02) and check what releases have been published after that date in the release notes. In this case, we haven't still published any release yet including this fix. But stay tuned because we are cooking the next one.

Re: Marks Show Wrong Values

Posted: Wed Oct 16, 2019 3:29 pm
by 16585021
I can't just take your next update and start running with it as it has to be tested.

Can I get the changes to the source code so I can fix it?

Re: Marks Show Wrong Values

Posted: Thu Oct 17, 2019 6:28 am
by yeray
Hello Ed,

The fix is detailed here. I'll copy the code:
unit TeEngine;

Code: Select all

Function TSeriesMarks.Clicked(const P:TPoint):Integer;
//...
      if (result mod tmpEvery)=0 then
      begin
        tmp:=FPositions.Position[result];

        if Assigned(tmp) and (result<FItems.Count) and FItems[result].Visible then // FIX HERE
        begin
          R.TopLeft:=ConvertTo2D(tmp.ArrowTo,tmp.LeftTop);
//...