Bar alignement


Author
Message
K DR
K DR
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1

Hi,

I would like to align a bar on its left side, to have the gap on the other side, instead of having a gap on each side. I couldn't find the property or method that could change the alignement of the bars. See the picture of what I'm looking for.


Attachments
probgap.png (52 views, 3.00 KB)
Reply
Blagovest Milanov
Blagovest Milanov
Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)
Group: Forum Members
Posts: 154, Visits: 15

Hi,

You need to set the bar width to 100% and then enable view range inflate for the X axis - the code below introduces ten point inflate to the right:

NChart chart = nChartControl1.Charts[0];

NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.InflateMargins = false;
bar.WidthPercent = 100;
chart.Series.Add(bar);

NOrdinalScaleConfigurator scale = new NOrdinalScaleConfigurator();
scale.InflateViewRangeBegin = false;
scale.InflateViewRangeEnd = true;
scale.ViewRangeInflateMode = ScaleViewRangeInflateMode.Absolute;

scale.AbsoluteInflate = new NRange1DL(0, 15);
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scale;

Hope this helps - let me know if you meet any problems.

Best regards,
Bob

 


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