Chart FX 7實踐:添加多行標籤

本文爲你講解如何用VS下的.NET圖表控件Chart FX 7建立多行標籤。一般,添加多行標籤能夠在標籤文本上添加換行符 ("\n"),但這樣你必須爲step屬性指定一個值,而Chart FX 7圖表則會自動選擇一個step,而無需再添加換行符。 html

Chart FX 7建立多行標籤源代碼: code

Chart1.Data.Series = 2; 
Chart1.Data.Points = 3; 
 
Chart1.AxisX.Labels[0] = "line one\n line two\n line three\n line four"; 
Chart1.AxisX.Labels[1] = "line one\n line two\n line three\n line four"; 
Chart1.AxisX.Labels[2] = "line one\n line two\n line three\n line four"; 
 
Chart1.PlotAreaMargin.Bottom = 300; 
Chart1.AxisX.Step = 1; 
Chart1.AxisX.Style = Chart1.AxisX.Style | AxisStyles.NotClipped;

效果圖: htm

相關文章
相關標籤/搜索