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

TeeChart for ActiveX, COM and ASP
Post Reply
star it
Newbie
Newbie
Posts: 5
Joined: Thu May 16, 2013 12:00 am

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

Post by star it » Wed Jan 13, 2016 7:23 am

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.
Attachments
AxisLabelDisplayProblem.zip
defect report
(323.53 KiB) Downloaded 1242 times

star it
Newbie
Newbie
Posts: 5
Joined: Thu May 16, 2013 12:00 am

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

Post by star it » Wed Jan 13, 2016 8:51 am

uploaded file: Eng_Sweep_AlgoLeakTest_151218_112931.xls for axis labels displaying expectation.
Attachments
Eng_Sweep_AlgoLeakTest_151218_112931.zip
(13.57 KiB) Downloaded 1261 times

Yeray
Site Admin
Site Admin
Posts: 9611
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Thu Jan 14, 2016 4:04 pm

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

star it
Newbie
Newbie
Posts: 5
Joined: Thu May 16, 2013 12:00 am

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

Post by star it » Thu Jan 21, 2016 4:21 am

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.
Attachments
CustomLabel_Data.zip
(51.24 KiB) Downloaded 1220 times

Yeray
Site Admin
Site Admin
Posts: 9611
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Thu Jan 21, 2016 9:36 am

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 1205 times
Could you please modify it so we can run it as-is to reproduce the problem here?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

star it
Newbie
Newbie
Posts: 5
Joined: Thu May 16, 2013 12:00 am

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

Post by star it » Thu Jan 21, 2016 12:59 pm

Yeray,
We uploaded the sample code: TChartCustomLabel.zip, after unzip the file. Please first read this file: TChartCustomLabel_ReadMe.png.
Thank you.
Attachments
TChartCustomLabel.zip
(453.14 KiB) Downloaded 1227 times

Yeray
Site Admin
Site Admin
Posts: 9611
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Fri Jan 22, 2016 9:42 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

star_it
Newbie
Newbie
Posts: 20
Joined: Fri Apr 10, 2015 12:00 am

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

Post by star_it » Fri Jan 22, 2016 11:02 am

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.
Attachments
TChartCustomLabel_v2013.zip
(391.55 KiB) Downloaded 1194 times

Yeray
Site Admin
Site Admin
Posts: 9611
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Fri Jan 22, 2016 3:46 pm

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply