美文网首页
echarts海南岛显示过小解决

echarts海南岛显示过小解决

作者: 萬wan事顺意 | 来源:发表于2022-03-09 10:57 被阅读0次

//判断是否海南省
    if(hainan=='海南'){
        option.series[0].center = [109.844902, 19.0392];
        option.series[0].layoutCenter = ['35%', '50%'];
        option.series[0].layoutSize = "500%";
    } else { //非显示海南时,将设置的参数恢复默认值
      option.series[0].center = undefined;
      option.series[0].layoutCenter = undefined;
      option.series[0].layoutSize = undefined;
}



相关文章

网友评论

      本文标题:echarts海南岛显示过小解决

      本文链接:https://www.haomeiwen.com/subject/xxrtdrtx.html