Nevron Forum

How to set 3D Clustered Bar with X Axis Labels ?

https://www.nevron.com/Forum/Topic8376.aspx

By Jacky zhang - Thursday, December 19, 2013

How can I set Clustered Bar with X Axis Labels ? I want to set x axis just like values (1,2,3 ..) but with show the names.

the problems like the following picture : X Axis lables just repeats when i do a loop. thanks. 

By Nevron Support - Thursday, December 19, 2013

Hello Jacky,

It looks like the image is missing from your post. You can try to attach it again.

You can take a look at the following example: Axis Labels

Hope this helps.

By Jacky zhang - Thursday, December 19, 2013

I tried to attached it again. Basicly it is a 3d chart with multi-rows bars. 
By Nevron Support - Friday, December 20, 2013

Hello Jacky,

The easiest solution is to disable the automatic axis labels for the X axis use custom axis labels, for example:


NOrdinalScaleConfigurator scaleX = chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NOrdinalScaleConfigurator;
scaleX.AutoLabels = false;
scaleX.MajorTickMode = MajorTickMode.AutoMaxCount;

scaleX.CustomLabels.Add(new NCustomValueLabel(0, "Name 0"));
scaleX.CustomLabels.Add(new NCustomValueLabel(1, "Name 1"));


etc...
By Jacky zhang - Friday, December 27, 2013

Thanks for your help. This method solve the problem. But it causes other problems too.

The bar "gapPercent" and "widthPercent" become useless.  Sometimes bar will overlap . 

The "scaleX.LabelStyle.ContentAlignment" and  "LabelFitModes" can not affect these custom labels.

These custom labels set to "stagger2, autoscale" fitmode. How can I change their fitmode?

 

By the way, my nevron version is 9.1.13.12.

Thanks,

-Jacky

 

 

By Nevron Support - Friday, December 27, 2013

Hi Jacky,

The custom labels reside in a separate scale level - you can change their fit mode using the CustomLabelsFitModes property:

someScale.CustomLabelFitModes = new LabelFitMode[0];

Hope this solves the problem...