Code Monkey home page Code Monkey logo

Comments (4)

dxq613 avatar dxq613 commented on April 27, 2024

一般情况下用户想指定分类类型的顺序,你的需求正好相反? 我看了现在的情况,分类的顺序会根据数组的顺序调整,如果你想不改变字符串的顺序,那么可以自己定义列的字符串顺序:

var defs = {
  name: {
   value: ['a','b','c']
  }
}
chart.source(data,defs);

from g2.

ShighGoing avatar ShighGoing commented on April 27, 2024

我想你误解我的意思了。我并不在意分类类型的顺序。我是想按照value值排序显示(事实上已经是排序过的数组,只要按照数组显示即可)。
我的需求是无论是sourceData还是changeData 都按照数组本来的顺序显示

from g2.

dxq613 avatar dxq613 commented on April 27, 2024

我试了下,G2现在如果changeData后,分类类型的顺序会根据当前数据集重新排序的。

from g2.

xiaxia2017 avatar xiaxia2017 commented on April 27, 2024

同求该问题,应该有参数可以避免G2自动排序的,之前用的旧版但是不美观;新版切换过来,发现文档太难找了,参数配置变化太大,有的还找不到,不行就只能再切回旧版了

from g2.

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.