MS Chart Controls: Position grid lines between labels
Asked Answered
S

1

6

Is there a possibility to format a MS Chart Control chart, that the axis label is rendered between major/minor tick marks?

E.g.: on the X axis

|       |       |   x   |       |
|   x   |   x   |       |       |
|       |       |       |   x   |
+-------+-------+-------+-------+
   1/1     2/1     3/1     4/1   

instead of default:

|       |       |       x       | 
|       x       x       |       | 
|       |       |       |       x 
+-------+-------+-------+-------+----
       1/1     2/1     3/1     4/1   
Stanza answered 12/7, 2010 at 19:38 Comment(1)
I had the same issue, thanks a lot for raising the question!Hinge
S
7

Try setting the MajorGrid IntervalOffset to .5 (assuming your Interval is set to 1). Here is some example markup (this markup would be found under the /asp:Chart/ChartAreas/asp:ChartArea nodes):

<AxisX Interval="1"> <MajorGrid Enabled="True" LineColor="Black" Interval="1" IntervalOffset=".5" /> </AxisX>

Silver answered 1/2, 2011 at 0:15 Comment(1)
this doesn't work for me, the labels and marks remains aligned to the default gridHinge

© 2022 - 2024 — McMap. All rights reserved.