<jsp:directive.page pageEncoding="UTF-8" />

<og:query command="NEW" stopZero="{@stopZero}">
	SELECT 	 ENAME
			,ROUND( SAL / 2   * DBMS_RANDOM.VALUE ) as SAL1
			,ROUND( SAL / 2.5 * DBMS_RANDOM.VALUE ) as SAL2
			,EMPNO
			FROM EMP
			<og:where>
				<og:and value=" DEPTNO = {@SOOUID}" />
				<og:and value=" EMPNO like {@EMPNO}" />
			</og:where>
</og:query>

<!-- common/otion/v3chartOptions.js にﾏｰｼﾞしました。 -->
<!-- script src="chartLink.js?new Date()" --><!-- --><!--/script-->

<!--
	{"command":"NEW","chartType":"pie","SOOUID":"{@SOOUID}","debug":"{@debug}","LABEL":"$LBL","VALUE":"$VAL","INDEX":"$IDX","SELNO":"$SEL"}
	自分自身の result.jsp を呼ぶ場合(frame=null or window)
	onClick			= "chartLink( event, obj, '','result.jsp', {@JSONDATA} );"

	varColumns 属性で、検索ﾃﾞｰﾀのJSONを作成して、選択値のｷｰを飛ばす。
	onClick			= "chartLink( event, obj, null,'result.jsp', {@JSONDATA}, 'EMPNO', EMPNO );"

	自分自身でも、frameをCONTENTS にする場合は、parent をセットする。
	onClick			= "chartLink( event, obj, '{@GUI.KEY}','index.jsp', {@JSONDATA}, 'EMPNO', EMPNO );"

	他の画面(GF9100) を呼ぶ場合(frame=parent にして、画面IDを付ける)
	JSONDATA を置き換えてテストします。
	{"command":"NEW","SYSTEM_ID":"GF","CLM":"AA","BACK_GAMENID":"GF7311"}
	onClick			= "chartLink( event, obj, 'GF9100', 'index.jsp', {@JSONDATA} );"

	ﾘﾝｸ先に渡すﾁｬｰﾄｶﾗﾑが複数の場合
	onClick			= "chartLink( event, obj, '{@GUI.KEY}','index.jsp', {@JSONDATA}, 'EMPNO,CDTAN', EMPNO, ENAME );"
-->

<og:value command="SET" key="JSONDATA">
	{"command":"NEW","chartType":"pie","SOOUID":"{@SOOUID}","debug":"{@debug}","LABEL":"$LBL","VALUE":"$VAL","INDEX":"$IDX","SELNO":"$SEL"}
</og:value>

<fieldset style="display:inline-block;">
	<legend>jsChartV3</legend>
	<og:jsChartV3
		chartType		= "bar"
		labelColumn		= "ENAME"
		title			= "{@chartTitle}"
		optOptions		= "animation:false"
		optTicks		= "color:'black'"
		plugins			= "chartLabelPlugin"
		optLegend		= "onClick:function(event, legendItem, legend){return;}"
		onClick			= "chartLink( event, obj, '{@GUI.KEY}','index.jsp', {@JSONDATA}, 'EMPNO', EMPNO );"
		varColumns		= "EMPNO"
	>
		<og:jsChartDataV3
			chartColumn		= "SAL1"
			label			= "{@LBL.SAL}"
			backgroundColor	= "rgba(255, 99, 132, 0.2)"
			borderColor		= "rgba(255,99,132,1)"
			fontColor		= "black"
			tension			= "0.5"
			borderWidth		= "1"
		/>
		<og:jsChartDataV3
			chartColumn		= "SAL2"
			label			= "{@LBL.COMM}"
			backgroundColor = "#FF6384,#36A2EB,#FFCE56,#FF6384,#36A2EB,#FFCE56,#FF6384,#36A2EB,#FFCE56,#FF6384,#36A2EB,#FFCE56"
			borderColor		= "rgba(75,192,192,1)"
			borderWidth		= "1"
		/>
	</og:jsChartV3>
</fieldset>
