Page 1 of 1
custom painting on a chart
Posted: Tue May 20, 2008 9:19 am
by 9642362
hi,
i have a rounded graphics object (bitmap) that i want to paint on a line value. is there a tutorial on custom paining on a line\chart?
Posted: Tue May 20, 2008 9:27 am
by narcis
Hi idan,
Yes, please have a look at Tutorial 13 - Custom drawing on the Chart Panel available at TeeChart's program group.
one more question...
Posted: Tue May 20, 2008 9:45 am
by 9642362
I need to paint a bitmap object and on a specific point on a line which the tutorial doesn't reffer to. is there a way to do so?
Posted: Tue May 20, 2008 10:23 am
by narcis
Hi idan,
In that case you could try using something like this:
Code: Select all
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.Draw(xPos, yPos, myImage);
}
what if the values are double?
Posted: Tue May 20, 2008 11:37 am
by 9642362
what if the values are double and not int?
Posted: Tue May 20, 2008 1:47 pm
by narcis
Hi idan,
You should convert them to screen postion coordinates (int) using given methods, for example:
Code: Select all
int xPos = tChart1.Axes.Left.CalcPosValue(1500);
or
Code: Select all
int xPos = tChart1.Series[0].CalcXPos(5);