We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Regarding chart axis labels

Thread ID:

Created:

Updated:

Platform:

Replies:

76355 Sep 3,2008 06:25 AM Sep 8,2008 12:18 AM Windows Forms 1
loading
Tags: Chart
Administrator [Syncfusion]
Asked On September 3, 2008 06:25 AM

Hi

is it possible that i would label of primary axis moved in opposite direction but not move ticks marks

If i use "Chart.PrimaryXAxis.OpposedPosition = true" then Ticks and labels are both move is nay method in syncfusion 5.2 that only labels(labels means 10,20 ,30,40,50,60) on primary axis moves to opposite direction but tick marks does not move Plz tell me it is very-2 urgent try to reply me with in 24 hours i shall be thank ful for you?See attachedimage

Thanks



Line_c21170d.zip

Manohari [Syncfusion]
Replied On September 8, 2008 12:18 AM

Hi Rajan,

We regret very much for the delayed response. Currently we do not have direct Support to move XAxis labels to opposite Direction. However it is possible to acheive this by drawing Custom Ticks using ChartAreaPaint Event. Please refer to the sample code below.

Sample Code:

this.chartControl1.ChartAreaPaint += new PaintEventHandler(chartControl1_ChartAreaPaint);
}

void chartControl1_ChartAreaPaint(object sender, PaintEventArgs e)
{

float minX = this.chartControl1.ChartArea.RenderBounds.Left;
float maxX = this.chartControl1.ChartArea.RenderBounds.Right;
double interval = this.chartControl1.PrimaryXAxis.VisibleRange.Interval;
double min = this.chartControl1.PrimaryXAxis.VisibleRange.Min;
int intervals = this.chartControl1.PrimaryXAxis.VisibleRange.NumberOfIntervals;

for (int i = 0; i <= intervals; i++)
{
double point = min + (i * interval);
ChartPoint cp = new ChartPoint(point, 0);
float x = (float)this.chartControl1.ChartArea.GetPointByValue(cp).X;
float y = this.chartControl1.ChartArea.RenderBounds.Bottom;
if (x >= minX && x <= maxX)
{
e.Graphics.DrawLine(Pens.Red, new PointF(x, y), new PointF(x, y + this.chartControl1.PrimaryXAxis.TickSize.Height)); // To Draw Ticks
...
I have attached a sample that illustrates the same in this link below.

http://websamples.syncfusion.com/samples/Chart.Windows/F76355/Sample1.htm

Kindly let us know if this meets your requirement. Thanks for your patience.

Regards,
Manohari.R



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;