Currently my chart is in dB and goes from +20.0 at the bottom, to -40.0 (dB) at the top. My label(s) for the AxisX appear on the bottom (I would like them on top), and my AxisX Title is also at the bottom (where I want it). [I wish I could attached a small .jpg] I ran the program under the debugger, and I found that the Crossing had a default value of NaN. double crossing = ca.AxisY.Crossing; (ca in this code sample is my local variable for a ChartArea). So I first tried setting it to the Maximum. ca.AxisY.Crossing = ca.AxisY.Maximum; The result was no change to my Chart. So, tried it the other way: ca.AxisY.Crossing = ca.AxisY.Minimum; That DID something: The AxisX title stayed at the bottom - good. It put my custom label "near" the top, but not all the way on top of the ChartArea. [I actually only have one label, the letter "L" meaning Left]. The label appears somewhere between -30 and -40dB, in the ChartArea itself (along with the data, and the striplines). So, I tried this: ca.AxisY.Crossing = ca.AxisY.Minimum - ca.AxisY.Interval; That made ca.AxisY.Crossing equal to -50, which should be 10 units above the last placement of the label. Nope - it didn't move. I tried using both Row1 and Row2 of the custom labels. Here's my custom label code snippet, CustomLabel cl1 = new CustomLabel(); // to get the label to show up, you cannot place it from X to X. // it must be at least X-0.5 to X+0.5 cl1.FromPosition = tickMark.TickValue - 0.5; cl1.ToPosition = tickMark.TickValue + 0.5; cl1.Text = tickMark.DisplayValue; //"L"; cl1.RowIndex = 1; cl1.LabelMark = LabelMarkStyle.None; ca.AxisX.CustomLabels.Add(cl1); So, close, but no cookie, yet. -Dave
|