4

Hi I am new to Zedgraph and I can only find few examples and information. What I need to do is simple just change the color of the axes from default black to white.This is because I want to use black fill for my panes. So I try the following

pane.XAxis.Type = AxisType.DateAsOrdinal;
            pane.XAxis.Color = Color.White; ;
            pane.Y2Axis.Color = Color.White;

Strangely this seems to have no effect and my axis lines are still invisible(lost in the black fill).

thanks

Otiel
  • 18,404
  • 16
  • 78
  • 126
josephj1989
  • 9,509
  • 9
  • 48
  • 70

1 Answers1

5

Your approach is right, but the axes are overlain by the chart border. So you have two options:
Either make the border invisible:

pane.Chart.Border.IsVisible = false;

Or set also the color of the border to white:

pane.Chart.Border.Color = Color.White;

But be aware, that

pane.XAxis.Color = Color.White;

only effects the axis-line. For coloring all elements of the axis, you also have to set the Colors of Title, Scale, MajorTic, MinorTic, MajorGrid, and MinorGrid of each axis (see ZEDGraph API).

SpeziFish
  • 3,262
  • 2
  • 28
  • 27