<div class="row">
    <div class="col-md-12">
        <a name="bulan"></a>
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">Kunjungan Rawat Jalan</h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <a href="<?php echo base_url('admin/home'); ?>" class="btn btn-box-tool"><i class="fa fa-times"></i></a>
                </div>
            </div>
            
            <div class="box-body">
                <a href="<?php echo base_url('admin/view/kunjunganirja'); ?>" class="btn btn-info">Hari Ini</a>
                <a href="<?php echo base_url('admin/view/kunjunganirjabln'); ?>" class="btn btn-info">Bulan Ini</a>
                <a href="<?php echo base_url('admin/view/kunjunganirjathn'); ?>" class="btn btn-info">Tahun Ini</a>
                <div id="kjalan" class="chart"></div>
                <center><b>ELG</b>, INSTALASI ELANG | <b>GRD</b>, INSTALASI GARUDA | <b>IGD</b>, INSTALASI GAWAT DARURAT | <b>MER</b>, INSTALASI MERPATI | <b>MUR</b>, INSTALASI RAWAT JALAN MURAI | <b>RAD</b>, INSTALASI RADIOLOGI</center>
            </div>
            <div class="box-footer"><i class="fa fa-clock-o"></i> Data realtime</div>
        </div>
    </div>
</div>

<script type="text/javascript">
// ===== KUNJUNGAN IRJA HARI INI =====
var kjalan = AmCharts.makeChart( "kjalan", {
  "type": "serial",
  "theme": "light",
  "depth3D": 20,
  "angle": 30,
  "legend": {
    "align": "center",
    "horizontalGap": 10,
    "useGraphSettings": true,
    "markerSize": 10
  },
  "dataProvider": [
        <?php foreach ($chart_kunjungan_irja as $content): ?>
        {
            "polycode" : "<?php echo $content->unit_alias; ?>",
            "pbi" : <?php echo $content->pbi; ?>,
            "nonpbi" : <?php echo $content->nonpbi; ?>,
            "jamkesda" : <?php echo $content->jamkesda; ?>,
            "umum" : <?php echo $content->umum; ?>
        },
        <?php endforeach; ?>
  ],
  "valueAxes": [ {
    "stackType": "regular",
    "axisAlpha": 0,
    "gridAlpha": 0,
    "position": "left",
    "title": "Total Kunjungan"
  } ],
  "graphs": [ {
    "balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
    "fillAlphas": 0.8,
    "labelText": "[[value]]",
    "lineAlpha": 0.3,
    "title": "JKN-PBI",
    "type": "column",
    "color": "#000000",
    "valueField": "pbi"
  }, {
    "balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
    "fillAlphas": 0.8,
    "labelText": "[[value]]",
    "lineAlpha": 0.3,
    "title": "JKN-NON-PBI",
    "type": "column",
    "color": "#000000",
    "valueField": "nonpbi"
  }, {
    "balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
    "fillAlphas": 0.8,
    "labelText": "[[value]]",
    "lineAlpha": 0.3,
    "title": "UMUM",
    "type": "column",
    "color": "#000000",
    "valueField": "umum"
  }, {
    "balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
    "fillAlphas": 0.8,
    "labelText": "[[value]]",
    "lineAlpha": 0.3,
    "title": "JAMKESDA",
    "type": "column",
    "color": "#000000",
    "valueField": "jamkesda"
  } ],
  "categoryField": "polycode",
  "categoryAxis": {
    "gridPosition": "start",
    "axisAlpha": 0,
    "gridAlpha": 0,
    "position": "left"
    //"labelRotation": 90
  },
  "export": {
    "enabled": true
  }

} );
</script>