롤리팝 분산

LollipopVariSparkline 함수를 사용하면 두 데이터 집합을 비교하고 값 간의 상대 또는 절대 분산을 계산한 다음 이러한 분산을 롤리팝 차트에 표시할 수 있습니다.

다음 수식을 통해 LollipopVariSparkline 함수를 사용하여 롤리팝 분산 스파크라인을 만들 수 있습니다. =LOLLIPOPVARISPARKLINE(plannedValue, actualValue ,index ,absolute?,reference?, mini?, maxi?, tickunit?, legend?, colorPositive?, colorNegative?, lollipopHeaderColor?, vertical?). 이 함수에는 다음과 같은 매개 변수가 있습니다. plannedValue: 예상되는 데이터 집합을 나타내는 [숫자 또는 참조]입니다. 계획된 값 영역의 전체 범위를 전달해야 합니다. 예를 들면“B2:B8“ 또는 "{0;1;2;3;4;5;6}"입니다. actualValue: 실제 데이터 집합을 나타내는 [숫자 또는 참조]입니다. 실제 값 영역의 전체 범위를 전달해야 합니다. 예를 들면 “C2:C8“ 또는 "{0;1;2;3;4;5;6}"입니다. index: plannedValue 및 actualValue의 데이터 인덱스를 나타내는 [숫자 또는 참조]입니다. 가로 도표의 경우 행 인덱스와 관련이 있고, 세로 도표의 경우 열 인덱스와 관련이 있습니다. 인덱스는 0부터 시작합니다. absolute: (선택 사항) 롤리팝 미니 그래프가 절대 분산을 나타내는지 상대 분산을 나타내는지 결정하는 [부울]입니다. reference: (선택 사항) 참조 선의 위치를 나타내는 [숫자 또는 참조]입니다(예: 0 또는 "A2"). 상대 분산에서만 사용되며, 기본값은 0입니다. mini: (선택 사항) 스파크라인의 최소값을 나타내는 [숫자 또는 참조]입니다(예: -5 또는 "A3"). 상대 분산에서만 사용되며, 기본값은 -1입니다. maxi: (선택 사항) 스파크라인의 최대값을 나타내는 [숫자 또는 참조]입니다(예: 5 또는 "A4"). 상대 분산에서만 사용되며, 기본값은 -1입니다. tickunit: (선택 사항) 눈금 단위를 나타내는 [숫자 또는 참조]입니다(예: 1 또는 "A6"). 기본값은 0입니다. legend: (선택 사항) 텍스트의 표시 여부를 나타내는 [부울]입니다. 기본값은 false입니다. colorPositive: (선택 사항) 분산이 참조보다 큰 경우의 색 구성표를 나타내는 [문자열]입니다. 기본값은 "green"입니다. colorNegative: (선택 사항) 분산이 참조보다 작은 경우의 색 구성표를 나타내는 [문자열]입니다. 기본값은 "red"입니다. lollipopHeaderColor: (선택 사항) 롤리팝 헤더 채우기 색의 색 구성표를 나타내는 [문자열]입니다. 기본값은 "black"입니다. vertical: (선택 사항) 상자의 방향이 세로 또는 가로인지 나타내는 [부울]입니다. 기본값은 false입니다.
<template> <div class="sample-tutorial"> <gc-spread-sheets class="sample-spreadsheets" @workbookInitialized="initSpread"> <gc-worksheet> </gc-worksheet> <gc-worksheet> </gc-worksheet> </gc-spread-sheets> </div> </template> <script> import Vue from 'vue'; import '@mescius/spread-sheets-vue'; import GC from '@mescius/spread-sheets'; import '@mescius/spread-sheets-resources-ko'; GC.Spread.Common.CultureManager.culture("ko-kr"); import './styles.css'; let App = Vue.extend({ name: "app", data: function () { return { spread: null }; }, methods: { initHorizontalSheet(spread) { let sheet = spread.getActiveSheet(); sheet.setFormula(1, 3, '=LOLLIPOPVARISPARKLINE($C$2:$C$13,$B$2:$B$13,SEQUENCE(12,1,0,1),true,0,,,0,true,"#a0ba25","#b46624","#ffa501")'); sheet.setFormula(1, 4, '=LOLLIPOPVARISPARKLINE($C$2:$C$13,$B$2:$B$13,SEQUENCE(12,1,0,1),false,0,,,0,true,"#a0ba25","#b46624","black")'); }, initVerticalSheet(spread) { let sheet2 = spread.getSheet(1); sheet2.setFormula(4, 1, '=LOLLIPOPVARISPARKLINE($B$2:$I$2,$B$3:$I$3,SEQUENCE(1,8,0,1),false,0,-0.3,0.3,1000,true,"#c0c0c0","#c0c0c0","#ffa501",true)'); sheet2.setFormula(3, 1, '=LOLLIPOPVARISPARKLINE($B$2:$I$2,$B$3:$I$3,SEQUENCE(1,8,0,1),true,0,,,1000,true,"#c0c0c0","#c0c0c0","#ffa501",true)'); }, initSpread(spread) { this.spread = spread; spread.fromJSON(IncomeStatement); spread.options.allowDynamicArray = true; spread.suspendPaint(); this.initHorizontalSheet(spread); this.initVerticalSheet(spread); spread.resumePaint(); } } }); new Vue({ render: h => h(App) }).$mount('#app'); </script>
<!doctype html> <html style="height:100%;font-size:14px;"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="$DEMOROOT$/ko/vue/node_modules/@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css"> <script src="$DEMOROOT$/spread/source/data/PlannedAndActualIncomeStatement.js" type="text/javascript"></script> <!-- SystemJS --> <script src="$DEMOROOT$/ko/vue/node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('./src/app.vue'); System.import('$DEMOROOT$/ko/lib/vue/license.js'); </script> </head> <body> <div id="app" style="height: 100%;"></div> </body> </html>
.sample { position: relative; height: 100%; overflow: auto; } .sample::after { display: block; content: ""; clear: both; } .sample-tutorial { position: relative; height: 100%; overflow: hidden; } .sample-spreadsheets { height: 100%; width: 100%; } .options-container { float: right; width: 280px; padding: 12px; height: 100%; box-sizing: border-box; background: #fbfbfb; overflow: auto; } .option-row { font-size: 14px; padding: 5px; margin-top: 10px; } .option-group { margin-bottom: 6px; } label { display: inline-block; min-width: 90px; margin-bottom: 6px; } select { padding: 4px 6px; box-sizing: border-box; } body { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }
(function (global) { System.config({ transpiler: 'plugin-babel', babelOptions: { es2015: true }, meta: { '*.css': { loader: 'css' }, '*.vue': { loader: 'vue-loader' } }, paths: { // paths serve as alias 'npm:': 'node_modules/' }, // map tells the System loader where to look for things map: { '@mescius/spread-sheets': 'npm:@mescius/spread-sheets/index.js', '@mescius/spread-sheets-vue': 'npm:@mescius/spread-sheets-vue/index.js', '@mescius/spread-sheets-resources-ko': 'npm:@mescius/spread-sheets-resources-ko/index.js', '@grapecity/jsob-test-dependency-package/react-components': 'npm:@grapecity/jsob-test-dependency-package/react-components/index.js', 'jszip': 'npm:jszip/dist/jszip.js', 'css': 'npm:systemjs-plugin-css/css.js', 'vue': 'npm:vue/dist/vue.min.js', 'vue-loader': 'npm:systemjs-vue-browser/index.js', 'tiny-emitter': 'npm:tiny-emitter/index.js', 'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js', 'systemjs-babel-build':'npm:systemjs-plugin-babel/systemjs-babel-browser.js' }, // packages tells the System loader how to load when no filename and/or no extension packages: { src: { defaultExtension: 'js' }, rxjs: { defaultExtension: 'js' }, "node_modules": { defaultExtension: 'js' } } }); })(this);