export default {
    mName : "TitleEcharts",
    edit : "Echarts",
    keys : {
        dataInterface: {
            _name: "数据接口配置",
            url: "接口连接",
            params: {
                _name: "请求参数",
                value: "接口参数名称(需有父级数据关联)"
            },
            dataSource: {
                SourceKey: "源数据结构",
                AimsKey: "目标数据结构",
                keyRelated: "集合键关联"
            }
        },
        title: "标题",
        config: {
            xAxis: {
                data: {
                    _name: "X轴数据",
                    value: "数据"
                }
            },
            series: {
                type: "图表类型",
                barWidth: "柱宽度",
                data: {
                    _name: "柱状数据",
                    value: "数据"
                }
            }
        }
    },
    option : {
        grid: {
            left: '2%',
            right: '2%',
            bottom: '32%',
            top: "10%",
            containLabel: true
        },
        tooltip: {
            show: false
        },
        xAxis: {
            axisLine: {
                show: false
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                color: "rgba(50, 86, 111, 1)",
                fontSize: 14,
                interval:0,
                rotate:40
            }
        },
        yAxis: {
            show: true,
            scale: true,
            minInterval: 0.1,
            axisLine: {
                show: false
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                color: "rgba(50, 86, 111, 1)",
                fontSize: 14
            },
            splitLine: {
                lineStyle: {
                    color: 'rgba(50, 86, 111, 0.2)'
                }
            }
        },
        dataZoom: [
            {
                show: true,
                height: 15,
                xAxisIndex: [0],
                handleSize: '150%',
                bottom:"26%",
                handleStyle: {
                    color: "rgba(12, 196, 252, .9)"
                },
                textStyle: {
                    color: "rgba(174, 220, 244, 1)"
                },
                borderColor: "rgba(2, 115, 255, .6)"
            }, {
                type: "inside",
                show: true,
                height: 15,
                bottom:"26%"
            }
        ],
        series: [
            {
                type: 'bar',
                barWidth: 14,
                itemStyle: {
                    barBorderRadius: 6,
                    color: {
                        type: 'linear',
                        x: 0,
                        y: 1,
                        colorStops: [
                            {
                                offset: 0,
                                color: '#073B50' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#09BDEF' // 100% 处的颜色
                            }
                        ],
                        global: false // 缺省为 false
                    }
                }
            }
        ]
    },
    data : {
        dataInterface: {
            url:'',
            params: [
                {
                    value: "id"
                }
            ],
            dataSource: [
                {
                    SourceKey: "retBody.title",
                    AimsKey: "data.title"
                }, {
                    SourceKey: "retBody.list",
                    AimsKey: "data.config.series.0.data",
                    keyRelated: 'value.value'
                }, {
                    SourceKey: "retBody.list",
                    AimsKey: "data.config.xAxis.data",
                    keyRelated: 'name.value'
                }
            ]
        },
        config: {
            xAxis: {
                data: [
                    {
                        value: "竹"
                    }
                ]
            },
            series: [
                {
                    type: "bar",
                    barWidth: 14,
                    data: [
                        {
                            value: "100"
                        }
                    ]
                }
            ]
        }
    }
}