轉(zhuǎn)帖|使用教程|編輯:鮑佳佳|2020-08-12 09:30:39.370|閱讀 308 次
概述:您可以根據(jù)一個(gè)范圍單元格的數(shù)據(jù)在某一個(gè)單元格中創(chuàng)建一張縮略圖。也可以創(chuàng)建柱形圖,折線圖,盈虧圖這三類(lèi)基本迷你圖,也可以創(chuàng)建自定義的迷你圖。本文主要對(duì)創(chuàng)建子彈函數(shù)迷你圖進(jìn)行詳細(xì)說(shuō)明。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷(xiāo)售中 >>
相關(guān)鏈接:
SpreadJS是一款基于HTML5的純前端表格控件,兼容450種以上的Excel公式,具備“高性能、跨平臺(tái)、與 Excel 高度兼容”的產(chǎn)品特性,備受華為、蘇寧易購(gòu)、天弘基金、遠(yuǎn)光軟件等各領(lǐng)域龍頭企業(yè)的青睞,并被中國(guó)軟件行業(yè)協(xié)會(huì)認(rèn)定為“中國(guó)優(yōu)秀軟件產(chǎn)品”。
創(chuàng)建子彈函數(shù)迷你圖
子彈函數(shù)迷你圖是一種可以在一小片地方展示大量數(shù)據(jù)的迷你圖。
通過(guò)BulletSparkline函數(shù)可以創(chuàng)建子彈函數(shù)迷你圖
BulletSparkline函數(shù)有以下參數(shù):
你可以通過(guò)子彈函數(shù)創(chuàng)建一個(gè)子彈函數(shù)迷你圖,例如
=BULLETSPARKLINE(measure, target, maxi, good?, bad?, forecast?, tickunit?, colorScheme?, vertical?)
下面代碼展示了如何創(chuàng)建子彈函數(shù)迷你圖
activeSheet.addSpan(0, 0, 1, 4); activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).value("Employee KPI").font("20px Arial").hAlign(GC.Spread.Sheets.HorizontalAlign.center).vAlign(GC.Spread.Sheets.VerticalAlign.center); var table1 = activeSheet.tables.add("table1", 1, 0, 7, 4, GC.Spread.Sheets.Tables.TableThemes.light12); table1.filterButtonVisible(false); activeSheet.setValue(1, 0, "Name"); activeSheet.setValue(1, 1, "Forecast"); activeSheet.setValue(1, 2, "Actuality"); activeSheet.setValue(1, 3, "Diagram"); activeSheet.setValue(2, 0, "Employee 1"); activeSheet.setValue(2, 1, 6); activeSheet.setValue(2, 2, 6); activeSheet.setValue(3, 0, "Employee 2"); activeSheet.setValue(3, 1, 8); activeSheet.setValue(3, 2, 7); activeSheet.setValue(4, 0, "Employee 3"); activeSheet.setValue(4, 1, 6); activeSheet.setValue(4, 2, 4); activeSheet.setValue(5, 0, "Employee 4"); activeSheet.setValue(5, 1, 7); activeSheet.setValue(5, 2, 9); activeSheet.setValue(6, 0, "Employee 5"); activeSheet.setValue(6, 1, 6); activeSheet.setValue(6, 2, 8); activeSheet.setValue(7, 0, "Employee 6"); activeSheet.setValue(7, 1, 8); activeSheet.setValue(7, 2, 7); activeSheet.setFormula(2, 3, '=BULLETSPARKLINE(C3,7,10,8,5,B3,1'); activeSheet.setFormula(3, 3, '=BULLETSPARKLINE(C4,7,10,8,5,B4,1'); activeSheet.setFormula(4, 3, '=BULLETSPARKLINE(C5,7,10,8,5,B5,1'); activeSheet.setFormula(5, 3, '=BULLETSPARKLINE(C6,7,10,8,5,B6,1'); activeSheet.setFormula(6, 3, '=BULLETSPARKLINE(C7,7,10,8,5,B7,1'); activeSheet.setFormula(7, 3, '=BULLETSPARKLINE(C8,7,10,8,5,B8,1'); activeSheet.setRowHeight(0, 50); for (var i = 1; i < 8; i++) { activeSheet.setRowHeight(i, 40); } activeSheet.setColumnWidth(0, 100); activeSheet.setColumnWidth(1, 100); activeSheet.setColumnWidth(2, 100); activeSheet.setColumnWidth(3, 200);
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: