2010-12-21 77 views

回答

2

萬一別人想沿着這些線路做一些事情,你可以可以這樣做,使用自定義標籤:

System::Windows::Forms::DataVisualization::Charting::ChartArea^ chartArea1 = this->m_chart->ChartAreas[0]; 
for(int i = 0; i < 128; i += 16) 
{ 
    System::Windows::Forms::DataVisualization::Charting::CustomLabel^ customLabel1 = (gcnew System::Windows::Forms::DataVisualization::Charting::CustomLabel()); 
    customLabel1->FromPosition = i-1.5; 
    customLabel1->Text = (i).ToString(); 
    customLabel1->ToPosition = i+1.5; 
    chartArea1->AxisX->CustomLabels->Add(customLabel1); 
}