Page 1 of 1
Show arrow on multiple custom axis.
Posted: Wed Apr 27, 2016 12:05 pm
by 9526439
Hi steema support,
We are facing an issue regarding show an arrow on multiple custom axis,
- Img
- arrowaxis.png (37.15 KiB) Viewed 6685 times
We want to arrow on top of green custom axis.
Please provide me any solution asap.
Thanks in advance
Re: Show arrow on multiple custom axis.
Posted: Thu Apr 28, 2016 8:10 am
by Christopher
Hello,
You can try code similar to the following:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Line line1 = new Line(tChart1.Chart);
Line line2 = new Line(tChart1.Chart);
tChart1.Panel.MarginLeft = 10;
Axis axis1 = tChart1.Axes.Custom.Add();
line1.CustomVertAxis = axis1;
axis1.PositionUnits = PositionUnits.Pixels;
axis1.RelativePosition = -50;
line1.FillSampleValues();
line2.FillSampleValues();
tChart1.AfterDraw += TChart1_AfterDraw;
}
private void TChart1_AfterDraw(object sender, Graphics3D g)
{
int xPos = tChart1.Axes.Custom[0].Position;
int yPos = tChart1.Axes.Custom[0].IStartPos;
Point from = new Point(xPos, yPos - 40);
Point to = new Point(xPos, yPos - 5);
g.Brush.Color = Color.Green;
g.Arrow(true, from, to, 10, 10, 0);
}