2012-03-09 16 views

Respuesta

2

Ok La única solución que he encontrado es crear una etiqueta personalizada y establecer el color de esa manera:

this._chart.ChartAreas[0].AxisX.CustomLabels.Add(new CustomLabel(position - 1, position + 1, point.AxisLabel, 0, LabelMarkStyle.None)); 

this._chart.ChartAreas[0].AxisX.CustomLabels[position - 1].ForeColor = GetColor(point.AxisLabel); 
4

Puede intentar agregar etiquetas personalizadas al gráfico, y eso le permitirá modificar cada una individualmente.

private void AddCustomLabelAtYValue(double YValue, string Text, Color ForeColor) 
{ 
    double scale = chart.ChartAreas["MyChart"].AxisY.Maximum - 
     chart.ChartAreas["MyChart"].AxisY.Minimum; 
    double offset = scale * 0.5; 
    CustomLabel customLabel = new CustomLabel(YValue - offset, 
     YValue + offset, Text, 0, LabelMarkStyle.None); 
    customLabel.ForeColor = ForeColor; 
    chart.ChartAreas["MyChart"].AxisY.CustomLabels.Add(customLabel); 
} 
Cuestiones relacionadas