Hello, bairog
1) I don't know what chartController1 is because it is not defined.
So I simply deleted that string from your example.
Is that string useful and for what purpuse?
ChartController element of TeeChart is same that
Commander element of TeeChart, but ChartController element is used in last versions of TeeChartFor .Net ( version 3 and 4). On the other hand, this only used for test the program, so if you want you could remove or if you want to use you must change
ChartController for
Commander.
2) Steema.TeeChart.TChart.Draw method correct prototype is public Void Draw(Graphics g). At least for the latest teeChart V2 build that I'm using.
Also, you can use for draw, Bitmap b = tChart1.Bitmap, for repaint the chart. This method allow do the same with draw. You needs, too, put Bitmap b= tChart1.Bitmap in the next events, because projects works fine:
Code: Select all
tChart1.Zoomed += new EventHandler(tChart1_Zoomed);
tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
tChart1.Scroll += new EventHandler(tChart1_Scroll);
Could you explain me why calling Draw method programmatically is so neccesary? Is it some kind of trick?
Is necessary if you want draw, when you recalculate values internally for example, when you use
AfterDraw event,after you needs draw chart updated, because new values appears correctly.
And why when I deleted that string decpite of calling tChart1_AfterDraw event labels still overlapping?
We must force chart to be painted again, because puts labels correctly in the chart.
Are there other situations or events not described above in which Draw method must be called programmatically?
All the situations, that you needs to recalculate internally values of the chart.
I hop will hepls you.
Thanks,