<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-lg-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>ALL BANK</h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div id="chart-all"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-6">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>PT. Bersama Zatta Jaya</h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div id="chart-bzy"></div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-lg-6">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>PT. Bersama Zatta Mulya</h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div id="chart-bzm"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-6">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>PT. Bersama Dauky Mulya</h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div id="chart-bdm"></div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-lg-6">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>PT. Bersama Adi Prakarsa </h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div id="chart-bap"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="<?= base_url() ?>assets/js/plugins/chartJs/Chart.PieceLabel.min.js"></script>
<script>
	$.fn.loadChart = function(params) {
		let comp = $(this);
		$.ajax({
			url: site_url + "dashboard/finance_accounting_dashboard/bank_account_balance/load_chart",
			type: 'POST',
			dataType: 'html',
			data: {
				...params
			},
			success: function(result) {
				comp.html(result);
			}
		})
	}

	$('#chart-all').loadChart({
		description: 'ALL BANK',
		entity: 'ALL',
		stacked: true,
		type: 'horizontalBar',
		canvasHeight: 150,
		tableFont: 15,
		leftClass: 'col-lg-6',
		rightClass: 'col-lg-6'
	});

	$('#chart-bzy').loadChart({
		description: 'PT. Bersama Zatta Jaya',
		entity: 'BZY',
		type: 'pie',
		canvasHeight: 250,
		tableFont: 12,
		leftClass: 'col-lg-7',
		rightClass: 'col-lg-5'
	});

	$('#chart-bzm').loadChart({
		description: 'PT. Bersama Zatta Mulya',
		entity: 'BZM',
		type: 'pie',
		canvasHeight: 250,
		tableFont: 12,
		leftClass: 'col-lg-7',
		rightClass: 'col-lg-5'
	});

	$('#chart-bdm').loadChart({
		description: 'PT. Bersama Dauky Mulya',
		entity: 'BDM',
		type: 'pie',
		canvasHeight: 250,
		tableFont: 12,
		leftClass: 'col-lg-7',
		rightClass: 'col-lg-5'
	});

	$('#chart-bap').loadChart({
		description: 'PT. Bersama Adi Prakarsa',
		entity: 'BAP',
		type: 'pie',
		canvasHeight: 250,
		tableFont: 12,
		leftClass: 'col-lg-7',
		rightClass: 'col-lg-5'
	});
</script>
<script src="<?= base_url() ?>assets/js/plugins/chartJs/Chart.min.js"></script>