Vertical scale value


https://www.nevron.com/Forum/Topic11888.aspx
Print Topic | Close Window

By Naveen Anne - 8 Years Ago
Hi There,

As per our requirement we have to display x axis values vertically I couldn't find the option I tried the angle but no luck.
Please let me know how to acheive the behavior. Attaching the screen shot FYR...

We have a release this Friday any help is highly appreciated
By Nevron Support - 8 Years Ago

Hi Naveen,
You can generate custom multiline labels in order to achieve this look - for example:

   NChart chart = nChartControl1.Charts[0];

   NPointSeries bar = new NPointSeries();

   bar.Values.Add(10);
   bar.Values.Add(20);
   bar.Values.Add(30);

   chart.Series.Add(bar);

   NOrdinalScaleConfigurator ordinalScale = new NOrdinalScaleConfigurator();

   ordinalScale.AutoLabels = false;

   ordinalScale.Labels.Add("1\r\n1");
   ordinalScale.Labels.Add("1\r\n2");
   ordinalScale.Labels.Add("1\r\n3");

   chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = ordinalScale;

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