Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] invalidType not working after invoking updataDataSync #1057

Closed
youngwinds opened this issue Sep 22, 2023 · 0 comments · Fixed by #1070
Closed

[Bug] invalidType not working after invoking updataDataSync #1057

youngwinds opened this issue Sep 22, 2023 · 0 comments · Fixed by #1070
Assignees
Labels
bp bug Something isn't working

Comments

@youngwinds
Copy link
Contributor

const spec = {
  "type": "line",
  "xField": "230922115413303",
  "yField": "010002",
  "direction": "vertical",
  "seriesField": "20001",
  "data": {
    "id": "data",
    "fields": {
      "10001": {
        "alias": "指标名称 "
      },
      "20001": {
        "alias": "图例项 ",
        "domain": [
          "销售额-地区-存在空"
        ],
        "sortIndex": 0,
        "lockStatisticsByDomain": true
      },
      "010002": {
        "alias": "指标值 "
      },
      "230921205908124": {
        "alias": "销售额-地区-存在空"
      },
      "230922115413303": {
        "alias": "地区",
        "domain": [
          "东北",
          "华北",
          "华东",
          "西北",
          "西南",
          "中南"
        ],
        "sortIndex": 0,
        "lockStatisticsByDomain": true
      }
    },
  },
  "invalidType": "break",
}

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

setTimeout(() => {

  vchart.updateDataSync('data', [
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": "1690889.2339668274",
      "230921205908124": "1690889.2339668274",
      "230922115413303": "西北"
    },
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": "6715441.974457741",
      "230921205908124": "6715441.974457741",
      "230922115413303": "中南"
    },
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": "4074575.5590572357",
      "230921205908124": "4074575.5590572357",
      "230922115413303": "东北"
    },
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": "2879904.4894218445",
      "230921205908124": "2879904.4894218445",
      "230922115413303": "西南"
    },
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": null,
      "230921205908124": null,
      "230922115413303": "华东"
    },
    {
      "10001": "销售额-地区-存在空",
      "10003": "230921205908124",
      "20001": "销售额-地区-存在空",
      "010002": "3614068.004757881",
      "230921205908124": "3614068.004757881",
      "230922115413303": "华北"
    }
  ])
}, 1500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bp bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants