Bug in Axis.CalcPosPoint (log scales)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Fri Jul 09, 2010 6:18 am

Hi Narcis,
Is this similar to what you are looking for? What do you miss here? Can you try implementing it in the code snippet below?
It seems the same problem as I had initially with the XML file: In the text files the decimal separator is "." (dot), column separator is TAB. So the values are not correct. I tried the code snippet but - with the old assembly - no points were displayed. So I decided to immediately download the new assembly from the link you sent me.

Then I did:
- rename old dll
- copied new dll to Steema folder
- removed TeeChart from formular
- deleted "Verweis" (reference) to old dll in solution explorer
- removed old dll from from debug folder
- dropped new TeeChart onto formular
- tried to start application, error message:
LC.exe was finished with error code one
(freely translated)
(not sure that this was the correct sequence)

I continued with:
- creating empty project
- dropping TChart onto formular
- tried to start app with same error message

I continued with:
- removed TeeChart from formular as well as reference and dll from release folder
- removing all TeeChart components from Toolbox
- loaded the new TeeChart.dll in Toolbox
- dropped TChart onto form
- tried to start with same error message

I continued with:
- Closed VS .net
- Reopened VS IDE
- Created new project
- dropped TChart onto form
- tried to start with same error message

What is wrong / how to preceed?

Did you check the influence of data points with x=0 onto charts with logarithmic x axis?


Best regards,

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Fri Jul 09, 2010 8:13 am

Hi Uli,
It seems the same problem as I had initially with the XML file: In the text files the decimal separator is "." (dot), column separator is TAB. So the values are not correct. I tried the code snippet but - with the old assembly - no points were displayed. So I decided to immediately download the new assembly from the link you sent me.
That's the format in which you sent the files. Do you think data is correct in the image I attached?
What is wrong / how to preceed?
This is most likely a problem with licenses.licx in your project as described here:

http://blog.mse-it.de/2009/08/lcexe-exi ... o-fix.html

I'd try removing build number from licenses.licx and leaving it with just component name as described in tutorial 17. If you remove licenses.licx from the project it shouldn't build as TeeChart.dll needs licenses.licx built as an embedded resource. If this doesn't help don't hesitate to let us know.
Did you check the influence of data points with x=0 onto charts with logarithmic x axis?
Your data files have points with X=0 and they are plotted correctly in the image I attached, aren't they? Also, using a simpler example (see code snippet below) also plots logarithmic charts with points with X=0 correctly as can be seen here:
LogX0.png
LogX0.png (10.44 KiB) Viewed 20635 times

Code: Select all

            tChart1.Aspect.View3D = false;
            tChart1.Axes.Bottom.Logarithmic = true;
            tChart1.Axes.Left.Logarithmic = true;

            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.Pointer.Visible = true;

            line1.Add(0, 100);
            line1.Add(10, 10);
            line1.Add(150, 54);
            line1.Add(160, 70);;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Fri Jul 09, 2010 9:03 am

Hi Narcis,
That's the format in which you sent the files. Do you think data is correct in the image I attached?
there was no image attached but the image should look like in image2.jpg (my message 07 Jul 2010 15:33, created with my old application). These are same data.
Your data files have points with X=0 and they are plotted correctly in the image I attached, aren't they? Also, using a simpler example (see code snippet below) also plots logarithmic charts with points with X=0 correctly as can be seen here:
Possibly, this is since you already use a newer assembly? With the official last release and the simple example from the earlier message it was significant on my machine.

OK, I now will try to continue with the licx-problem.

Regards,

Uli

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Fri Jul 09, 2010 9:33 am

Hi Narcis,

sorry, that I don't understand:
This is most likely a problem with licenses.licx in your project as described here:

http://blog.mse-it.de/2009/08/lcexe-exi ... o-fix.html
I understood, that I can recompile my project by following the steps explained there, but without TeeChart. So it obviously does not help.
I'd try removing build number from licenses.licx and leaving it with just component name as described in tutorial 17.
I removed the string ", Version=4.0.2010.28710, Culture=neutral, PublicKeyToken=9c8126276c77bdb7" but it still does not compile.

I tried to copy the *.licx file from another project with older assembly: it does not work.

Please note: This is a sample application, which started from an empty form and dropping the TChart onto the form after adding the new assembly to toolbox.

What to do?

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Fri Jul 09, 2010 10:08 am

Hi Uli,
there was no image attached but the image should look like in image2.jpg (my message 07 Jul 2010 15:33, created with my old application). These are same data.
Ok, then adding DecimalSeparator to be '.' in the code loads data correclty:

Code: Select all

          ts.DecimalSeparator = '.';
Also, something wrong with X values being zero occurs in this chart. Bottom axis minimum setting is necessary to get something similar to you original chart:

Code: Select all

      tChart1.Axes.Bottom.AutomaticMinimum = false;
      tChart1.Axes.Bottom.Minimum = 1e-5;
Which produces this:
LogBottomMin.png
LogBottomMin.png (21.59 KiB) Viewed 20620 times
I'm afraid this is a problem with low log axis increments, which can be narrowed to this:

Code: Select all

            tChart1.Aspect.View3D = false;
            tChart1.Axes.Bottom.Logarithmic = true;
            tChart1.Axes.Left.Logarithmic = true;

            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.Pointer.Visible = true;

            line1.Add(0, 100);
            line1.Add(0.000001, 10);
            line1.Add(0.0001, 54);
            line1.Add(0.01, 70);

            //Workaround
            //tChart1.Axes.Bottom.AutomaticMinimum = false;
            //tChart1.Axes.Bottom.Minimum = 1e-10;
I'll add this to the bug list (TF02015020) to be enhanced.
Possibly, this is since you already use a newer assembly? With the official last release and the simple example from the earlier message it was significant on my machine.
No, I think it's due to to TF02015020.
What to do?
No, you shouldn't remove TeeChart reference. What happens if you remove licenses.licx from the project?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Fri Jul 09, 2010 11:08 am

Hi Narcis,

I did only remove the *.licx after deleting the TChart (when trying to add a new TChart). I tried it now: Form with TChart closed automatically. When opening the form again the licenses.licx has been recreated. But still no compile.

What to do else?

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Fri Jul 09, 2010 11:11 am

Hi Uli,

Do you still get the very same error message or do you get a different error? Most likely your problems are similar to what's described here.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Fri Jul 09, 2010 11:49 am

Hi Narcis,

it's always the same error message (lc.exe terminated with error code -1). That was with the test application.

When I try to start my application under work with the new TeeChart.dll I get the warning:
"Warnung 2 Konflikte zwischen verschiedenen Versionen der gleichen abhängigen Assembly wurden gefunden. UVVisTools"
"Conflicts between different versions of same dependent assembly"

ant then the same compile error:
Fehler 1 "LC.exe" wurde mit dem Code -1 beendet. UVVisTools

Additionally: When I then rename the new assembly from TeeChart.dll to newTeechart.dll and rename back the old assembly oldTeeChart.dll to Teechart.dll I can work with the old one as before. Possibly there might be something wrong with the new dll.

Regards

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Fri Jul 09, 2010 3:15 pm

Hi Uli,

Can you please check that you removed other TeeChart.dll and recompile your project without any other TeeChart.dll on your machine? Have you cleared up TeeChart's AssemblyFolders as described here? Can you please check that is no project in your solution referencing another TeeChart.dll version? Also, are you using TeeChart.Languag.dll or any other TeeChart dependant dll?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Sat Jul 10, 2010 4:28 pm

Hi Narcis,

I just checked it: On my private machine the new assembly works! I think the difference to my office machine is: I have a setup project for my application under work, and the application is installed. On monday I will deinstall it and check again...

And yes, I had to remove the reference to Teechart.Language.dll. But this is not a problem for me.

I understood that [TF02015020] is due to the wrong axis labels (LogBottomMin.png). BTW, this problem can temporary be reduced by chosing "", "g" as label format.
But I think that auto scaling should work with logarithmic scales and series having datavalues <= 0 should work, too. So if this is not covered by [TF02015020} I would suggest to make a new entry in your bug list.

And now the good news: Logarithmic axes seem to work with the new assembly, switching between lin/log scale is possible! Calculation of axis values within the mouse move event is correct.

I just started to think that working with TCharts becomes possible as I discovered a new bug, more or less accidently, so here are the bad news:
The next image displays the data of test_1.txt:
test3.jpg
test3.jpg (36.4 KiB) Viewed 20600 times
Here are the point data:
0 1195990
3.486E-5 1088321.18811881
6.937E-5 935244.059405941
0.0001374 681926.287128713
0.0002696 312229.455445545
0.0004279 125870.792079208
0.0006663 54966.1881188119
0.001289 28498.1435643564
0.003094 18828.7871287129
0.00696 16525.3712871287
0.0135 15589.3811881188
0.02082 16215.5693069307
If you compare these data with the chart then it's obvious that the point with x=0 is drawn at x=axes.bottom.minimum! That's crazy!
And I think its also true for your LogBottomMin.png. It's hard to see since there is a logarithmic y axis but at x=1e-5 should be no point. Please could you provide a fix asap since I urgently need to work with my application!

Another thing what I'm wondering about: With axes label format "00e-0" (applied from chart editor) I get axes labels which are wrong for a factor of 10: For instance, instead of "1e-5" the label is displayed as "10e-6". Possibly, this might be intentionally since 10*1e-6=1e-5 but here I do not know anyone thinking so. End user might be confused. So the question is: Is there a possibility to edit the list of default label strings?

Best regards

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Mon Jul 12, 2010 8:07 am

Hi Uli,
I just checked it: On my private machine the new assembly works! I think the difference to my office machine is: I have a setup project for my application under work, and the application is installed. On monday I will deinstall it and check again...
Ok, that's good news. Please let us know if you need further assistance on this.
I understood that [TF02015020] is due to the wrong axis labels (LogBottomMin.png). BTW, this problem can temporary be reduced by chosing "", "g" as label format.
But I think that auto scaling should work with logarithmic scales and series having datavalues <= 0 should work, too. So if this is not covered by [TF02015020} I would suggest to make a new entry in your bug list.
No, logarithm doesn't support negative values:

http://en.wikipedia.org/wiki/Logarithm# ... lex_number

Complex logarithm scaling is not supported in TeeChart.

Having said that, the only solution I can think of is that you use 2 axes, one for the positive part and another one for the negative part. I recommend you to read tutorial 4 for further axis setting information. You could use an inverted logarithmic axis for the negative part, adding log labels to each point when populating them and add the "-" symbol using the GetAxisLabel event or already adding it with the points labels.
If you compare these data with the chart then it's obvious that the point with x=0 is drawn at x=axes.bottom.minimum! That's crazy!
And I think its also true for your LogBottomMin.png. It's hard to see since there is a logarithmic y axis but at x=1e-5 should be no point. Please could you provide a fix asap since I urgently need to work with my application!
I may not be getting your point here. However, using this code:

Code: Select all

      tChart1.Aspect.View3D = false;
      tChart1.Axes.Bottom.Logarithmic = true;
      //tChart1.Axes.Left.Logarithmic = true;

      tChart1.Axes.Bottom.AutomaticMinimum = false;
      tChart1.Axes.Bottom.Minimum = 0.000000001;

      Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
      line1.Pointer.Visible = true;

      line1.Add(0, 1195990);
      line1.Add(3.486E-5, 1088321.18811881);
      line1.Add(6.937E-5, 935244.059405941);
      line1.Add(0.0001374, 681926.287128713);
      line1.Add(0.0002696, 312229.455445545);
      line1.Add(0.0004279, 125870.792079208);
      line1.Add(0.0006663, 54966.1881188119);
      line1.Add(0.001289, 28498.1435643564);
      line1.Add(0.003094, 18828.7871287129);
      line1.Add(0.00696, 16525.3712871287);
      line1.Add(0.0135, 15589.3811881188);
      line1.Add(0.02082, 16215.5693069307);
I get this chart:
PointAt0.png
PointAt0.png (25.46 KiB) Viewed 20592 times
I don't see anything wrong with it (besides TF02015020). I think it's correct plotting a point at X=0 since one of the data points in the series is added like this:

Code: Select all

      line1.Add(0, 1195990);
Is that what you mean? if not, could you please give us more details about the issue?
Another thing what I'm wondering about: With axes label format "00e-0" (applied from chart editor) I get axes labels which are wrong for a factor of 10: For instance, instead of "1e-5" the label is displayed as "10e-6". Possibly, this might be intentionally since 10*1e-6=1e-5 but here I do not know anyone thinking so. End user might be confused. So the question is: Is there a possibility to edit the list of default label strings?
Yes, you can use GetAxisLabel event for that, for example:

Code: Select all

    void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
    {
      if (sender.Equals(tChart1.Axes.Bottom))
      {
        double tmp = Convert.ToDouble(e.LabelText);
        tmp *= 10;
        e.LabelText = tmp.ToString();
      }
    }
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Mon Jul 12, 2010 8:59 am

Hi Narcis,
I just checked it: On my private machine the new assembly works! I think the difference to my office machine is: I have a setup project for my application under work, and the application is installed. On monday I will deinstall it and check again...
Ok, that's good news. Please let us know if you need further assistance on this.
De-installation allone did not work. New empty projects with TChart led to same error messages. Your link concerning assembly folders led also not to solution (in Win 7 the reg keys are a little bit different, I searched manually and did not find anything suspicious.) Then I copied the project from my private machine to that of the office: No it works. Mysterious!
No, logarithm doesn't support negative values:

http://en.wikipedia.org/wiki/Logarithm# ... lex_number

Complex logarithm scaling is not supported in TeeChart.

Having said that, the only solution I can think of is that you use 2 axes, one for the positive part and another one for the negative part. I recommend you to read tutorial 4 for further axis setting information. You could use an inverted logarithmic axis for the negative part, adding log labels to each point when populating them and add the "-" symbol using the GetAxisLabel event or already adding it with the points labels.
Of course, no question. But I must be able to display series (not points) containing data with x<=0 on a logarithmic x axis. In this case, of course, points with with x<=0 must not be displayed. So I will have displayed only the points with x>0. For these points with x>0 autoscaling should work (That's the way my own old Delphi chart component works). So I need nothing to display points with x<0.
PointAt0.png (25.46 KiB) Viewed 3 times

I don't see anything wrong with it (besides TF02015020). I think it's correct plotting a point at X=0 since one of the data points in the series is added like this:

Code: Select all
line1.Add(0, 1195990);
No, that's not correct: X axis minimum is not 0. See your own citation above: log(0) is not defined. But the point with x=0 is drawn at
x = tChart1.Axes.Bottom.Minimum (= 0.000000001)
This must not be! Points with x<= 0 can not be displayed with a logarithmic x axis!
Yes, you can use GetAxisLabel event for that, for example:
void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender.Equals(tChart1.Axes.Bottom))
{
double tmp = Convert.ToDouble(e.LabelText);
tmp *= 10;
e.LabelText = tmp.ToString();
}
}
No, that's not enough: at design time I do not know what format string is applied by the end user at run time. And even checking the actual label string in tChart1_GetAxisLabel would not help: Inspired by the preset "00e-0" the end user could change it to "000e-0" or "#00e-0" or something else. One can not check for all possible combinations, I think.

Do you think that
"10e-6"
is a correct interpretaion of the number 0.00001 (1e-5)? I don't.
If you think so since there are some regions in the world (or professions) where it is usual then I must live with this. But in this case it would help to remove this format string from the presets in the chart editor.

Best regards

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Mon Jul 12, 2010 9:30 am

Hi Uli,
De-installation allone did not work. New empty projects with TChart led to same error messages. Your link concerning assembly folders led also not to solution (in Win 7 the reg keys are a little bit different, I searched manually and did not find anything suspicious.) Then I copied the project from my private machine to that of the office: No it works. Mysterious!
In that case it seems to be some differences in the projects between the two machines. You could try comparing which are the differences between them in terms of TeeChart assembly and license references.
Of course, no question. But I must be able to display series (not points) containing data with x<=0 on a logarithmic x axis. In this case, of course, points with with x<=0 must not be displayed. So I will have displayed only the points with x>0. For these points with x>0 autoscaling should work (That's the way my own old Delphi chart component works). So I need nothing to display points with x<0
Ok, I think TF02015020 already covers that.
No, that's not correct: X axis minimum is not 0. See your own citation above: log(0) is not defined. But the point with x=0 is drawn at
x = tChart1.Axes.Bottom.Minimum (= 0.000000001)
This must not be! Points with x<= 0 can not be displayed with a logarithmic x axis!
Thanks for the info. I understood it now and added the issue to the defect list (TF02015021) to be investigated. In the meantime, a workaround is using the GetPointerStyle event like this:

Code: Select all

    void line1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.GetPointerStyleEventArgs e)
    {
      if (series.XValues[e.ValueIndex] == 0.0)
      {
        e.Style = Steema.TeeChart.Styles.PointerStyles.Nothing;
      }
      else
	    {
        e.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
	    }
    }
Or setting points where X=0 to be null:

Code: Select all

      for (int i = 0; i < line1.Count; i++)
      {
        if (line1.XValues[i] == 0.0)
        {
          line1.SetNull(i);
        }
      }
No, that's not enough: at design time I do not know what format string is applied by the end user at run time. And even checking the actual label string in tChart1_GetAxisLabel would not help: Inspired by the preset "00e-0" the end user could change it to "000e-0" or "#00e-0" or something else. One can not check for all possible combinations, I think.

Do you think that
"10e-6"
is a correct interpretaion of the number 0.00001 (1e-5)? I don't.
If you think so since there are some regions in the world (or professions) where it is usual then I must live with this. But in this case it would help to remove this format string from the presets in the chart editor.
According to MSDN's Custom Numeric Format Strings entry, to get what you request you sould use this ValueFormat set to "0e-0" as in this example:

Code: Select all

            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

            line1.Pointer.Visible = true;
            line1.Add(1e-5);
            line1.Add(1e-6);
            line1.Add(1e-7);
            line1.Add(1e-8);

            tChart1.Axes.Left.Labels.ValueFormat = "0e-0";
Which produces this chart:
ExpLabels.png
ExpLabels.png (13.67 KiB) Viewed 20586 times
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Uli » Mon Jul 12, 2010 11:55 am

Hi Narcis,
In that case it seems to be some differences in the projects between the two machines. You could try comparing which are the differences between them in terms of TeeChart assembly and license references.
I don't believe that: On friday I copied the whole project folder from the office to my private machine and today in opposite direction. So it should be always the same project. Is there another place where project information are stored? Additionally: Today I started with an empty project and the same error message occured. Naively spoken, I assume that afterwards importing the project from my private machine to that in the office stimulated VS IDE or Windows 7 to change something. But what?
Thanks for the info. I understood it now and added the issue to the defect list (TF02015021) to be investigated. In the meantime, a workaround is using the GetPointerStyle event like this:
As I understand that: To each series (I work mostly with line, point and fastline) I have to add a handler. Within my application the different kinds of series were created in a lot of different classes (around 20, I think), if required they were copied or converted to another style and so on. Besides the huge amount of work, I expect the possibility to introduce new bugs by myself, performance problems (some series may have 100000 or more points and I have to check it for each pointer, during re-conversion in the else part of the first example I have to determine which pointer is used). And I have already perfomance problems: The implementation of the workaround for bug [TF02014992] requires to paint the chart two times before getting the required apperance (Until now I have not found a better way...). And after STEEMA will have fixed this I have to convert the code back again with the same huge amount of time and bug possibilities...

So I ask you to provide a new assembly with this bug fixed as soon as possible: With this chart behavior I can not start real world use!
According to MSDN's Custom Numeric Format Strings entry, to get what you request you sould use this ValueFormat set to "0e-0" as in this example:
Yes, I understand what you mean. But my concerns are the editing possibilities of the end user by means of the chart editor at run time: the end user is not a programmer and therefore not familiar with MS numeric format specification. I showed the axis labeling with "00e-0" three colleagues: they assumed "10e-6" as 1e-6 (they assumed it to be comparable to 10^-6). What I mean is: I do not like to present an ambigeous label format to the end user. And therefore I'm looking for the possibility to edit the list of default label strings. BTW, it would be a good idea to present format strings in the chart editor in dependence on the axis min/max values.

Best regards

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Bug in Axis.CalcPosPoint (log scales)

Post by Narcís » Mon Jul 12, 2010 1:47 pm

Hi Uli,
I don't believe that: On friday I copied the whole project folder from the office to my private machine and today in opposite direction. So it should be always the same project. Is there another place where project information are stored? Additionally: Today I started with an empty project and the same error message occured. Naively spoken, I assume that afterwards importing the project from my private machine to that in the office stimulated VS IDE or Windows 7 to change something. But what?
Different AssemblyFolders settings or design-time license correctly installed could make a difference between machines even not modifying the project. I strongly recommend you to check what is listed here again.
As I understand that: To each series (I work mostly with line, point and fastline) I have to add a handler. Within my application the different kinds of series were created in a lot of different classes (around 20, I think), if required they were copied or converted to another style and so on. Besides the huge amount of work, I expect the possibility to introduce new bugs by myself, performance problems (some series may have 100000 or more points and I have to check it for each pointer, during re-conversion in the else part of the first example I have to determine which pointer is used). And I have already perfomance problems: The implementation of the workaround for bug [TF02014992] requires to paint the chart two times before getting the required apperance (Until now I have not found a better way...). And after STEEMA will have fixed this I have to convert the code back again with the same huge amount of time and bug possibilities...

So I ask you to provide a new assembly with this bug fixed as soon as possible: With this chart behavior I can not start real world use!
In that case, settings points to be null it would be a much easier workaround for you to implement. For performance reasons it would be more efficient setting X=0 points to null when adding them to the series, for example:

Code: Select all

      line1.Add(0, 1195990, Color.Transparent);
I'll post an update here when we have news about TF02015021.
Yes, I understand what you mean. But my concerns are the editing possibilities of the end user by means of the chart editor at run time: the end user is not a programmer and therefore not familiar with MS numeric format specification. I showed the axis labeling with "00e-0" three colleagues: they assumed "10e-6" as 1e-6 (they assumed it to be comparable to 10^-6). What I mean is: I do not like to present an ambigeous label format to the end user. And therefore I'm looking for the possibility to edit the list of default label strings. BTW, it would be a good idea to present format strings in the chart editor in dependence on the axis min/max values.
The string format of a double is independent of a double's value, that is, any value of a double can be displayed in any string format as explained here:

http://msdn.microsoft.com/en-us/library/kfsatb94.aspx

Having that in mind, how do you think such a feature should work? Adding a custom numeric format dialog for axis labels, as in the VCL version (see image below), would do the job?
CustomFormatEditor.jpg
This is the VCL editor.
CustomFormatEditor.jpg (30.73 KiB) Viewed 20576 times
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply