Chart does not show changes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Chart does not show changes

Post by Saumil » Fri May 17, 2013 11:26 am

Hello,

I have made a sample project to show my problem.
this sample project will start plotting random numbers in the fastline once we compile it.
however , the changes won't show up . In the background, numbers are added in fastline and the chart is refreshed but nothing happens in front. The only way to see the changes is, We will have to left click anywhere in the chart and try to zoom .only then chat starts to show real time plotting.

So , after the compilation , you will see a screen with no fastlines.[ In the back there is a fastline],
now, try to zoom the chart by left click[ holding down the left click and move the mouse to the left side, release the click ] , and then fastline shows up. Why do I have to play around with left click in the beginning?

Please let me know what I am doing wrong,

Thank you so much,

[In the project , Please add teechart.dll and teechart.direct2d.dll as reference.]
Attachments
SampleProject.zip
(83.72 KiB) Downloaded 376 times

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

Re: Chart does not show changes

Post by Narcís » Fri May 17, 2013 11:43 am

Hi Saumil,

This is because your chart is being zoomed in the FormCreate method. Therefore the chart is not refreshed until it's unzoomed. Removing the ZoomPercent call solves the problem:

Code: Select all

        public void FormCreate(System.Object Sender, System.EventArgs _e1)
        {
            LastActualSamplePlotted = 0;
            //Chart1.Zoom.ZoomPercent(100);
            Chart1.Aspect.View3D = false;
            Chart1.Walls.View3D = false;           
            Chart1.Panel.Gradient.Visible = false;
            Chart1.Panel.Color = chartconstantunits.ChartBackGroundColor;
            Chart1.Header.Text.Remove(0);
            Chart1.Header.Text = subnode;
            Chart1.Header.Text.Insert(0, "");
            Chart1.Header.AutoSize = true;
            this.Show();
            PlotData();
        }
[In the project , Please add teechart.dll and teechart.direct2d.dll as reference.]
TeeChart.Direct2D.dll was not being used in the project so I removed the reference. This didn't affect the issue being discussed here.
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

Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Re: Chart does not show changes

Post by Saumil » Fri May 17, 2013 11:58 am

Thanks a lot !! :)

about dll, I have graphics3d in original project, so i thought I still had it in sample project.

Anyways , other thing is , in the sample project , I want major ticks on 0 ,10,20,30,40,50,.... so on
and minor ticks on 5,15,25,35. and labels only on major ticks i.e. 0,10,20,30,40..

so between each label there will be a gap of 10 .

How should I do it?

Thanks ,

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

Re: Chart does not show changes

Post by Narcís » Fri May 17, 2013 12:08 pm

Hi Saumil,
Anyways , other thing is , in the sample project , I want major ticks on 0 ,10,20,30,40,50,.... so on
and minor ticks on 5,15,25,35. and labels only on major ticks i.e. 0,10,20,30,40..
You should set Axis.Increment and Axis.MinorTickCount properties. For more axis setting please see tutorial 4. Tutorials can be found at TeeChart's program group.
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