唯杰地图 logo唯杰地图
VJMAP
EN

selection-passing.json

vjvp/examples/selection-passing.json 3.3 KB109 行
原文
{
  "project": {
    "name": "选中传递示例",
    "screen": {
      "uid": "screen_main",
      "type": "screen",
      "name": "主页面",
      "options": {
        "fullscreen-mode": "fill-uniform", "fill-auto-expand": true,
        "size": [1920, 1080],
        "background-color": "#0c0d0e",
        "select-sync-receive": true
      },
      "stateOverrides": {},
      "widgets": [
        {
          "uid": "w_title",
          "type": "basic-text",
          "options": {
            "position": [140, 70],
            "size": [1300, 60],
            "text": "选中传递:点击饼图某城市,下方表格按「选中字段=城市」高亮对应行",
            "text-font": { "size": 30, "color": "#ffffff" },
            "text-position": "left"
          },
          "stateOverrides": {}
        },
        {
          "uid": "w_pie",
          "type": "chart-pie",
          "name": "城市占比(发起选中)",
          "options": {
            "position": [140, 200],
            "size": [620, 520],
            "title": "各城市数量占比",
            "show-legend": true,
            "show-label": true,
            "select-sync-emit": true,
            "category": [["conn_city", "tbl_city", "城市"]],
            "value": [["conn_city", "tbl_city", "数量"]]
          },
          "stateOverrides": {}
        },
        {
          "uid": "w_table",
          "type": "basic-table",
          "name": "明细(接收选中)",
          "options": {
            "position": [820, 200],
            "size": [920, 520],
            "row-count": 6,
            "select-sync-receive": true,
            "select-sync-fields": [["conn_city", "tbl_city", "城市"]],
            "table-data-fields": [
              ["conn_city", "tbl_city", "城市"],
              ["conn_city", "tbl_city", "数量"],
              ["conn_city", "tbl_city", "负责人"]
            ]
          },
          "stateOverrides": {}
        }
      ]
    },
    "screens": [],
    "params": {},
    "settings": {}
  },
  "connections": [
    {
      "uid": "conn_city",
      "name": "城市明细",
      "type": "json",
      "connectorType": "json",
      "config": { "copyToRoot": true, "fileName": "" },
      "tables": [
        {
          "uid": "tbl_city",
          "name": "城市明细",
          "fields": [
            { "uid": "城市", "alias": "城市", "type": "string" },
            { "uid": "数量", "alias": "数量", "type": "number" },
            { "uid": "负责人", "alias": "负责人", "type": "string" }
          ]
        }
      ]
    }
  ],
  "connectionData": {
    "conn_city": [
      {
        "tableId": "tbl_city",
        "tableName": "城市明细",
        "fields": [
          { "uid": "城市", "alias": "城市", "type": "string" },
          { "uid": "数量", "alias": "数量", "type": "number" },
          { "uid": "负责人", "alias": "负责人", "type": "string" }
        ],
        "rows": [
          { "城市": "北京", "数量": 320, "负责人": "张伟" },
          { "城市": "上海", "数量": 280, "负责人": "李娜" },
          { "城市": "杭州", "数量": 210, "负责人": "王芳" },
          { "城市": "成都", "数量": 175, "负责人": "刘洋" }
        ]
      }
    ]
  },
  "dataRules": []
}