Axis value repeat

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Elite
Newbie
Newbie
Posts: 11
Joined: Tue Dec 03, 2019 12:00 am

Axis value repeat

Post by Elite » Thu Jun 18, 2020 6:25 am

The line is composed of continuous points. When I zoom the chart, duplicate numbers appear on the axis. How should I avoid this situation.

The normal chart is shown in 2.png, and the zoomed chart is shown in 3.png. The figure below shows some of the data.
Attachments
2.PNG
2.PNG (7.69 KiB) Viewed 14146 times
3.png
3.png (26.42 KiB) Viewed 14146 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Axis value repeat

Post by Christopher » Thu Jun 18, 2020 10:20 am

Elite wrote:
Thu Jun 18, 2020 6:25 am
The line is composed of continuous points. When I zoom the chart, duplicate numbers appear on the axis. How should I avoid this situation.
You can set the ValueFormat of series points and axis label values to any of the Standard or Custom numeric format strings, e.g.

Code: Select all

        private void InitializeChart()
        {
            _tChart.Aspect.View3D = false;
            var fastLine = new FastLine(_tChart.Chart);

            fastLine.Add(1.96583, 0.2855);
            fastLine.Add(1.96667, 0.2825);
            fastLine.Add(1.9675, 0.2795);
            fastLine.Add(1.96833, 0.27683);
            fastLine.Add(1.96917, 0.2745);

            _tChart.Axes.Bottom.Labels.ValueFormat = "N5";
        }
TeeChartPro_2020-06-18_12-23-17.png
TeeChartPro_2020-06-18_12-23-17.png (17.1 KiB) Viewed 14141 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Elite
Newbie
Newbie
Posts: 11
Joined: Tue Dec 03, 2019 12:00 am

Re: Axis value repeat

Post by Elite » Fri Jun 19, 2020 1:59 am

Thanks for your suggestions, the problem was successfully solved.

Post Reply