Hi Devin.
The code that modifies the font style to bold looks ok however there may be other code that overrides the settings you have for the x axis as we tested with:
private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
chart.BoundsMode = BoundsMode.Stretch;
chart.Margins = new NMarginsL(10);
chart.DockMode = PanelDockMode.Top;
chart.Size = new NSizeL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(50, NRelativeUnit.ParentPercentage));
NBarSeries bar1 = new NBarSeries();
bar1.Values.Add(10);
bar1.Values.Add(20);
bar1.Values.Add(30);
chart.Series.Add(bar1);
SetupChartAxes(chart);
}
public virtual void SetupChartAxes(NChart chart)
{
if (chart == null)
throw new ArgumentNullException("chart required");
var scaleY = new NLinearScaleConfigurator();
if (scaleY == null)
throw new NullReferenceException("Failed to create y axis");
scaleY.MajorGridStyle.LineStyle.Pattern = LinePattern.Dash;
scaleY.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Back };
scaleY.InnerMajorTickStyle.Visible = false;
scaleY.LabelStyle.TextStyle.FontStyle.Style = FontStyle.Bold;
chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = scaleY;
var scaleX = new NLinearScaleConfigurator();
if (scaleX == null)
throw new NullReferenceException("Failed to create x axis");
scaleX.MajorGridStyle.LineStyle.Pattern = LinePattern.Dash;
scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Back };
scaleX.InnerMajorTickStyle.Visible = false;
scaleX.LabelStyle.TextStyle.FontStyle.Style = FontStyle.Bold;
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX;
}
and the formatting was OK. Can you post a complete example which replicates the whole chart? (when posting you can first copy the code to notepad to remove any formatting and then copy the code from there).
Best Regards,
Nevron Support Team