Rotate Chart Label


Author
Message
Stilianos Roussis
Stilianos Roussis
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 3, Visits: 48
Hello,

I am new to the Nervon Chart.

I am using the code below to rotate a chart label clockwise but the label is only partly shown.

   label1.TextStyle.Orientation = -90  
   label1.Location = New NPointL(70, 10)  
   NChartControl3.Panels.Add(label1)  

chart3 = New NCartesianChart()  
chart3.SetPredefinedChartStyle(PredefinedChartStyle.HorizontalLeft)  
chart3.BoundsMode = BoundsMode.Stretch
 
Can you please provide some assistance as to what I am doing wrong?

Thank you

Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Stilianos,
This is because the X axis used an ordinal scale (which is suited for categorical data). If you want the labels to display below the ticks you need to set the DisplayDataPointsBetweenTicks property to false:

NOrdinalScaleConfigurator ordinalScale = chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NOrdinalScaleConfigurator;
ordinalScale.DisplayDataPointsBetweenTicks = false;

You can also specify a custom step if the automatically computed one is not good enough:

ordinalScale.MajorTickMode = MajorTickMode.CustomStep;
ordinalScale.CustomStep = 1;

Hope this helps - let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search