Page 1 of 1

How to get counts of breaks on each axis?

Posted: Tue Feb 07, 2012 11:22 pm
by 15661292
Hi,

I would like to get the counts of breaks on each axis (bottom, left, and right). I think the following code gives me the total number of breaks, but is there an easy way to find out to which axis each break belongs too?

Dim axisbreak As Steema.TeeChart.Tools.AxisBreaksTool = New Steema.TeeChart.Tools.AxisBreaksTool(tChart.Chart)
Dim NumBreaks as integer
NumBreaks=axisbreak.Breaks.Count



Oliver

Re: How to get counts of breaks on each axis?

Posted: Thu Feb 09, 2012 4:51 pm
by 10050769
Hello Oliver,

The way as you get the number of AxisBreak are you add in your Chart is correct and If I had to suggest you a way to count the number of breaks, I would recommend the code you attached in your post.

Thanks,

Re: How to get counts of breaks on each axis?

Posted: Thu Feb 09, 2012 11:21 pm
by 15661292
Thanks Sandra,

I have overseen the properties axisbreak.Axis=tchart.Axes.Bottom
Onebreak.PNG
Onebreak.PNG (18.49 KiB) Viewed 9820 times
to link the breaks to an axis

However, unfortunately I have other problems with the axis breaks using Teechart pro V2011 (4.1.2012.1032). All problems occur with charts produced with the Teechart assemblies (without DewResearch).

First, adding two breaks in a single axis causes the axis to be drawn through the first gap of the breaks. See attachements.

Onebreak.PNG
Onebreak.PNG (18.49 KiB) Viewed 9820 times
Twobreaks.PNG
Twobreaks.PNG (20.53 KiB) Viewed 9827 times


Secondly, I can not load charts as native format if the chart contains axis breaks. The following exception occur. The code works fine for charts not having any breaks.

LoadingChartwithBreaks.PNG
LoadingChartwithBreaks.PNG (60.42 KiB) Viewed 9825 times

Re: How to get counts of breaks on each axis?

Posted: Fri Feb 10, 2012 4:01 pm
by 10050769
Hello Oli,
First, adding two breaks in a single axis causes the axis to be drawn through the first gap of the breaks.
Next code works fine for me in last version of TeeChartFor.Net 2012:

Code: Select all

       private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            //InitializeChart.
            tChart1.Series.Clear();
            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            
            line1.FillSampleValues(20);
            //AxesBreaks. 
            Steema.TeeChart.Tools.AxisBreaksTool axisbreak = new Steema.TeeChart.Tools.AxisBreaksTool(tChart1.Chart);
            Steema.TeeChart.Tools.AxisBreak axisBreak1 = new Steema.TeeChart.Tools.AxisBreak(axisbreak);
            Steema.TeeChart.Tools.AxisBreak axisBreak2 = new Steema.TeeChart.Tools.AxisBreak(axisbreak);
            axisBreak1.StartValue = 4;
            axisBreak1.EndValue = 6;
            axisBreak2.StartValue = 15;
            axisBreak2.EndValue = 17; 
            axisbreak.Axis = tChart1.Axes.Bottom;
            axisbreak.GapSize = 20;
        }
Can you please try if previous code works as you expect?
Secondly, I can not load charts as native format if the chart contains axis breaks. The following exception occur. The code works fine for charts not having any breaks.
I have added it in wish-list with number [TF02016030] to be consider it inclusion in next maintenance releases of TeeChart.Net.

Thanks,

Re: How to get counts of breaks on each axis?

Posted: Fri Feb 10, 2012 10:23 pm
by 15661292
Hi Sandra,

regarding the axis drawn through the gap, the your code does not resolve the problem, and is equavalent to the code I am using. You said you are using Teechart.Net V2012, but I checked the download page under Client access and the latest version available for download is TeeChartNET2011_4.1.2012.01030. So I am a little confused, and I would appreciate if you can confirm that you have used another version. If that is the case, how to download the latest version Teechart.net V2012?


Thanks for adding the issue with loading charts containing axis breaks on the wish list. But I think it should go on the bug list...it causes an exception, and makes the use of the binary format rather limited if I rely on axis breaks. I need also to use the binary format to save and load chart for later editing. So I would appreciate if this can be handled with a higher priority rather being on the wish list. I would appreciate the efforts.

Oliver

Re: How to get counts of breaks on each axis?

Posted: Tue Feb 14, 2012 4:11 pm
by 10050769
Hi Oli,
regarding the axis drawn through the gap, the your code does not resolve the problem, and is equavalent to the code I am using. You said you are using Teechart.Net V2012, but I checked the download page under Client access and the latest version available for download is TeeChartNET2011_4.1.2012.01030. So I am a little confused, and I would appreciate if you can confirm that you have used another version. If that is the case, how to download the latest version Teechart.net V2012?
Sorry, for the confusion. The last V2012 is build 4.1.2012.01030, therefore, you can use the last version of TeeChart.Net.

Thanks,

Re: How to get counts of breaks on each axis?

Posted: Sun Mar 18, 2012 10:46 am
by 15661292
Hi Sandra,

loading charts with axis breaks from the binary format works now with the latest version Teechart2012 4.1.2012.2282 ...thank you very much.

Oli

Re: How to get counts of breaks on each axis?

Posted: Mon Mar 19, 2012 10:01 am
by 10050769
Hello Oli,

I am glad that your problem have solved in last version of TeeChartFor.Net. :)

Thanks,