RN中使用 native-echarts 表格外面的容器超出屏幕大小



  • 0_1516157361096_Screenshot_2018-01-17-10-46-32.png

    const {width} = Dimensions.get('window');

    option = {
    xAxis: {
    type: 'value'
    },
    yAxis: {
    type: 'value'
    },
    dataZoom: [
    {
    type: 'slider',
    xAxisIndex: 0,
    start: 10,
    end: 60
    },
    {
    type: 'inside',
    xAxisIndex: 0,
    start: 10,
    end: 60
    },
    {
    type: 'slider',
    yAxisIndex: 0,
    start: 30,
    end: 80
    },
    {
    type: 'inside',
    yAxisIndex: 0,
    start: 30,
    end: 80
    }
    ],
    series: [{
    name: '模拟数据',
    type: 'line',
    showSymbol: false,
    hoverAnimation: false,
    data:[["1.616","7.241"],["3.958","5.701"],["4.768","8.971"],["5.051","9.710"],["6.046","4.182"],["7.295","1.429"],["8.417","8.167"],["9.492","4.771"],["17.632","2.605"],["24.242","5.042"]]
    }]
    }

    <Echarts option={option} height={300} width={width} />


Log in to reply