Page 1 of 1

Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Wed Jan 13, 2016 7:23 am
by 16665955
XY Graph control developed by Teechart 2013 ocx orTeechart 2015 ocx,
If all data values in range less than +/-1e-12, graph in auto-scale, the Axis labels can't be displayed. The attached report has been shown the issue.

For semiconductor industry, the +/-1e-13 or even less values is kind of noise, leakage data, it's very common.
Our clients are facing label display issue to view their data trend, and it's very critical functionality.
Because of this bug. Our clients rejects acceptance, we have problem to get payment from clients. Please kindly help & support this bug fix.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Wed Jan 13, 2016 8:51 am
by 16665955
uploaded file: Eng_Sweep_AlgoLeakTest_151218_112931.xls for axis labels displaying expectation.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Thu Jan 14, 2016 4:04 pm
by yeray
Hello,

You could try using custom labels. Ie:

Code: Select all

  With TChart1.Axis.Left
    .Labels.Clear
    tmp = .Maximum
    If .Increment <> 0 Then
      diff = .Increment
    Else
      diff = (.Maximum - .Minimum) / 10
    End If
    
    While (tmp > Minimum)
      .Labels.Add tmp, Format$(tmp, TChart1.Axis.Left.Labels.ValueFormat)
      tmp = tmp - diff
    Wend
  End With

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Thu Jan 21, 2016 4:21 am
by 16665955
Yeray, Thank you for quick response,
We followed your instruction to use custom label.
We got labels we want successfully in TeeChart 2013 OCX version, apply the same methodology in TeeChart 2015 OCX, custom labels can be displayed but all of them went to 1 lines, overlapped to each. Would you please advice us solution for it.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Thu Jan 21, 2016 9:36 am
by yeray
Hello,

I'm trying to reproduce the problem with the project below and TeeChart v2015.0.0.3 and it seems to work fine
CustomLabel_Data.zip
(2.83 KiB) Downloaded 1054 times
Could you please modify it so we can run it as-is to reproduce the problem here?

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Thu Jan 21, 2016 12:59 pm
by 16665955
Yeray,
We uploaded the sample code: TChartCustomLabel.zip, after unzip the file. Please first read this file: TChartCustomLabel_ReadMe.png.
Thank you.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Fri Jan 22, 2016 9:42 am
by yeray
Hello,

I'm afraid that's a known limitation. See this reply:
http://www.teechart.net/support/viewtop ... 890#p24890

So, in ActiveX you should modify the values in your series to fill in the supported range and then use custom labels to represent the original values instead of the modified.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Fri Jan 22, 2016 11:02 am
by 16673477
Yeray,
We like to say is: use same sample with custom labels code on teechart2013 ocx, labels can be fully displayed successfully, but teechart 2015 ocx cannot fully display. We have no clue about two ocx version return different results. We really hope there is just a setting or one line code add can fix problem on teechart2015.
Please unzip the file: TChartCustomLabel_v2013.zip and first check this file : TChart2015_LabelsOverlayIssue.xls.
Thank you.

Re: Axes label cannot display if all data <+/-1e-12, auto scale

Posted: Fri Jan 22, 2016 3:46 pm
by yeray
Hello,

I've added a test project and screenshots testing your values against different TeeChart versions here:
http://bugs.teechart.net/show_bug.cgi?id=1390

Take a look at this workaround. It's written in delphi but you shouldn't find too much problems on translating it.
It consists of changing the YValues of the series to have values in a more regular range. Then you can use custom labels doing the inverse operation:

Code: Select all

  procedure FixLabels(chart: TChart);
  const t=1E+12;
  var i: Integer;
      tmpValue, tmpDiff: double;
  begin
    with chart do
    begin
      with Series[0] do
        for i:=0 to Count-1 do
          YValue[i]:=YValue[i]*t;

      Draw;

      with Axes.Left do
      begin
        tmpDiff:=(Maximum - Minimum) / 8;
        tmpValue:=Minimum;
        Items.Clear;
        while (tmpValue<=Axes.Left.Maximum) do
        begin
          Items.Add(tmpValue, FormatFloat(AxisValuesFormat, tmpValue/t));
          tmpValue:=tmpValue+tmpDiff;
        end;
      end;
    end;
  end;