{# <div style="position: relative; overflow-x: auto;"> #}
<div id="linechart_test" style="width: 100%; height: 400px; margin: 0 auto"></div>
<script src="{{ asset('frontend/js/jquery.min.js') }}"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
getDataChart();
});
function getDataChart() {
var periode = $('#periode').val()+' '+$('#tahunx').val();
$.ajax({
type: "GET",
dataType: "json",
url: "{{ path('dataset_chart_json', {id: publikasi.id}) }}",
data: {
periode: periode
},
success : function(r){
chartHighchart(r.columns, r.datas);
console.log(r.datas);
}
});
}
function chartHighchart(columnx, datax) {
var chartx = new Highcharts.Chart({
chart: {
"renderTo": "linechart_test",
"type": "{{ grafik_info['tipe'] }}"
},
series: datax,
title: {
"text": "{{ grafik.judul }}"
},
xAxis: {
"title": {
"text":"{{ grafik_info['varX'] }}"
},
"categories": columnx
},
yAxis: {
"title": {
"text": ""
}
},
credits: {
enabled: false
}
});
};
</script>
{# </div> #}