Hacim Yüksek Düşük Kapanış(VYDK) Hisse Senedi Grafiği Oluşturma
Olası Kullanım Senaryoları
İnceleyeceğimiz üçüncü hisse senedi grafiği Hacim Yüksek Düşük Kapanış grafik. Yine doğru sıraya sahip verilere sahip olmanın önemli olduğunu tekrarlamak önemlidir. Veri tablonuzu yeniden düzenlemeniz gerekiyorsa, şematınızı kurmadan önce bunu yapmalısınız. Bu grafik, ilk (kategori) sütunun hemen ardından bir hacim sütunu içerir ve grafikler, bu hacmi gösteren birincil eksende bir sütun grafiği içerirken fiyatlar ikincil eksene taşınır.
Hacim-Yüksek-Düşük-Kapanış (VYDK) hisse senedi grafiği
Örnek Kod
Aşağıdaki örnek kod örnek Excel dosyasını yükler ve çıktı Excel dosyasını oluşturur.
// Create an instance of Workbook | |
Workbook workbook = new Workbook("Volume-High-Low-Close.xlsx"); | |
// Access the first worksheet. | |
Worksheet worksheet = workbook.Worksheets[0]; | |
//Create High-Low-Close-Stock Chart | |
int pieIdx = worksheet.Charts.Add(ChartType.StockVolumeHighLowClose, 5, 6, 20, 12); | |
// Retrieve the Chart object | |
Chart chart = worksheet.Charts[pieIdx]; | |
// Set the legend can be showed | |
chart.ShowLegend = true; | |
// Set the chart title name | |
chart.Title.Text = "Volume-High-Low-Close Stock"; | |
// Set the Legend at the bottom of the chart area | |
chart.Legend.Position = LegendPositionType.Bottom; | |
// Set data range | |
chart.SetChartDataRange("A1:E9", true); | |
// Set category data | |
chart.NSeries.CategoryData = "A2:A9"; | |
// Set Color for the first series(Volume) data | |
chart.NSeries[0].Area.ForegroundColor = Color.FromArgb(79, 129,189); | |
// Fill the PlotArea area with nothing | |
chart.PlotArea.Area.FillFormat.FillType = FillType.None; | |
// Save the Excel file | |
workbook.Save("out.xlsx"); |