A stock chart can show fluctuations in data, representing the fluctuations for stock (as the name implies), daily rainfall, annual temperatures, or other types of fluctuating data.
Spread.Sheets supports High-Low-Close, Open-High-Low-Close, Volume-High-Low-Close, and Volume-Open-High-Low-Close chart types. Use the GC.Spread.Sheets.Charts.ChartType.stockHLC to get the chart type.
A High-Low-Close chart can be added to Spread, and the chart style can be changed using the chart API. The stockHLC chart requires that the data be organized as high, low, and close, with the close value in between the high and low values.
var chart = sheet.charts.add('stockHLC', GC.Spread.Sheets.Charts.ChartType.stockHLC, 0, 100, 400, 300, 'A1:D4')
var title = chart.title()
The Open-High-Low-Close chart adds the Open data to the stockHLC data. The values are organized as: open, high, low, and then close.
Volume-High-Low-Close chart can be added to Spread, and the chart style can be changed using the chart API. The stockVHLC adds the v1olume data to the stockVHLC data. The values are organized in the following order: volume, high, low, and then close. The volume series' chart type is columnStacked, and you can change that series' style.
var chart = sheet.charts.add('stockVHLC', GC.Spread.Sheets.Charts.ChartType.stockVHLC, 0, 100, 400, 300, 'A1:D4');
var series = chart.series().get();
var ser = series;
var ser.backColor = 'red';
The Volume-Open-High-Low-Close chart adds all the data. The values are organized in the following the order: column, open, high, low, and then close.