123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>慧牧科技</title>
- <script src="views/haifmp/js/jquery-2.1.1.min.js"></script>
- <script type="text/javascript" src="js/highcharts/highcharts.js"></script>
- <style type="text/css">
- </style>
- <script type="text/javascript">
- $(function () {
- var jo = "$!jo";
- $('#container').highcharts({
- chart: {
- type: 'bar'
- },
- title: {
- text: '最近四周配种分娩数条形图'
- },
- subtitle: {
- text: '数据来源: 慧牧科技'
- },
- xAxis: {
- categories: jo.name,
- title: {
- text: null
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: '配种分娩数',
- align: 'high'
- },
- labels: {
- overflow: 'justify'
- }
- },
- tooltip: {
- valueSuffix: ' 次'
- },
- plotOptions: {
- bar: {
- dataLabels: {
- enabled: true
- }
- }
- },
- legend: {
- layout: 'vertical',
- align: 'right',
- verticalAlign: 'top',
- x: -40,
- y: 100,
- floating: true,
- borderWidth: 1,
- backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
- shadow: true
- },
- credits: {
- enabled: false
- },
- series: [{
- name: '配种数',
- data: jo.pzsum
- }, {
- name: '分娩数',
- data: jo.fmsum
- }]
- });
-
-
-
- $('#container1').highcharts({
- chart: {
- type: 'line'
- },
- title: {
- text: '最近四周配种分娩率'
- },
- subtitle: {
- text: '数据来源: 慧牧科技'
- },
- xAxis: {
- categories: jo.name,
- },
- yAxis: {
- title: {
- text: '%'
- },
- labels: {
- overflow: 'justify'
- }
- },
- plotOptions: {
- line: {
- dataLabels: {
- enabled: true // 开启数据标签
- },
- enableMouseTracking: false // 关闭鼠标跟踪,对应的提示框、点击事件会失效
- }
- },
- series: [{
- name: '配种分娩率',
- data: jo.pzfm
- }]
- });
- });
- </script>
- </head>
- <body>
- <div id="container" style="min-width:400px;height:400px"></div>
- <div id="container1" style="min-width:400px;height:400px"></div>
- </body>
- </html>
|