[{"id":"7720ca38-fc98-4fd8-a3a5-3c0e730c3c72","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"247ded67-b050-4436-be40-fe7b0eeabef7","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"9a8c377f-1f1e-476e-b487-c2339da9bed3","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"5e8e6db2-89b9-4184-bbdc-301ee676869e","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"e04b598e-b0d8-4054-bdac-5143d90b3d51","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"edb028d0-a8cc-42b2-acda-42a5515729f0","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"2adde444-20a6-43d7-8896-2b445877327a","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"6ab8ced2-6c7a-41b6-b861-ba066bd40f40","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"0c34aedd-80a3-470b-a0f6-c327a4346be7","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"717a5892-fa23-499b-a61d-cff228943aaf","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"bd9be971-69fc-4793-ad6d-234be7a93048","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"a1e8d38f-43d8-4b3e-b747-3fbf7656fcd9","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"d6995fdf-76ee-421f-9e7a-3fb324d14bbb","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"64fa3155-4543-4acd-83b7-f9860fd46673","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"698413bd-0b16-4287-baec-644d98a411d1","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7e4393a0-21ef-438b-981b-325b64db5baa","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]}]
MonthSparkline の数式とセル値を使用して、月スパークラインを作成できます。
月スパークラインは、6*7個の四角形で構成されます。水平方向は月の週数を(左から右に向かって第1週~第6週)、垂直方向は曜日を(上から下に向かって日曜日~月曜日)それぞれ表します。
月スパークラインの数式には、次のオプションを使用できます。
オプション | 説明 |
---|---|
year | 4桁の年(「2017」など) |
month | 月の番号(「3」など)。1を基準とした番号です(1月 = 1)。 |
dataRange | 1列目が日付を、2列目が数値を表すセル範囲の参照(「A1:B400」など) |
emptyColor | 値がない日、または0値の日を表す色文字列(「lightgray」など) |
startColor | 最小値の日を表す色文字列(「lightgreen」など) |
middleColor | 最小値と最大値との平均値の日を表す色文字列(「green」など) |
endColor | 最大値の日を表す色文字列(「darkgreen」など) |
colorRange | データを色文字列で表す範囲への参照 |
月スパークラインの数式には、次の書式を使用します。
=MONTHSPARKLINE(year, month, dataRange, emptyColor, startColor, middleColor, endColor)
=MONTHSPARKLINE(year, month, dataRange, colorRange)
次のサンプルコードは、月スパークラインを作成します。
for (var rowIndex = 1; rowIndex <= 31; rowIndex++) {
activeSheet.setValue(rowIndex, 0, new Date(2017, 0, rowIndex));
}
activeSheet.setValue(1,1,10, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(2,1,5, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(3,1,98, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(4,1,50, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(5,1,75, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(6,1,25, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(7,1,65, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(8,1,30, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(9,1,22, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(10,1,82, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(11,1,89, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(12,1,43, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(13,1,15, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(14,1,12, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(15,1,63, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(16,1,54, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(17,1,77, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(18,1,39, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(19,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(20,1,65, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(21,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(22,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(23,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(24,1,18, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(25,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(26,1,42, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(27,1,21, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(28,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(29,1,99, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(30,1,20, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setValue(31,1,9, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setFormula(6, 2, '=MONTHSPARKLINE(2017,1,A2:B32,"yellow","lightgreen","green","darkgreen")');
spread.resumePaint();