ボックスプロットスパークライン

ボックスプロットスパークラインでは、四分位数を使用してデータを表示するため、データセットを視覚的に素早く検証できます。

数式にBoxPlotSparkline関数を使用することで、ボックスプロットスパークラインを作成できます。構文は次のとおりです。=BOXPLOTSPARKLINE(points, boxPlotClass?, showAverage?, scaleStart?, scaleEnd?, acceptableStart?, acceptableEnd?, colorScheme?, style?, vertical?) 有効なパラメータは次のとおりです。 points: 表示するすべての値を保持するセル範囲を表す参照。「A1:A4」など。 boxPlotClass: (オプション)ボックスプロットのクラス。次のいずれかです。 5ns(既定値) 7ns tukey bowley sigma3 showAverage: (オプション)平均値を表示するかどうかを表すブール値。デフォルト値はfalseです。 scaleStart: (オプション)スパークラインの下限を表す数値または参照。「1」、「A6」など。デフォルト値は、すべての値の最小値です。 scaleEnd: (オプション)スパークラインの上限を表す数値または参照。「8」、「A7」など。デフォルト値は、すべての値の最大値です。 acceptableStart: (オプション)許容範囲を示す直線の開始位置を表す数値または参照。「3」、「A8」など。デフォルト値はnullです。 acceptableEnd: (オプション)許容範囲を示す直線の終了位置を表す数値または参照。「5」、「A9」など。デフォルト値はnullです。 colorScheme: (オプション)スパークラインのボックスの色を表す文字列。デフォルト値は「#D2D2D2」です。 style: (オプション)ボックスプロットスパークラインのスタイルを表す数値または参照。次のいずれかです。 0:(既定値)クラシックスタイル:ひげを直線で、外れ値を円で表示します。 1: ネオスタイル:ひげを長方形で、外れ値を直線で表示します。 vertical: (オプション)スパークラインを垂直に表示するかどうかを表すブール値。デフォルト値はfalseです。
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import GC from '@mescius/spread-sheets'; import '@mescius/spread-sheets-resources-ja'; GC.Spread.Common.CultureManager.culture("ja-jp"); import './styles.css'; import { AppFunc } from './app-func'; // import { App } from './app-class'; // 1. Functional Component sample ReactDOM.render(<AppFunc />, document.getElementById('app')); // 2. Class Component sample // ReactDOM.render(<App />, document.getElementById('app'));
import * as React from 'react'; import GC from '@mescius/spread-sheets'; import { SpreadSheets, Worksheet } from '@mescius/spread-sheets-react'; let spread = null; export function AppFunc() { const [boxPlotOption, setBoxPlotOption] = React.useState({ scaleStart: 0, scaleEnd: 100, acceptableStart: 20, acceptableEnd: 80, colorScheme: "#DDDDDD" }); const setScaleStart = (e) => { setBoxPlotOption({ ...boxPlotOption, scaleStart: e.target.value }); } const setScaleEnd = (e) => { setBoxPlotOption({ ...boxPlotOption, scaleEnd: e.target.value }); } const setAcceptableStart = (e) => { setBoxPlotOption({ ...boxPlotOption, acceptableStart: e.target.value }); } const setAcceptableEnd = (e) => { setBoxPlotOption({ ...boxPlotOption, acceptableEnd: e.target.value }); } const setColorScheme = (e) => { setBoxPlotOption({ ...boxPlotOption, colorScheme: e.target.value }); } const initHorizontalSparkline = (sheet, name) => { sheet.suspendPaint(); sheet.name(name); sheet.options.allowCellOverflow = true; sheet.addSpan(1, 1, 1, 14); sheet.getCell(1, 1).value("The Company Sales in 2014") .font("20px Arial").vAlign(GC.Spread.Sheets.VerticalAlign.center) .foreColor("white").backColor("#999999"); sheet.getRange(2, 1, 1, 14).vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 12px Arial") .backColor("#efefef"); sheet.setValue(2, 1, "Region"); sheet.setValue(2, 14, "Actual Sales (mn)"); for (var i = 2; i < 14; i++) { sheet.setValue(2, i, new Date(2014, i - 2, 1)); sheet.setColumnWidth(i, 40); sheet.setFormatter(2, i, "mmm"); } sheet.setArray(3, 1, [ ["Alabama", 68, 81, 21, 69, 39, 28, 63, 73, 80, 95, 46, 37], ["Alaska", 37, 57, 99, 47, 95, 86, 44, 82, 89, 61, 45, 75], ["Arizona", 61, 42, 97, 12, 95, 25, 29, 44, 64, 39, 59, 35], ["Idaho", 16, 51, 45, 82, 72, 51, 100, 98, 92, 89, 44, 68], ["Indiana", 26, 46, 74, 58, 40, 32, 58, 75, 39, 58, 97, 39], ["Ohio", 37, 68, 20, 35, 65, 87, 39, 25, 79, 15, 91, 42], ["Oklahoma", 36, 43, 31, 63, 95, 26, 19, 88, 25, 78, 98, 53], ["Oregon", 28, 71, 68, 48, 19, 56, 88, 54, 28, 25, 92, 75], ["Vermon", 85, 25, 31, 34, 75, 82, 50, 27, 76, 72, 25, 100]]); for (var index = 3; index < 12; index++) { sheet.setFormula(index, 14, '=BOXPLOTSPARKLINE($C' + (index + 1) + ':$N' + (index + 1) + ',"5ns",true,0,100,20,80,"#D3D3D3",0,false)'); } for (let r = 1; r < 12; r++) { sheet.setRowHeight(r, 30); } sheet.setColumnWidth(14, 250); sheet.resumePaint(); } const initVerticalSparkline = (sheet, name) => { sheet.suspendPaint(); sheet.name(name); sheet.addSpan(1, 1, 1, 4); sheet.getCell(1, 1).value("Scores by Teaching Method").vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 14px Arial") .foreColor("white").backColor("#999999"); sheet.getRange(2, 1, 1, 4).vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 12px Arial") .backColor("#efefef"); sheet.setValue(2, 1, "Student ID"); sheet.setValue(2, 2, "Method 1"); sheet.setValue(2, 3, "Method 2"); sheet.setValue(2, 4, "Method 3"); sheet.getCell(23, 6).value("Method 1").font("bold 10px Arial"); sheet.getCell(23, 7).value("Method 2").font("bold 10px Arial"); sheet.getCell(23, 8).value("Method 3").font("bold 10px Arial"); let score = [ { id: 1, methodOne: 65, methodTwo: 60, methodThree: 98 }, { id: 2, methodOne: 91, methodTwo: 70, methodThree: 99 }, { id: 3, methodOne: 70, methodTwo: 86, methodThree: 92 }, { id: 4, methodOne: 62, methodTwo: 62, methodThree: 78 }, { id: 5, methodOne: 98, methodTwo: 79, methodThree: 71 }, { id: 6, methodOne: 89, methodTwo: 99, methodThree: 68 }, { id: 7, methodOne: 85, methodTwo: 100, methodThree: 88 }, { id: 8, methodOne: 65, methodTwo: 78, methodThree: 74 }, { id: 9, methodOne: 65, methodTwo: 66, methodThree: 85 }, { id: 10, methodOne: 65, methodTwo: 84, methodThree: 80 }, { id: 11, methodOne: 65, methodTwo: 98, methodThree: 79 }, { id: 12, methodOne: 65, methodTwo: 87, methodThree: 50 }, { id: 13, methodOne: 51, methodTwo: 68, methodThree: 64 }, { id: 14, methodOne: 45, methodTwo: 78, methodThree: 73 }, { id: 15, methodOne: 67, methodTwo: 81, methodThree: 88 }, { id: 16, methodOne: 87, methodTwo: 83, methodThree: 85 }, { id: 17, methodOne: 72, methodTwo: 84, methodThree: 84 }, { id: 18, methodOne: 74, methodTwo: 82, methodThree: 86 }, { id: 19, methodOne: 85, methodTwo: 45, methodThree: 92 }, { id: 20, methodOne: 65, methodTwo: 60, methodThree: 69 } ]; for (let i = 0, len = score.length; i < len; i++) { let student = score[i]; sheet.setValue(i + 3, 1, student.id); sheet.setValue(i + 3, 2, student.methodOne); sheet.setValue(i + 3, 3, student.methodTwo); sheet.setValue(i + 3, 4, student.methodThree); } for (let index = 0; index < 4; index++) { sheet.setColumnWidth(index + 1, 100); } //sparklines sheet.addSpan(3, 6, 20, 1); sheet.addSpan(3, 7, 20, 1); sheet.addSpan(3, 8, 20, 1); sheet.setFormula(3, 6, '=BOXPLOTSPARKLINE(C4:C23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.setFormula(3, 7, '=BOXPLOTSPARKLINE(D4:D23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.setFormula(3, 8, '=BOXPLOTSPARKLINE(E4:E23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.resumePaint(); } const initSpread = (currSpread) => { spread = currSpread; spread.setSheetCount(2); spread.options.newTabVisible = false; initHorizontalSparkline(spread.sheets[0], "Horizontal"); initVerticalSparkline(spread.sheets[1], "Vertical"); } const btnChangeSettingClicked = (e) => { let sheet = spread.getActiveSheet(); if (spread.getActiveSheetIndex() == 0) { for (var index = 3; index < 12; index++) { sheet.setFormula(index, 14, '=BOXPLOTSPARKLINE($C' + (index + 1) + ':$N' + (index + 1) + ',"5ns",true,' + boxPlotOption.scaleStart + ',' + boxPlotOption.scaleEnd + ',' + boxPlotOption.acceptableStart + ',' + boxPlotOption.acceptableEnd + ',"' + boxPlotOption.colorScheme + '",0,FALSE)'); } } else if (spread.getActiveSheetIndex() == 1) { sheet.setFormula(3, 6, '=BOXPLOTSPARKLINE(C4:C23,"5ns",true,' + boxPlotOption.scaleStart + ',' + boxPlotOption.scaleEnd + ',' + boxPlotOption.acceptableStart + ',' + boxPlotOption.acceptableEnd + ',"' + boxPlotOption.colorScheme + '",0,TRUE)'); sheet.setFormula(3, 7, '=BOXPLOTSPARKLINE(D4:D23,"5ns",true,' + boxPlotOption.scaleStart + ',' + boxPlotOption.scaleEnd + ',' + boxPlotOption.acceptableStart + ',' + boxPlotOption.acceptableEnd + ',"' + boxPlotOption.colorScheme + '",0,TRUE)'); sheet.setFormula(3, 8, '=BOXPLOTSPARKLINE(E4:E23,"5ns",true,' + boxPlotOption.scaleStart + ',' + boxPlotOption.scaleEnd + ',' + boxPlotOption.acceptableStart + ',' + boxPlotOption.acceptableEnd + ',"' + boxPlotOption.colorScheme + '",0,TRUE)'); } } return ( <div class="sample-tutorial"> <div class="sample-spreadsheets"> <SpreadSheets workbookInitialized={spread => initSpread(spread)} newTabVisible={false}> <Worksheet allowCellOverflow={true}> </Worksheet> <Worksheet></Worksheet> </SpreadSheets> </div> <Panel panelInfo={boxPlotOption} setScaleStart={(e) => { setScaleStart(e) }} setScaleEnd={(e) => { setScaleEnd(e) }} setAcceptableStart={(e) => { setAcceptableStart(e) }} setAcceptableEnd={(e) => { setAcceptableEnd(e) }} setColorScheme={(e) => { setColorScheme(e) }} btnChangeSettingClicked={(e) => { btnChangeSettingClicked(e) }} /> </div> ); } function Panel(props) { const { panelInfo, setScaleStart, setScaleEnd, setAcceptableStart, setAcceptableEnd, setColorScheme, btnChangeSettingClicked } = props; return ( <div class="options-container"> <div> <label><b>設定:</b></label> </div> <hr /> <div class="option-row"> <label for="scaleStart">販売範囲の開始:</label> <input type="text" id="scaleStart" style={{ margin: "0 20px 0 6px" }} value={panelInfo.scaleStart} onChange={(e) => { setScaleStart(e) }} /> </div> <div class="option-row"> <label for="scaleEnd">販売範囲の終了:</label> <input type="text" id="scaleEnd" style={{ margin: "0 20px 0 6px" }} value={panelInfo.scaleEnd} onChange={(e) => { setScaleEnd(e) }} /> </div> <div class="option-row"> <label for="acceptableStart">予想される販売範囲の開始:</label> <input type="text" id="acceptableStart" style={{ margin: "0 20px 0 6px" }} value={panelInfo.acceptableStart} onChange={(e) => { setAcceptableStart(e) }} /> </div> <div class="option-row"> <label for="acceptableEnd">予想される販売範囲の終了:</label> <input type="text" id="acceptableEnd" style={{ margin: "0 20px 0 6px" }} value={panelInfo.acceptableEnd} onChange={(e) => { setAcceptableEnd(e) }} /> </div> <div class="option-row"> <label for="colorScheme">カラースキーム:</label> <select id="colorScheme" style={{ margin: "0 20px 0 6px" }} value={panelInfo.colorScheme} onChange={(e) => { setColorScheme(e) }} > <option value="#DDDDDD" selected>LightGrey</option> <option value="#BBBBBB">Grey</option> <option value="#999999">DarkGrey</option> <option value="#82BC00">Green</option> <option value="#000000">Black</option> <option value="#F7A711">Orange</option> </select> </div> <hr /> <div class="option-row"> <div class="option"> <button onClick={(e) => { btnChangeSettingClicked(e) }}>設定を変更する</button> </div> </div> </div> ); }
import * as React from 'react'; import GC from '@mescius/spread-sheets'; import { SpreadSheets, Worksheet } from '@mescius/spread-sheets-react'; const Component = React.Component; export class App extends Component { constructor(props) { super(props); this.spread = null; this.state = { scaleStart: 0, scaleEnd: 100, acceptableStart: 20, acceptableEnd: 80, colorScheme: "#DDDDDD" } } render() { return ( <div class="sample-tutorial"> <div class="sample-spreadsheets"> <SpreadSheets workbookInitialized={spread => this.initSpread(spread)} newTabVisible={false}> <Worksheet allowCellOverflow={true}> </Worksheet> <Worksheet></Worksheet> </SpreadSheets> </div> <Panel panelInfo={this.state} setScaleStart={(e) => { this.setScaleStart(e) }} setScaleEnd={(e) => { this.setScaleEnd(e) }} setAcceptableStart={(e) => { this.setAcceptableStart(e) }} setAcceptableEnd={(e) => { this.setAcceptableEnd(e) }} setColorScheme={(e) => { this.setColorScheme(e) }} btnChangeSettingClicked={(e) => { this.btnChangeSettingClicked(e) }} /> </div> ); } setScaleStart(e) { this.setState({ scaleStart: e.target.value }); } setScaleEnd(e) { this.setState({ scaleEnd: e.target.value }); } setAcceptableStart(e) { this.setState({ acceptableStart: e.target.value }); } setAcceptableEnd(e) { this.setState({ acceptableEnd: e.target.value }); } setColorScheme(e) { this.setState({ colorScheme: e.target.value }); } initHorizontalSparkline(sheet, name) { sheet.suspendPaint(); sheet.name(name); sheet.options.allowCellOverflow = true; sheet.addSpan(1, 1, 1, 14); sheet.getCell(1, 1).value("The Company Sales in 2014") .font("20px Arial").vAlign(GC.Spread.Sheets.VerticalAlign.center) .foreColor("white").backColor("#999999"); sheet.getRange(2, 1, 1, 14).vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 12px Arial") .backColor("#efefef"); sheet.setValue(2, 1, "Region"); sheet.setValue(2, 14, "Actual Sales (mn)"); for (var i = 2; i < 14; i++) { sheet.setValue(2, i, new Date(2014, i - 2, 1)); sheet.setColumnWidth(i, 40); sheet.setFormatter(2, i, "mmm"); } sheet.setArray(3, 1, [ ["Alabama", 68, 81, 21, 69, 39, 28, 63, 73, 80, 95, 46, 37], ["Alaska", 37, 57, 99, 47, 95, 86, 44, 82, 89, 61, 45, 75], ["Arizona", 61, 42, 97, 12, 95, 25, 29, 44, 64, 39, 59, 35], ["Idaho", 16, 51, 45, 82, 72, 51, 100, 98, 92, 89, 44, 68], ["Indiana", 26, 46, 74, 58, 40, 32, 58, 75, 39, 58, 97, 39], ["Ohio", 37, 68, 20, 35, 65, 87, 39, 25, 79, 15, 91, 42], ["Oklahoma", 36, 43, 31, 63, 95, 26, 19, 88, 25, 78, 98, 53], ["Oregon", 28, 71, 68, 48, 19, 56, 88, 54, 28, 25, 92, 75], ["Vermon", 85, 25, 31, 34, 75, 82, 50, 27, 76, 72, 25, 100]]); for (var index = 3; index < 12; index++) { sheet.setFormula(index, 14, '=BOXPLOTSPARKLINE($C' + (index + 1) + ':$N' + (index + 1) + ',"5ns",true,0,100,20,80,"#D3D3D3",0,false)'); } for (let r = 1; r < 12; r++) { sheet.setRowHeight(r, 30); } sheet.setColumnWidth(14, 250); sheet.resumePaint(); } initVerticalSparkline(sheet, name) { sheet.suspendPaint(); sheet.name(name); sheet.addSpan(1, 1, 1, 4); sheet.getCell(1, 1).value("Scores by Teaching Method").vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 14px Arial") .foreColor("white").backColor("#999999"); sheet.getRange(2, 1, 1, 4).vAlign(GC.Spread.Sheets.VerticalAlign.center) .font("bold 12px Arial") .backColor("#efefef"); sheet.setValue(2, 1, "Student ID"); sheet.setValue(2, 2, "Method 1"); sheet.setValue(2, 3, "Method 2"); sheet.setValue(2, 4, "Method 3"); sheet.getCell(23, 6).value("Method 1").font("bold 10px Arial"); sheet.getCell(23, 7).value("Method 2").font("bold 10px Arial"); sheet.getCell(23, 8).value("Method 3").font("bold 10px Arial"); let score = [ { id: 1, methodOne: 65, methodTwo: 60, methodThree: 98 }, { id: 2, methodOne: 91, methodTwo: 70, methodThree: 99 }, { id: 3, methodOne: 70, methodTwo: 86, methodThree: 92 }, { id: 4, methodOne: 62, methodTwo: 62, methodThree: 78 }, { id: 5, methodOne: 98, methodTwo: 79, methodThree: 71 }, { id: 6, methodOne: 89, methodTwo: 99, methodThree: 68 }, { id: 7, methodOne: 85, methodTwo: 100, methodThree: 88 }, { id: 8, methodOne: 65, methodTwo: 78, methodThree: 74 }, { id: 9, methodOne: 65, methodTwo: 66, methodThree: 85 }, { id: 10, methodOne: 65, methodTwo: 84, methodThree: 80 }, { id: 11, methodOne: 65, methodTwo: 98, methodThree: 79 }, { id: 12, methodOne: 65, methodTwo: 87, methodThree: 50 }, { id: 13, methodOne: 51, methodTwo: 68, methodThree: 64 }, { id: 14, methodOne: 45, methodTwo: 78, methodThree: 73 }, { id: 15, methodOne: 67, methodTwo: 81, methodThree: 88 }, { id: 16, methodOne: 87, methodTwo: 83, methodThree: 85 }, { id: 17, methodOne: 72, methodTwo: 84, methodThree: 84 }, { id: 18, methodOne: 74, methodTwo: 82, methodThree: 86 }, { id: 19, methodOne: 85, methodTwo: 45, methodThree: 92 }, { id: 20, methodOne: 65, methodTwo: 60, methodThree: 69 } ]; for (let i = 0, len = score.length; i < len; i++) { let student = score[i]; sheet.setValue(i + 3, 1, student.id); sheet.setValue(i + 3, 2, student.methodOne); sheet.setValue(i + 3, 3, student.methodTwo); sheet.setValue(i + 3, 4, student.methodThree); } for (let index = 0; index < 4; index++) { sheet.setColumnWidth(index + 1, 100); } //sparklines sheet.addSpan(3, 6, 20, 1); sheet.addSpan(3, 7, 20, 1); sheet.addSpan(3, 8, 20, 1); sheet.setFormula(3, 6, '=BOXPLOTSPARKLINE(C4:C23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.setFormula(3, 7, '=BOXPLOTSPARKLINE(D4:D23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.setFormula(3, 8, '=BOXPLOTSPARKLINE(E4:E23,"5ns",true,0,100,20,80,"#DDDDDD",0, true)'); sheet.resumePaint(); } initSpread(spread) { this.spread = spread; spread.setSheetCount(2); spread.options.newTabVisible = false; this.initHorizontalSparkline(spread.sheets[0], "Horizontal"); this.initVerticalSparkline(spread.sheets[1], "Vertical"); } btnChangeSettingClicked(e) { let sheet = this.spread.getActiveSheet(); if (this.spread.getActiveSheetIndex() == 0) { for (var index = 3; index < 12; index++) { sheet.setFormula(index, 14, '=BOXPLOTSPARKLINE($C' + (index + 1) + ':$N' + (index + 1) + ',"5ns",true,' + this.state.scaleStart + ',' + this.state.scaleEnd + ',' + this.state.acceptableStart + ',' + this.state.acceptableEnd + ',"' + this.state.colorScheme + '",0,FALSE)'); } } else if (this.spread.getActiveSheetIndex() == 1) { sheet.setFormula(3, 6, '=BOXPLOTSPARKLINE(C4:C23,"5ns",true,' + this.state.scaleStart + ',' + this.state.scaleEnd + ',' + this.state.acceptableStart + ',' + this.state.acceptableEnd + ',"' + this.state.colorScheme + '",0,TRUE)'); sheet.setFormula(3, 7, '=BOXPLOTSPARKLINE(D4:D23,"5ns",true,' + this.state.scaleStart + ',' + this.state.scaleEnd + ',' + this.state.acceptableStart + ',' + this.state.acceptableEnd + ',"' + this.state.colorScheme + '",0,TRUE)'); sheet.setFormula(3, 8, '=BOXPLOTSPARKLINE(E4:E23,"5ns",true,' + this.state.scaleStart + ',' + this.state.scaleEnd + ',' + this.state.acceptableStart + ',' + this.state.acceptableEnd + ',"' + this.state.colorScheme + '",0,TRUE)'); } } } class Panel extends Component { constructor(props) { super(props); } render() { const { panelInfo, setScaleStart, setScaleEnd, setAcceptableStart, setAcceptableEnd, setColorScheme, btnChangeSettingClicked } = this.props; return ( <div class="options-container"> <div> <label><b>設定:</b></label> </div> <hr /> <div class="option-row"> <label for="scaleStart">販売範囲の開始:</label> <input type="text" id="scaleStart" style={{ margin: "0 20px 0 6px" }} value={panelInfo.scaleStart} onChange={(e) => { setScaleStart(e) }} /> </div> <div class="option-row"> <label for="scaleEnd">販売範囲の終了:</label> <input type="text" id="scaleEnd" style={{ margin: "0 20px 0 6px" }} value={panelInfo.scaleEnd} onChange={(e) => { setScaleEnd(e) }} /> </div> <div class="option-row"> <label for="acceptableStart">予想される販売範囲の開始:</label> <input type="text" id="acceptableStart" style={{ margin: "0 20px 0 6px" }} value={panelInfo.acceptableStart} onChange={(e) => { setAcceptableStart(e) }} /> </div> <div class="option-row"> <label for="acceptableEnd">予想される販売範囲の終了:</label> <input type="text" id="acceptableEnd" style={{ margin: "0 20px 0 6px" }} value={panelInfo.acceptableEnd} onChange={(e) => { setAcceptableEnd(e) }} /> </div> <div class="option-row"> <label for="colorScheme">カラースキーム:</label> <select id="colorScheme" style={{ margin: "0 20px 0 6px" }} value={panelInfo.colorScheme} onChange={(e) => { setColorScheme(e) }} > <option value="#DDDDDD" selected>LightGrey</option> <option value="#BBBBBB">Grey</option> <option value="#999999">DarkGrey</option> <option value="#82BC00">Green</option> <option value="#000000">Black</option> <option value="#F7A711">Orange</option> </select> </div> <hr /> <div class="option-row"> <div class="option"> <button onClick={(e) => { btnChangeSettingClicked(e) }}>設定を変更する</button> </div> </div> </div> ) } }
<!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$/ja/react/node_modules/@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css"> <!-- SystemJS --> <script src="$DEMOROOT$/ja/react/node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('$DEMOROOT$/ja/lib/react/license.js').then(function () { System.import('./src/app'); }); </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 { width: calc(100% - 280px); height: 100%; overflow: hidden; float: left; } .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, react: true }, meta: { '*.css': { loader: 'css' } }, 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-resources-ja': 'npm:@mescius/spread-sheets-resources-ja/index.js', '@mescius/spread-sheets-react': 'npm:@mescius/spread-sheets-react/index.js', '@grapecity/jsob-test-dependency-package/react-components': 'npm:@grapecity/jsob-test-dependency-package/react-components/index.js', 'react': 'npm:react/umd/react.production.min.js', 'react-dom': 'npm:react-dom/umd/react-dom.production.min.js', 'css': 'npm:systemjs-plugin-css/css.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: 'jsx' }, "node_modules": { defaultExtension: 'js' }, } }); })(this);