//心电图的历史数据
var hisArray = [];
var hisFlag = false;
layui.use(['layer', 'form', 'laydate', 'admin', 'ax'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var laydate = layui.laydate;
    var admin = layui.admin;
    var layer = layui.layer;

    var ajaxIndex = new $ax(Feng.ctxPath + "/index/detail/" + Feng.getUrlParam("indexId"));
    var resultIndex = ajaxIndex.start();
    //form.val('indexForm', resultIndex.data);
    var dates = JSON.parse(resultIndex.data.hisXlStr);
    form.render();


    Highcharts.setOptions({
        global: {
            useUTC: false
        }
    });


    var chart = Highcharts.chart('container', {
        chart: {
            type: 'spline',
            marginRight: 10,
            animation: false,
        },
        title: {
            text: '心电数据'
        },
        xAxis: {
            type: 'category',
            tickPixelInterval: 0
        },
        yAxis: {
            title: {
                text: null
            }
        },
        tooltip: {
            show: false,
            formatter: function () {
                return '<b>' + this.series.name + '</b><br/>' +
                    Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
                    Highcharts.numberFormat(this.y, 2);
            }
        },
        legend: {
            enabled: false
        },
        series: [{
            name: '心电数据',
            allowPointSelect: false,
            animation: false,
            animationLimit: Infinity,
            type: 'line',
            marker: {
                enabled: false
            },
            data: dates
        }]
    });



});

