zoukankan      html  css  js  c++  java
  • Echarts 新认知 地图的label到底怎么居中?

    试过了offset和很多Api,都无法实现label居中

    后来无意中发现,原来在geojson注册的时候,可以定义 properties.cp 属性,实现文本的坐标自定义,实现居中。

    echarts.registerMap('china', {
        "type": "FeatureCollection",
        "features": [{
            "id": "650000",
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [],
                "encodeOffsets": [[88824, 50096]]
            },
            "properties": {
                "cp": [87.617733, 43.792818],
                "name": "新疆",
                "childNum": 1
            }
        }],
        "UTF8Encoding": true
    });
    
  • 相关阅读:
    jQuery实现radio第一次点击选中第二次点击取消功能(转)
    好用的文件下载类
    Windows获取远程Linux局域网内的mysql连接
    linux通过端口号查找程序执行路径
    linux几个命令
    java判断是移动端还是pc端
    jsp传给java属性,java生成json串,方便以后取出来
    如何在线程中获取spring 管理的bean
    [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "null"
    double,失去精度
  • 原文地址:https://www.cnblogs.com/CyLee/p/9956221.html
Copyright © 2011-2022 走看看