Profile Picture

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

Posted By Jacky zhang 11 Years Ago
Author
Message
Jacky zhang
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 16, Visits: 1

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. 



Attachments
3dbar.jpg (160 views, 90.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

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.



Best Regards,
Nevron Support Team



Jacky zhang
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 16, Visits: 1
I tried to attached it again. Basicly it is a 3d chart with multi-rows bars. 

Attachments
3dbar.jpg (171 views, 90.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
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...

Best Regards,
Nevron Support Team



Jacky zhang
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 16, Visits: 1

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

 

 



Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
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...

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic