c# winform Chart Pie 中若X軸數據爲字符串時,#VALX取值爲0

https://q.cnblogs.com/q/83848/spa

在winform程序中用自帶的Chart進行畫圖表時,若畫餅圖,其中X軸數據爲字符串,這時候若是想設置Label值的格式爲#VALX:#VAL,在圖中顯示的老是0:y值,或者圖例中也爲0,這時候就要顯示定義X軸類型code

ct.Series["Series2"].XValueType = ChartValueType.String;
ct.Series["Series2"].Label = "#VALX:#VAL人";

這樣就解決了orm

相關文章
相關標籤/搜索