其他分享
首页 > 其他分享> > e chart

e chart

作者:互联网

 

 

 

        store.load(function (records, operation, success) {
            //正态分布图
            var chart1Panel = Plantpanel.down('panel[name=NormalDistributionChart]');
            var chart1Id = chart1Panel.getId();
            var myChart1 = echarts.init(document.getElementById(chart1Id));
            //XBAR图表
            var chart2Panel = Plantpanel.down('panel[name=XBARChart]');
            var chart2Id = chart2Panel.getId();
            var myChart2 = echarts.init(document.getElementById(chart2Id));
            //R图表
            var chart3Panel = Plantpanel.down('panel[name=RChart]');
            var chart3Id = chart3Panel.getId();
            var myChart3 = echarts.init(document.getElementById(chart3Id));
            myChart1.clear();
            myChart2.clear();
            myChart3.clear();
            if (records.length==0) {
                myChart1.setOption({
                    backgroundColor: 'white',
                    tooltip: {
                        trigger: 'item',
                        axisPointer: {            // 坐标轴指示器,坐标轴触发有效
                            type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
                        }
                    },
                    title: {
                        text: 'Normal distribution plot',
                        left: 'center'
                    },
                    xAxis: {
                        data: [],
                        axisLabel: {
                            interval: 0,
                            rotate: 45
                        }
                    },
                    yAxis: [{
                        type: 'value',
                        splitLine: { show: false }
                    }, {
                        type: 'value',
                        splitLine: { show: false }
                    }],
                    series: [{
                        type: 'bar',
                        name: '频次',
                        xAxisIndex: 0,
                        yAxisIndex: 0,
                        data: []
                    }, {
                        type: 'line',
                        name: '频线',
                        xAxisIndex: 0,
                        yAxisIndex: 1,
                        data: []
                    }]
                });
                myChart2.setOption({
                    backgroundColor: 'white',
                    tooltip: {
                        trigger: 'item',
                        axisPointer: {            // 坐标轴指示器,坐标轴触发有效
                            type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
                        }
                    },
                    title: {
                        text: 'XBAR CHART',
                        left: 'center',
                        textStyle: {
                            fontSize: 14
                        }
                    },
                    legend: {
                        top: 'bottom',
                        orient: 'horizontal',
                        textStyle: {
                            fontSize: 10
                        },
                        data: ['值(X)', '上限(USL)', '上控制限(X-UCL)', 'B-UCL(2

标签:lineStyle,name,type,chart,var,line,data
来源: https://www.cnblogs.com/2eggs/p/12933264.html