Giter VIP home page Giter VIP logo

Comments (3)

fangsmile avatar fangsmile commented on May 26, 2024

可以加下飞书群 具体创建个话题 聊一下
飞书20231221-201849

from vtable.

fangsmile avatar fangsmile commented on May 26, 2024

请问加我们的群了吗。
上面的问题我描述一下 ,举个例子:
行表头有两层,第一层是类别,第二层是省份,
最终不管是你自己组建树还是VTable内部组建树,树可能是这样的:

const rowTree = [
  {
    dimensionKey: 'category',
    value: '办公用品',
    children: [
      {
        dimensionKey: 'province',
        value: '上海'
      },
      {
          dimensionKey: 'province',
          value: '山东'
      }
    ]
  },
 {
    dimensionKey: 'category',
    value: '家具',
    children: [
      {
        dimensionKey: 'province',
        value: '上海'
      },
      {
          dimensionKey: 'province',
          value: '山东'
      }
    ]
  }
]

如果数据中只有一个维度的值,那这个上海是对应'办公用品'还是'家具'的是无法区分的,我们需要个维度全路径的匹配对应关系

const records = [
  {
    province: '上海',
    // other datas
  },
 ...
]

@InModeration

from vtable.

InModeration avatar InModeration commented on May 26, 2024

请问加我们的群了吗。 上面的问题我描述一下 ,举个例子: 行表头有两层,第一层是类别,第二层是省份, 最终不管是你自己组建树还是VTable内部组建树,树可能是这样的:

const rowTree = [
  {
    dimensionKey: 'category',
    value: '办公用品',
    children: [
      {
        dimensionKey: 'province',
        value: '上海'
      },
      {
          dimensionKey: 'province',
          value: '山东'
      }
    ]
  },
 {
    dimensionKey: 'category',
    value: '家具',
    children: [
      {
        dimensionKey: 'province',
        value: '上海'
      },
      {
          dimensionKey: 'province',
          value: '山东'
      }
    ]
  }
]

如果数据中只有一个维度的值,那这个上海是对应'办公用品'还是'家具'的是无法区分的,我们需要个维度全路径的匹配对应关系

const records = [
  {
    province: '上海',
    // other datas
  },
 ...
]

@InModeration

加了。这个问题我按照你们的思路处理了,即每个子单元格都补充了祖先节点的值,暂时没有什么性能上的问题

from vtable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.