Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $grafico=array();
- $grafico['title']['text']="Gráfica de demostración ";
- $grafico['title']['subtext']="Libreria echarts";
- $grafico['tooltip']['trigger']= "axis";
- $grafico['tooltip']['axisPointer']['type']= "shadow";
- $grafico['xAxis']['data']=array("Primero","Segundo","Tercero");
- $grafico['yAxis']['type']="value";
- //Leyenda
- $grafico['legend']['orient']="horizontal";
- $grafico['legend']['right']=35;
- //Asignacion de datos
- $grafico['series']=$datos;
- $json_grafico=json_encode($grafico);
- ?>
- @push('javascript')
- <script type="text/javascript">
- $(function () {
- var myChart = echarts.init(document.getElementById('grafica_echarts'), 'light');
- var option = {!! $json_grafico !!};
- myChart.setOption(option);
- });
- </script>
- @endpush
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement