WinForm控件Chart的圖表類型


 【將就看,后期再加目錄導航2020.10.23】

折線圖

折線圖通常使用一條線來連接一系列不同的數據點。這樣的直線是直線,樣條曲線或階梯折線圖更簡單,因此還可以使您可視化多個系列而不會像條形圖那樣重疊。

以下是折線圖的不同類型。

折線圖

折線圖使用直線將圖形上的點連接起來,這些直線以相等的間隔顯示數據趨勢。折線圖將輸入視為沿x軸等距分布的非數字類別信息。這適用於分類數據,例如文本標簽,但是當X值由數字組成時,可能會產生意外結果。

當以3D渲染時,該圖看起來像一個功能區,因此此類類型也稱為功能區圖或帶狀圖

線條和點的外觀可以使用諸如所使用的顏色,線條的粗細和顯示的符號之類的選項進行配置。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將線系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Line);
 4 
 5 series.Points.Add(1, new double[] { 20, 8, 8 });
 6 
 7 series.Points.Add(2, new double[] { 70, 5, 5 });
 8 
 9 series.Points.Add(3, new double[] { 10, 8, 8 });
10 
11 series.Points.Add(4, new double[] { 40, 10, 10 });
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add(series);

 

樣條圖

樣條圖類似於折線圖,不同之處在於它使用樣條線代替直線連接不同的數據點。

當以3D渲染時,該圖看起來像一個功能區,因此此類類型也稱為功能區圖或帶狀圖

線條和點的外觀可以使用諸如所使用的顏色,線條的粗細和顯示的符號之類的選項進行配置。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將樣條系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Spline);
 4 
 5 series.Points.Add(0, 2);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 1);
10 
11 series.Points.Add(3, 1.5);
12 
13 series.Points.Add(4, 4);
14 
15 series.Points.Add(5, 1);
16 
17 // Add the series to the chart series collection.
18 
19 this.chartControl1.Series.Add (series);

 

旋轉樣條圖

旋轉樣條圖類似於普通的樣條圖。唯一的區別是它將旋轉。它繪制一個或幾個系列的數據,並通過平滑的旋​​轉樣條曲線(而不是直線)將每個系列連接起來。

下圖顯示了示例旋轉樣條圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將旋轉樣條線系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series1 = new ChartSeries(" Series 1",ChartSeriesType.RotatedSpline );
 4 
 5 series1.Points.Add(1, 326);
 6 
 7 series1.Points.Add(2, 491);
 8 
 9 series1.Points.Add(3, 382);
10 
11 series1.Points.Add(4, 482);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add(series1);

 

步線圖

步進折線圖使用水平和垂直線連接數據點,從而形成類似進度的步進。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將StepLine系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.StepLine);
 4 
 5 series.Points.Add (0, 1);
 6 
 7 series.Points.Add (1, 3);
 8 
 9 series.Points.Add (2, 2);
10 
11 series.Points.Add (3, 2);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add (series);

 

條形圖

條形圖是最簡單,最通用的統計圖。這些圖表以水平條顯示,用於比較各個類別的值,以顯示項目值隨時間的變化。

柱狀圖是一種非常相似,更常見的統計圖類型,在該圖中垂直顯示條形圖。

EssentialChart支持以下不同類型的條形圖:

條形圖

條形圖是最簡單,最通用的統計圖。它為系列中的每個點顯示水平條,相鄰系列中的點被繪制為彼此相鄰的條。它還具有3D視覺效果。條形圖可用於比較各個類別的值,以顯示項目的價值隨時間的變化,或用於顯示單個時間點上多個項目的價值。

使用條形圖的另一個很好的理由是,當您意識到數據系列的數量更適合水平格式時。如果您在不同值之間存在較大差距,並且還需要比較許多項目,則最好使用條形圖類型。

下圖顯示了多系列條形圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-除條形圖和堆積條形圖以外的任何圖表類型組合。

可以使用以下代碼將條形圖系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Bar);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

堆積條形圖

堆疊條形圖與常規條形圖相似,不同之處在於Y值按指定的序列順序相互堆疊。這有助於可視化零件與整體的關系。

下圖顯示了示例堆積條形圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-兩個或更多(單個系列以條形顯示)。

不能與-除條形圖和堆積條形圖以外的任何圖表類型結合使用。

可以使用以下代碼將堆積條形圖系列添加到圖表中。

 1 // Create chart series and add data point into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.StackingBar);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 ChartSeries series2 = new ChartSeries("Series Name",ChartSeriesType.StackingBar);
12 
13 series2.Points.Add(0, 2);
14 
15 series2.Points.Add(1, 1);
16 
17 series2.Points.Add(2, 1);
18 
19 // Add the series to the chart series collection.
20 
21 this.chartControl1.Series.Add(series);
22 
23 this.chartControl1.Series.Add(series2);

 

StackedBar100圖表

此圖表類型將多個系列的數據顯示為堆疊的條形圖,以確保每個堆疊元素的累積比例始終總計為100%。因此,y軸將始終在0到100的范圍內渲染。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-兩個或更多。

MarkerSupport-否

不能與-其他任何圖表類型組合使用。

 1 ChartSeries series1 = new ChartSeries("chart", ChartSeriesType.StackingBar100);
 2 
 3 series1.Points.Add(0, 25.3);
 4 
 5 series1.Points.Add(1, 45.7);
 6 
 7 series1.Points.Add(2, 97.3);
 8 
 9 series1.Points.Add(3, 20.6);
10 
11 series1.Points.Add(4, 125.8);
12 
13 series1.Points.Add(5, 216.1);
14 
15 this.chartControl1.Series.Add(series1);

 

甘特圖

甘特圖是任務持續時間相對於時間進展的圖形表示。在甘特圖中,每個任務占用一行。每個任務的預期時間由水平條表示,水平條的左端表示任務的預期開始,右端表示任務的預期完成。任務可以順序,並行或重疊運行。

然后,您可以使用另一個系列來代表不同任務的完成部分。然后,此新系列將包含數據點,其起始值與先前系列中的數據點的起始值相一致,並根據任務中已完成工作的分數來得出結束值。這樣,通過在當前日期在圖表上繪制一條垂直線,可以快速了解項目進度。

圖表類型

圖表詳情

每點的Y值數量-2(第一個是起始值,第二個是終止值)。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar結合使用。

可以使用以下代碼將甘特系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Gantt);
 4 
 5 series.Points.Add(0, 1, 5);
 6 
 7 series.Points.Add(1, 3, 7);
 8 
 9 series.Points.Add(2, 4, 8);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

直方圖

直方圖是頻率分布的條形圖(柱狀圖),其中條形的寬度與變量已划分的類別成比例,條形的高度與類別頻率成比例。通常將類別指定為某個變量的非重疊間隔。類別(條)必須相鄰。此外,該圖表還可以繪制正態分布曲線。

直方圖是有用的數據摘要,可傳達以下信息:

  • 頻率分布的一般形狀。(正常,指數等)
  • 分布的對稱性以及是否傾斜。
  • 模態-單峰,雙峰或多峰。

分布的形狀傳達了重要的信息,例如數據的概率分布。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar結合使用。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("System 1",ChartSeriesType.Histogram);
 4 
 5 series.Text = series.Name;
 6 
 7 series.Points.Add( 3, 1020 );
 8 
 9 series.Points.Add( 45, 440 );
10 
11 series.Points.Add( 23, 605 );
12 
13 
14 // Add the series to the chart series collection.
15 
16 this.chartControl1.Series.Add(series);

 

龍卷風圖

龍卷風圖是一個條形圖,顯示了輸出到幾個不同輸入的可變性。使用整個范圍內條的相對長度來顯示變異性。它主要用於靈敏度分析。它顯示了不同的隨機因素如何影響預后。

圖表類型

圖表詳情

每點的Y值數量-2。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar結合使用。

可以使用以下代碼將龍卷風系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series 0", ChartSeriesType.Tornado);
 4 
 5 series.Points.Add(1, 0, 48);
 6 
 7 series.Points.Add(2, 0, 42);
 8 
 9 series.Points.Add(3, 0, 27);
10 
11 series.Points.Add(4, 0, 20);
12 
13 series.Points.Add(5, 0, 9);
14 
15 // Add the series to the chart series collection.
16 
17 this.chartControl1.Series.Add(series);
18 
19 ChartSeries series2 = new ChartSeries("Series 1", ChartSeriesType.Tornado);
20 
21 series2.Points.Add(1, 0, -45);
22 
23 series2.Points.Add(2, 0, -39);
24 
25 series2.Points.Add(3, 0, -31);
26 
27 series2.Points.Add(4, 0, -20);
28 
29 series2.Points.Add(5, 0, -11);
30 
31 this.chartControl1.Series.Add(series2);

 

柱形圖

柱形圖是最常用的圖表類型之一。用垂直條(稱為列)顯示,它們描述一項或多項的不同值。相鄰系列的點被繪制為彼此相鄰的條。它們是顯示項目價值隨時間變化的理想選擇。

非常類似於條形圖類型,其中條形圖呈水平狀態。

EssentialChart支持這些不同的柱形圖。

柱形圖

柱形圖是最常用的圖表類型之一。它使用豎線(稱為列)顯示一項或多項的不同值。它類似於條形圖,不同之處在於,此處的條形圖是垂直的而不是水平的。相鄰系列的點被繪制為彼此相鄰的條。

它用於比較不同類別中數據的頻率,計數,總數或平均值。它是顯示項目價值隨時間變化的理想選擇。

下圖顯示了多系列柱形圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將列系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Column);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

柱形圖

柱形圖是最常用的圖表類型之一。用垂直條(稱為列)顯示,它們描述一項或多項的不同值。相鄰系列的點被繪制為彼此相鄰的條。它們是顯示項目價值隨時間變化的理想選擇。

非常類似於條形圖類型,其中條形圖呈水平狀態。

EssentialChart支持這些不同的柱形圖。

柱形圖

柱形圖是最常用的圖表類型之一。它使用豎線(稱為列)顯示一項或多項的不同值。它類似於條形圖,不同之處在於,此處的條形圖是垂直的而不是水平的。相鄰系列的點被繪制為彼此相鄰的條。

它用於比較不同類別中數據的頻率,計數,總數或平均值。它是顯示項目價值隨時間變化的理想選擇。

下圖顯示了多系列柱形圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將列系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Column);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

“列范圍圖”與“列圖”相似,不同之處在於每一列均在一個范圍內呈現。因此,用戶必須為每個點指定y軸的起始值和終止值。

下圖顯示了列范圍圖。

圖表類型

圖表詳情

每點的Y值數量-2。

系列數-一個或多個。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

下面的代碼段對此進行了說明。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series 0",ChartSeriesType.ColumnRange);
 4 
 5 series.Points.Add(0,100,400);
 6 
 7 series.Points.Add(2,300,600);
 8 
 9 series.Points.Add(4,200,700);
10 
11 series.Text = series.Name;
12 
13 // Add the series to the chart series collection.
14 
15 this.ChartControl1.Series.Add(series);

 

堆積柱形圖

堆積柱形圖與常規柱形圖相似,不同之處在於y值以指定的序列順序相互堆疊。這有助於可視化零件與整體的關系。

下圖顯示了示例堆積柱形圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-兩個或更多(單個系列將像條形圖一樣呈現)。

不能與-餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖結合使用。

可以使用以下代碼將堆積柱系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.StackingColumn);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 ChartSeries series2 = new ChartSeries("Series Name",ChartSeriesType.StackingColumn);
12 
13 series2.Points.Add(0, 2);
14 
15 series2.Points.Add(1, 1);
16 
17 series2.Points.Add(2, 1);
18 
19 // Add the series to the chart series collection.
20 
21 this.chartControl1.Series.Add(series);
22 
23 this.chartControl1.Series.Add(series2);

 

堆積的Column100圖表

此圖表類型將多個系列的數據顯示為堆疊列,以確保每個堆疊元素的累積比例始終總計為100%。因此,y軸將始終在0到100的范圍內渲染。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-兩個或更多。

SupportMarker –否

不能與-甜甜圈,餅圖,條形圖,堆積條形圖,極坐標圖,雷達圖,金字塔圖或漏斗圖結合使用。

 1 ChartSeries series1 = new ChartSeries("Series 1", ChartSeriesType.StackingColumn100);
 2 
 3 series1.Points.Add(0, 25.3);
 4 
 5 series1.Points.Add(1, 45.7);
 6 
 7 series1.Points.Add(2, 97.3);
 8 
 9 series1.Points.Add(3, 20.6);
10 
11 series1.Points.Add(4, 125.8);
12 
13 series1.Points.Add(5, 216.1);
14 
15 this.chartControl1.Series.Add(series1);

 

面積圖

面積圖強調一段時間內值的變化程度。面積圖不是將數據呈現為離散的條形或柱形,而是以針對y軸定義的連續的起伏模式來呈現它們。

支持Alpha混合多個系列區域。用戶也可以輕松自定義外觀。

EssentialChart支持以下各種類型的面積圖:

面積圖

面積圖使用直線連接y點,並形成由上述線和x軸覆蓋的區域。然后用指定的顏色或漸變對該區域進行陰影處理。

可以在同一張圖表上繪制多個系列,並且可以在外部圖表上使用帶有alpha混合功能的內部顏色,以使內部圖表得以顯示。

下圖顯示了多系列面積圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Gantt和Stacked Bar結合使用。

可以使用以下代碼將面積系列添加到圖表中。

 1 // Create a chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Area);
 4 
 5 series.Points.Add(0, 4.5);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 series.Points.Add(3, 3);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add(series);

 

樣條面積圖

樣條圖面積圖與面積圖相似,唯一的區別是一系列點的連接方式。它通過一條平滑的樣條曲線連接每個系列的點。圖表包圍的區域填充有指定的內部畫筆。

可以在同一張圖表上繪制多個系列,並且可以在外部圖表上使用alpha混合內部顏色以使內部圖表得以顯示。

下圖顯示了多系列樣條線面積圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

樣條區域系列可以使用以下代碼添加到圖表中。

 1 // Create a chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.SplineArea);
 4 
 5 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Area);
 6 
 7 series.Points.Add(0, 4.5);
 8 
 9 series.Points.Add(1, 3);
10 
11 series.Points.Add(2, 4);
12 
13 series.Points.Add(3, 3);
14 
15 // Add the series to the chart series collection.
16 
17 this.chartControl1.Series.Add(series);

 

堆積面積圖

堆疊面積圖與常規面積圖相似,不同之處在於y值以指定的序列順序相互堆疊。這有助於可視化零件與整體的關系。

下圖顯示了示例堆積面積圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將堆積面積系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.StackingArea);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 ChartSeries series2 = new ChartSeries("Series Name",ChartSeriesType.StackingArea);
12 
13 series2.Points.Add(0, 2);
14 
15 series2.Points.Add(1, 1);
16 
17 series2.Points.Add(2, 1);
18 
19 // Add the series to the chart series collection.
20 
21 this.chartControl1.Series.Add(series);
22 
23 this.chartControl1.Series.Add(series2);

 

StackedArea100圖表

此圖表類型將多個系列的數據顯示為堆疊區域,以確保每個堆疊元素的累積比例始終總計為100%。因此,y軸將始終在0到100的范圍內渲染。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一。

SupportMarker –否

不能與-任何其他圖表類型組合。

 1 ChartSeries series1=chartControl1.Model.NewSeries("Series1",ChartSeriesType.StackingArea100);
 2 
 3 series1.Points.Add(1,20);
 4 
 5 series1.Points.Add(2,30);
 6 
 7 series1.Points.Add(3,10);
 8 
 9 series1.Points.Add(4,15);
10 
11 series1.Points.Add(5,25);
12 
13 this.chartControl1.Series.Add(series1);
14 
15 ChartSeries series2=chartControl1.Model.NewSeries("Series2",ChartSeriesType.StackingArea100);
16 
17 series2.Points.Add(1,20);
18 
19 series2.Points.Add(2,10);
20 
21 series2.Points.Add(3,50);
22 
23 series2.Points.Add(4,15);
24 
25 series2.Points.Add(5,5);
26 
27 this.chartControl1.Series.Add(series2);
28 
29 ChartSeries series3=chartControl1.Model.NewSeries("Series3",ChartSeriesType.StackingArea100);
30 
31 series3.Points.Add(1,20);
32 
33 series3.Points.Add(2,40);
34 
35 series3.Points.Add(3,10);
36 
37 series3.Points.Add(4,5);
38 
39 series3.Points.Add(5,20);
40 
41 this.chartControl1.Series.Add(series3);

 

步驟面積圖

步長面積圖與常規面積圖相似,不同之處在於,它們不是通過直線追蹤點之間的最短路徑,而是通過連續的垂直和水平線連接這些值,從而形成類似進度的階梯。

下圖顯示了示例步驟面積圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將“步區”系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.StepArea);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 series.Points.Add(3, 2);
12 
13 series.Points.Add(4, 3);
14 
15 // Add the series to the chart series collection.
16 
17 this.chartControl1.Series.Add (series);

 

范圍面積圖

RangeArea圖表類似於Area圖表;唯一的區別是,我們需要給出兩個y值(開始和結束)。RangeArea圖表將在相應的x軸值上從x軸的起始值(下限)到上方y軸的結束值(上限)呈現。

這種圖表類型看起來很清晰,可用於必須顯示每個x點的值范圍的情況。

例如:如果我們必須在圖表中顯示每天的溫度范圍,RangeArea Chart將是最方便的圖表類型。

圖表類型

圖表詳情

每點的Y值數量-2。

最大系列數-無限。

最小系列數-1。

可以使用以下代碼將“步區”系列添加到圖表中。

 1 ChartSeries series1 = new ChartSeries("Profit Range", ChartSeriesType.RangeArea);
 2 
 3 series1.Points.Add(0, 18, 50);
 4 
 5 series1.Points.Add(1,20,49);
 6 
 7 series1.Points.Add(2,18 , 52);
 8 
 9 series1.Points.Add(3,20, 50);
10 
11 series1.Points.Add(4, 18.5,53);
12 
13 series1.Points.Add(5, 21, 51);
14 
15 series1.Points.Add(6, 17.7, 54);
16 
17 series1.Points.Add(7, 19, 52);
18 
19 this.chartControl1.Series.Add(series1);

 

累積圖

累積圖通常是將數據表示為100%部分的單個系列圖,並且不使用任何軸。基本圖表提供兩種類型的累積圖表。

漏斗圖

漏斗圖是一個單一的序列圖,將數據表示為100%的一部分,該圖不使用任何軸。漏斗圖可以2D或3D模式查看

漏斗圖通常用於表示銷售過程中的各個階段,並顯示每個階段的潛在收入。這種類型的圖表還可用於識別組織的銷售過程中潛在的問題區域。漏斗圖類似於堆積的百分比條形圖。

以下圖像是一些漏斗圖示例。

圖表類型

圖表類型

圖表類型

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-其他任何圖表類型組合使用。

 1 ChartSeries series1 = new ChartSeries("Funnel chart", ChartSeriesType.Funnel);
 2 
 3 series1.Points.Add(0, 25.3);
 4 
 5 series1.Points.Add(1, 45.7);
 6 
 7 series1.Points.Add(2, 97.3);
 8 
 9 series1.Points.Add(3, 20.6);
10 
11 series1.Points.Add(4, 125.8);
12 
13 series1.Points.Add(5, 216.1);
14 
15 this.chartControl1.Series.Add(series1);

 

金字塔圖

金字塔圖類似於漏斗圖。它通常用於地理目的。金字塔圖類型顯示數據,總計時將為100%。這種類型的圖表是一個單一的序列圖,將數據表示為100%的一部分,並且該圖表不使用任何軸。金字塔圖可以視為2D或3D

以下圖像是一些示例金字塔圖。

圖表類型

圖表類型

圖表類型

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-其他任何圖表類型組合使用。

 1 ChartSeries series1 = new ChartSeries("Pyramid chart", ChartSeriesType.Pyramid);
 2 
 3 series1.Points.Add(0, 25.3);
 4 
 5 series1.Points.Add(1, 45.7);
 6 
 7 series1.Points.Add(2, 97.3);
 8 
 9 series1.Points.Add(3, 20.6);
10 
11 series1.Points.Add(4, 125.8);
12 
13 series1.Points.Add(5, 216.1);
14 
15 this.chartControl1.Series.Add(series1);

 

XY圖表(氣泡和散點圖)

這些圖表也稱為XY圖表,用於可視化與同一事件相關的兩個變量之間的關系。

有關相應圖表類型的更多詳細信息:

散點圖

散點圖(也稱為XY圖表)是沿兩個軸的x值和y值的圖。這些點沒有連接在一起,可以使用形狀或圖像進行自定義,以使其易於識別(通常與時間無關)。

散點圖使您可以基於兩個自變量繪制數據點。我們試圖預測的變量稱為因變量或y變量它所依賴的變量稱為自變量或x變量。散點圖可以繪制多個數據集,每個數據集由不同的符號表示,每個數據集具有任意數量的數據點。

它用於顯示離散或連續的數字數據。散點圖通常用於可視化科學數據。

下圖顯示了多系列散點圖。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將散點圖系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Scatter);
 4 
 5 series.Points.Add (0, 1);
 6 
 7 series.Points.Add (1, 3);
 8 
 9 series.Points.Add (2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add (series);

 

可以使用ChartSeries.Styles [i] .Symbol屬性配置符號,如以下示例所示。

 1 // Specify the symbol info required for the Scatter chart.
 2 
 3 series.Styles [0].Symbol = new ChartSymbolInfo();
 4 
 5 series.Styles [0].Symbol.Color = Color.Red;
 6 
 7 series.Styles [0].Symbol.Shape = ChartSymbolShape.InvertedTriangle;
 8 
 9 series.Styles [1].Symbol = new ChartSymbolInfo();
10 
11 series.Styles [1].Symbol.Color = Color.Green;
12 
13 series.Styles [1].Symbol.Shape = ChartSymbolShape.Hexagon;
14 
15 series.Styles [2].Symbol = new ChartSymbolInfo();
16 
17 series.Styles [2].Symbol.Color = Color.Blue;
18 
19 series.Styles [2].Symbol.Shape = ChartSymbolShape.Cross;

 

氣泡圖

氣泡圖是散點圖(或XY圖)的擴展,其中每個數據標記都由一個圓表示,圓的尺寸構成了第三個變量。因此,氣泡圖允許進行三變量比較,從而可以輕松可視化在二變量圖表中不明顯的復雜相互依存關系。氣泡圖經常用於市場和產品比較研究中。

盡管它稱為氣泡圖,但可以使用BubbleType屬性將數據標記呈現為圓形,圖像或正方形。

下圖顯示了多系列氣泡圖。

圖表類型

圖表詳情

每個點的Y值數量-2(可選的第二個值定義形狀的大小)。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將氣泡系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Bubble);
 4 
 5 // The 2nd Y value represents the size of the shape
 6 
 7 series.Points.Add (0, 1, 7);
 8 
 9 series.Points.Add (1, 3, 5);
10 
11 series.Points.Add (2, 4, 9);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add (series);

 

MinBounds和MaxBounds

氣泡的大小取決於串聯的bubbleItem的MinBounds和MaxBounds。默認情況下,minBounds為(20,20),MaxBounds為(50,50),因此氣泡的寬度和高度在20到50之間。

您可以使用系列屬性中minBoundsmaxBounds屬性更改minBounds和maxBounds 

可以使用以下代碼更改氣泡系列的minBounds和maxBounds。

1 // Change the min and max bounds of bubble series.
2 
3 series.ConfigItems.BubbleItem.MinBounds = new RectangleF(0, 0, 10, 10);      
4 series.ConfigItems.BubbleItem.MaxBounds = new RectangleF(0, 0, 25, 25);

 

以下屏幕快照說明了如何更改默認值的最小和最大范圍。

圖表類型

財務圖表

以下圖表是金融界分析報告的主要內容。財務數據通常具有超過y的價值。例如,股價圖表應包括一天的高,低,開盤和收盤價。此類數據需要在“股市數據”的背景下進行適當渲染。此外,除了實際價值外,還需要在視覺上描繪價格走勢。

以下圖表滿足了以上要求,並提供了易於理解的價格走勢圖。

EssentialChart支持財務圖表類型。

蠟燭圖

蠟燭圖使用高,低,開盤和收盤值顯示庫存信息高和低值由蠟燭的燭芯表示。蠟燭代表開盤價和收盤價。

下圖顯示了顯示單個系列的CandleChart。

圖表類型

圖表詳情

每點的Y值數量-4(分別為高,低,打開和關閉)。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將蠟燭系列添加到圖表中。

 1 // Create chart series and add data point into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Candle);
 4 
 5 // Arguments: X value, High, Low, Open, Close
 6 
 7 series.Points.Add(0, 5, 1, 3, 4);
 8 
 9 series.Points.Add(1, 8, 7, 4, 7);
10 
11 series.Points.Add(2, 8, 4, 5, 6);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add(series);

 

高低圖

HiLo圖表是一種通常用於股票分析的特殊圖表。它們通常用於顯示每個期間的誤差線或股票的交易范圍。

高低位圖期望在序列中指定兩個y值。一個值應該代表該時期的最高價,而另一個值應該代表該時期的低價。可以以任何順序指定。

圖表類型

圖表詳情

每點的Y值數量– 2。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將HiLo系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.HiLo);
 4 
 5 series.Points.Add(0, 1, 3);
 6 
 7 series.Points.Add(1, 3, 4);
 8 
 9 series.Points.Add(2, 4, 8);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

定制選項

DisplayText,DrawErrorBars,DrawSeriesNameInDepth,ErrorBarsSymbolShape,PhongAlpha,旋轉,系列之間的間距,ShadingMode,FancyToolTip,字體,內部,LegendItem,名稱,PointsToolTipFormat,SmartLabels,摘要,文本,TextColor,TextFormat,TextOffset,TextOrientation,可見。

HiLo打開關閉圖表

HiLo開盤關閉圖表是一種特殊的圖表,通常用於股票分析。此圖表類型期望系列中的每個點有四個y值。這些值應代表該時間段內該股票的高,低,開盤和收盤價。

圖表類型

圖表詳情

每點的Y值數量-4。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar,Stacked Bar結合使用。

可以使用以下代碼將HiLo開盤收盤價系列添加到圖表中。

 1 // Create chart series and add data point into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.HiLoOpenClose);
 4 
 5 // Arguments: X value, High, Low, Open, Close
 6 
 7 series.Points.Add(0, 5, 1, 3, 4);
 8 
 9 series.Points.Add(1, 8, 7, 4, 7);
10 
11 series.Points.Add(2, 8, 4, 5, 6);
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add(series);

 

gi木圖

Kagi Charts是日本的發明,自1870年代末以來就一直存在,但由史蒂文·尼森(Steven Nison)在西方世界推廣。它們包含一系列連接的垂直線,其中這些線的粗細和方向取決於價格。如果收盤價繼續沿先前的垂直Kagi線方向移動,則該線會延長。但是,如果收盤價反轉了預定的“反轉”金額,則會在下一列中以相反的方向繪制一條新的Kagi線。

以最新收盤價計算,前一列高位或低位的滲透會改變線條的顏色。這些顏色描繪了看漲或看跌的模式。使用PriceUpColor和PriceDownColor屬性來指定這兩種圖案的顏色。列越寬,圖案越強。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-Pie,Bar結合使用。

可以使用以下代碼將Kagi系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name", ChartSeriesType.Kagi);
 4 
 5 // Arguments: X value, closing price.
 6 
 7 series.Points.Add(0, 23);
 8 
 9 series.Points.Add(1, 27);
10 
11 series.Points.Add(2, 24.7);
12 
13 series.Points.Add(3, 23);
14 
15 series.Points.Add(4, 21);
16 
17 series.Points.Add(5, 20);
18 
19 series.Points.Add(6, 22);
20 
21 series.Points.Add(7, 24);
22 
23 series.Points.Add(8, 26);
24 
25 series.Text = series.Name;
26 
27 series.ReversalAmount = 1.0;
28 
29 series.PriceUpColor = Color.Green;
30 
31 series.PriceDownColor = Color.Red;
32 
33 // Add the series to the chart series collection.
34 
35 this.chartControl1.Series.Add (series);

 

如果ReversalAmount為0.0而不是默認值1.0,則Kagi圖表將如下圖所示。

圖表類型

 

點狀圖

點和圖圖表用於識別支撐位,阻力位和圖表形態。該圖表忽略了時間因素,僅關注價格變動-X或O的列可能需要一天或幾周才能完成。按照慣例,將一列中的第一個X繪制在上一列中最后一個O上方的一個框內(一列中的第一個O繪制在最高X下方的一個框內)。

這是一個圖表,顯示了價格的每日遞增和遞減。它使用一系列X和O來確定價格趨勢,其中X代表上升趨勢,O代表下降趨勢。ReversalAmount的默認值為1。使用PriceUpColor指定X的顏色,使用PriceDownColor指定O的顏色。

該圖表需要兩個y值,指定時間段內的高值和低值。

圖表類型

圖表詳情

每點的Y值數量-2。

系列數-一個。

不能與-Pie,Bar結合使用。

可以使用以下代碼將點和圖系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.PointAndFigure);
 4 
 5 // Arguments: X value, low value, high value
 6 
 7 series.Points.Add (0, 1, 5);
 8 
 9 series.Points.Add (1, 3, 7);
10 
11 series.Points.Add (2, 4, 8);
12 
13 series.ReversalAmount = 1.0;
14 
15 // Add the series to the chart series collection.
16 
17 this.chartControl1.Series.Add (series);

 

Renko圖表

人們認為Renko制圖方法是從renga(日語中的磚頭單詞renga)獲得名稱的Renko Charts由Steve Nison引入將Renko(磚頭)畫成相等大小,並確定一定的數量。僅當價格變動幅度最小時,才沿先前的移動方向繪制積木。如果價格變化了確定的數量或更多,則繪制新磚。如果價格變化幅度小於確定的數量(由ReversalAmount指定),則新價格將被忽略。ReversalAmount的默認值為1。

如果新的收盤價在相反方向上穿透了先前的磚塊收盤價,則會發生由磚塊顏色變化突出的趨勢反轉。使用PriceUpColor指示看漲趨勢,使用PriceDownColor指示看跌趨勢。

由於Renko圖表通過過濾出較小的漲跌來隔離潛在趨勢,因此Renko圖表在確定支撐位和阻力位方面非常出色。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-Pie,Bar結合使用。

可以使用以下代碼將Renko系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Renko);
 4 
 5 series.Points.Add (0, 1);
 6 
 7 series.Points.Add (1, 3);
 8 
 9 series.Points.Add (2, 4);
10 
11 series.ReversalAmount = 1.0;
12 
13 // Add the series to the chart series collection.
14 
15 this.chartControl1.Series.Add (series);

 

三折線圖

三折線圖在概念上與點圖和圖類似。之所以這樣稱呼三行中斷圖表法,是因為通常使用的行數多。它顯示了一系列基於價格變化的垂直框(“線”)。它忽略了時間的流逝。

三線折線圖看起來像一系列高度不同的上升和下降線。每條新線都像一個點和圖的X和O一樣,占據一個新列。基於收盤價(或高點和低點),如果超過了先前的高點,則繪制新的上升線,如果價格達到新的低點,則繪制新的下降線。通過更改顏色突出顯示價格趨勢的變化。使用PriceUpColor指示看漲趨勢,使用PriceDownColor指示看跌趨勢。

ReversalAmount指定閾值量,價格應更改此閾值量,以開始在適當的方向上呈現新的垂直框。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-Pie,Bar結合使用。

可以使用以下代碼將三個Line Break系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.ThreeLineBreak);
 4 
 5 series.Points.Add (0, 1);
 6 
 7 series.Points.Add (1, 3);
 8 
 9 series.Points.Add (2, 4);
10 
11 // Add series to the chart series collection.
12 
13 this.chartControl1.Series.Add (series);

 

盒須圖

1977年,約翰·圖基(John Tukey)發布了一種有效的方法來顯示五位數的數據摘要。該圖稱為Box and Whisker圖(也稱為BoxPlot),它總結了以下統計量度。

  • 中位數
  • 上下四分位數(75%到25%)
  • 最小和最大數據值

以下是Box和Whisker圖的示例。

圖表類型

Box和Whisker圖的解釋如下。

  • 框本身包含中間50%的數據。框的上邊緣(鉸鏈)指示數據集的第75個百分點,下部鉸鏈指示第25個百分點。中間兩個四分位數的范圍稱為四分位數間距。
  • 框中的線表示數據的中間值。
  • 箱形圖和晶須圖有兩種模式,普通模式和百分位數模式。
  • 在正常模式下,如果框內的中線與鉸鏈的距離不相等,則數據會偏斜。垂直線或“晶須”的末端表示最小和最大數據值,除非存在異常值,在這種情況下,晶須最大延伸為四分位間距的1.5倍。
  • 在百分比模式下:[將Series1.ConfigItems.BoxAndWhiskerItem.PercentileMode屬性設置為true ],垂直線或“晶須”的末端將由Series1.ConfigItems.BoxAndWhiskerItem.Percentile屬性值確定。例如,如果“百分位數”值為0.15,則最小值將是整個數據集的第15個百分位數,而最大值將是整個數據集的第85個百分位數。

注意

1,百分數值應在0.0到0.25之間。

2.無法設置上百分位數值。它是根據百分比值自動計算的。

例如:百分位數= 0.15

高百分比= 1-百分比= 0.85。

在“普通”模式下,存在“異常值”,在這種情況下,“晶須”最大擴展為四分位間距的1.5倍。但是在百分位數模式下,將基於百分位數值計算離群值。

例如:百分位數= 0.15

存在異常值,在這種情況下,晶須分別擴展到整個數據集的第15個和第85個百分點的最小值和最大值。如果“百分位數”值為零,則圖表中沒有異常值。

3.通過使用此'Series1.ConfigItems.BoxAndWhiskerItem.OutLierWidth'屬性可以調整離群值的寬度。如果為零,則將基於數據點范圍計算離群值的寬度。

圖表詳情

每點的Y值數量-5(最小值,下四分位數,中位數,上四分位數,最大值)。

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar結合使用。

可以使用以下代碼將Box和Whisker系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series1 = new ChartSeries("Series 1",ChartSeriesType.BoxAndWhisker );
 4 
 5 series1.Points.Add(1, 5, 8 ,12, 15, 18);
 6 
 7 series1.Points.Add(2, 4, 6, 10, 12, 14);
 8 
 9 series1.Points.Add(3, 2, 4, 7, 14, 18);
10 
11 ChartSeries series2 = new ChartSeries("Series 2",ChartSeriesType.BoxAndWhisker );
12 
13 series2.Points.Add(1, 6, 9, 15, 18, 20);
14 
15 series2.Points.Add(2, 7, 9, 13, 15, 16);
16 
17 series2.Points.Add(3, 6, 8, 10, 15, 19);
18 
19 // Add the series to the chart series collection.
20 
21 this.chartControl1.Series.Add(series1);
22 
23 this.chartControl1.Series.Add(series2);

 

餅形圖

餅圖將y值呈現為餅中的切片。這些切片與整體成比例地繪制,整體就是該系列中所有y值的總和。因此,餅圖用於可視化數據類別對整個數據集的比例貢獻(以百分比或分數表示)。數據系列中的x值將僅被視為標稱(分類,定性)數據。餅圖一次只能顯示一個數據系列。

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-其他任何圖表類型組合使用。

可以使用以下代碼將餅圖系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries("Series Name",ChartSeriesType.Pie);
 4 
 5 series.Points.Add(0, 1);
 6 
 7 series.Points.Add(1, 3);
 8 
 9 series.Points.Add(2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add(series);

 

甜甜圈圖

甜甜圈系數

DoughnutCoefficient指定的PieCharts將呈現為Donut圖表。默認情況下,此值設置為0.0,因此圖表將呈現為完整的餅圖。DoughnutCoefficient屬性指定半徑的分數占領了整個甜甜圈。因此,該值的范圍可以從0.0到0.9。

 1 this.chartControl1.Series(0).ConfigItems.PieItem.DoughnutCoefficient=0.5f; 

圖表類型

高度系數

在3D模式下時,可以通過HeightCoefficient屬性指定餅圖的相對高度請注意,HeightByAreaDepth屬性應設置為false才能生效。有效值為0.1f至0.5f。默認情況下,此屬性設置為0.2f。

1 this.chartControl1.Series[0].ConfigItems.PieItem.HeightByAreaDepth = false;
2 
3 this.chartControl1.Series[0].ConfigItems.PieItem.HeightCoefficient = 0.1f;

 

圖表類型

 

極地和雷達圖

基本圖表支持在圖表控件中實現極坐標和雷達圖表。這些圖表可用於以圖表形式顯示不同的值和角度。

極坐標圖

極坐標圖是一種圓圖,在其上以值和角度表示數據。x值定義將繪制數據點的角度。y值定義數據點到圖中心的距離,圖中心通常從0開始。

它是一種圖形形式,它可以對情況的幾個定量或定性方面進行直觀比較,也可以對使用相同軸(極點)繪制的多個情況進行直觀比較。

極坐標圖還可以通過將axis的Inversed屬性設置為true來繪制反向/順時針方向的軸

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-其他任何圖表類型組合使用。

可以使用以下代碼將Polar系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Polar);
 4 
 5 series.Points.Add (0, 1);
 6 
 7 series.Points.Add (1, 3);
 8 
 9 series.Points.Add (2, 4);
10 
11 // Add the series to the chart series collection.
12 
13 this.chartControl1.Series.Add (series);

 

雷達圖

雷達圖是折線圖的鍾面形式。它將每個數據系列表示為圍繞中心點的線。類別(x)變量在全天候等間隔繪制。y變量繪制為半徑,因此每個類別都有從中心輻射的自己的y軸。

在某些情況下可以使用此圖表類型

  • 當您要比較多個數據系列的合計值時。
  • 以圖形方式顯示實際績效與理想績效之間的差異,從而使用此圖表定義績效並確定優缺點。
  • 當類別具有自然循環順序(例如一年的季節)時,這也是理想的圖表。
  • 雷達圖通過將axis的Inversed屬性設置為true,還支持在反方向/順時針方向上繪制軸值

圖表類型

圖表詳情

每點的Y值數量-1。

系列數-一個。

不能與-其他任何圖表類型組合使用。

可以使用以下代碼將雷達系列添加到圖表中。

 1 // Create chart series and add data points into it.
 2 
 3 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Radar);
 4 
 5 series.Points.Add(1, 83);
 6 
 7 series.Points.Add(2, 79);
 8 
 9 series.Points.Add(3, 48);
10 
11 series.Points.Add(4, 46);
12 
13 series.Points.Add(5, 42);
14 
15 // Add the series to the chart series collection.
16 
17 this.chartControl1.Series.Add (series);

 

組合圖

組合圖表是指能夠在同一圖表中顯示多個數據系列,並且每個系列使用不同的圖表類型可視化的能力。在基本圖表中,可以將相互兼容的圖表類型組合在同一圖表區域中。

通常,它是折線圖和柱形圖的組合,它們共享一個公共的x軸,但帶有單獨的y軸,一個在圖表的兩側。

可以通過選擇要更改的數據系列,然后更改該系列的圖表類型,將現有圖表更改為組合圖表。

圖表類型

圖表詳情

系列數-一個或多個。

不能與-Pie,Bar,Polar,Radar結合使用。

可以使用以下代碼將組合系列添加到圖表中。

 1 ChartSeries series = new ChartSeries ("Series Name",ChartSeriesType.Line);
 2 
 3 series.Points.Add (0, 2);
 4 
 5 series.Points.Add (1, 1);
 6 
 7 series.Points.Add (2, 1);
 8 
 9 // Create chart series and add data points into it.
10 
11 ChartSeries series2 = new ChartSeries ("Series Name",ChartSeriesType.Column);
12 
13 series2.Points.Add (0, 1);
14 
15 series2.Points.Add (1, 3);
16 
17 series2.Points.Add (2, 4);
18 
19 // Add the series to the chart series collection.
20 
21 this.chartControl1.Series.Add (series);
22 
23 this.chartControl1.Series.Add (series2);

 

熱圖

熱圖圖是數據的圖形表示,其中二維圖中變量所取的值表示為顏色。

圖表類型

圖表詳情

每點的Y值數量-2。

系列數-一個。

不能與-任何其他圖表類型組合。

可以使用以下代碼將組合系列添加到圖表中。

 1 ChartSeries Stocks = new ChartSeries("Stocks", ChartSeriesType.HeatMap);
 2 
 3 Stocks.Points.Add(7,4, 10000);
 4 
 5 Stocks.Points.Add(6,3, 5541);
 6 
 7 Stocks.Points.Add(5,2, 6007);
 8 
 9 Stocks.Points.Add(4,2, 5022);
10 
11 Stocks.Points.Add(3,2.5, 6882);
12 
13 Stocks.Points.Add(2,1.5, 6584);
14 
15 Stocks.Points.Add(1,1, 2799);
16 
17 this.chartControl1.Series.Add(Stocks);

 

特征

下表列出了熱圖圖表的屬性及其說明。

屬性 描述

HeatMapStyle

指定熱圖的樣式。類型為矩形,垂直和水平樣式。

DisplayColorSwatch

啟用熱圖的色樣。

顯示標題

在色板的左上角啟用或禁用系列標題。

起始文字

設置顏色樣本中左標簽的文本。

EndText

設置顏色樣本中正確標簽的文本。

最低值顏色

設置熱圖圖表的最低顏色。

最高值顏色

設置熱圖圖表的最高顏色。

MiddleValueColor

設置熱圖圖表的中間值顏色。

標簽邊距

設置左側和右側標簽的邊距。
 1 //Sets the Heat map style.
 2 
 3 this.chartControl1.Series[0].ConfigItems.HeatMapItem.HeatMapStyle = ChartHeatMapLayoutStyle.Rectangular;
 4 
 5 //Display color swatch.
 6 
 7 this.chartControl1.Series[0].ConfigItems.HeatMapItem.DisplayColorSwatch = true;
 8 
 9 //Sets the Series Title.
10 
11 this.chartControl1.Series[0].ConfigItems.HeatMapItem.DisplayTitle = true;
12 
13 //Sets the left and right label text.
14 
15 this.chartControl1.Series[0].ConfigItems.HeatMapItem.StartText = "US";
16 
17 this.chartControl1.Series[0].ConfigItems.HeatMapItem.EndText = "Utah";
18 
19 //Sets the lowest, highest and middle value color.
20 
21 this.chartControl1.Series[0].ConfigItems.HeatMapItem.LowestValueColor = Color.Red;
22 
23 this.chartControl1.Series[0].ConfigItems.HeatMapItem.HighestValueColor = Color.Blue;
24 
25 this.chartControl1.Series[0].ConfigItems.HeatMapItem.MiddleValueColor = Color.Yellow;
26 
27 //Sets the value for label margin.
28 
29 this.chartControl1.Series[0].ConfigItems.HeatMapItem.LabelMargins = 15;

 

堆積圖

堆積圖與常規圖表相似,不同之處在於y值以指定的序列順序相互堆疊。堆疊圖表有助於可視化數據,這些數據是零件的總和,每個零件都是一系列的。

有不同類型的堆疊圖:

堆積面積圖
堆積條形圖
堆積柱形圖
StackedArea100圖表
StackedBar100圖表
StackedColumn100圖表

 

原文地址:https://help.syncfusion.com/windowsforms/chart/chart-types#line-charts

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM