Page 1 of 1

Chart does not show changes

Posted: Fri May 17, 2013 11:26 am
by 15663355
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.]

Re: Chart does not show changes

Posted: Fri May 17, 2013 11:43 am
by narcis
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.

Re: Chart does not show changes

Posted: Fri May 17, 2013 11:58 am
by 15663355
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 ,

Re: Chart does not show changes

Posted: Fri May 17, 2013 12:08 pm
by narcis
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.