0
votes

I have a stacked bar chart with Days values displayed on the X Axis that needs to dynamically change it's size.

When I have a small number of points, let's say 2, the Interval value has a small value and instead of seeing only 2 labels on the axis, there are a lot many.

The ideal value would be Interval = 1 (with IntervalType="Days"). But this causes another problem: when the Interval is set like this, in case there are a lot of points and the size of the chart is small, the labels are all displayed because the Interval does not change.

Here are a few screenshots to illustrate the problem: http://imgur.com/LEFEZjq,seYdvMJ,eVydRNB,Jwvu5s7

Interval left default and enough points (5/31 - 6/10): http://imgur.com/LEFEZjq,seYdvMJ,eVydRNB,Jwvu5s7#0

Interval left default and small number of points (5/31 - 6/1): ...#1

Interval = 1 and small number of points (5/31 - 6/1): ...#2

Interval = 1 and large number of points (5/31 - 7/29): ...#3

My question is: Is there a way to have both? To set the Interval to 1 but still get rid of excess labels when the don't fit?
My idea was to have Interval be a maximum of 1 and the default calculated value, and I tried to implement it by changing it at the Rendered event, but this doesn't seem to work.

1

1 Answers

0
votes

Nevermind.. I just went with a Numeric DataMapping instead of the DateTime one and mapped the AxisXLabel and ToolTipText to the date. With dates it seems a little buggy but this way it works fine.