c# - how can I change forecolor of a chart label? -
How do I change the first color of the chart labels? Here is a screenshot of the chart
I used chart1.series Tried to [0] .FontColor = color.white; But the whole chart becomes white.
Try it out:
this .chart1.BackColor = Color. AliceBlue; This.chart1.ChartAreas [0] .AxisX.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisX.MajorGrid.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisX.LabelStyle.ForeColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.MajorGrid.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.LabelStyle.ForeColor = Color.Red; Here Label labelStyle.ForeColor changes the color, as you requested.
Allow the modification of the property LineColor and the grid. Line color grid lines (black on your screenshot) if you need it color red And Aliceblue, of course, are for example.
Comments
Post a Comment